update staff list, add pin editor and privilege editor
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import 'package:fcs/domain/entities/discount.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/discount/model/discount_model.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/user_search/user_search.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
import 'package:fcs/pages/widgets/input_text.dart';
|
||||
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
@@ -88,29 +87,17 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
AppTranslations.of(context)!.text("discount.form"),
|
||||
),
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
onPressed: () {
|
||||
if (isDataChanged()) {
|
||||
showConfirmDialog(context, "back.button_confirm", () {
|
||||
Navigator.of(context).pop();
|
||||
});
|
||||
} else {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
appBar: LocalAppBar(
|
||||
labelKey: "discount.form",
|
||||
backgroundColor: Colors.white,
|
||||
arrowColor: primaryColor,
|
||||
labelColor: primaryColor,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.delete),
|
||||
onPressed: _delete,
|
||||
)
|
||||
_isNew
|
||||
? const SizedBox()
|
||||
: IconButton(
|
||||
icon: Icon(Icons.delete, color: primaryColor),
|
||||
onPressed: _delete)
|
||||
],
|
||||
),
|
||||
body: Padding(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/discount/discount_list_row.dart';
|
||||
import 'package:fcs/pages/discount/model/discount_model.dart';
|
||||
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
||||
import 'package:fcs/pages/widgets/local_popup_menu_button.dart';
|
||||
import 'package:fcs/domain/vo/local_popupmenu.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
@@ -58,26 +58,13 @@ class _DiscountListState extends State<DiscountList> {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
AppTranslations.of(context)!.text("discount.title"),
|
||||
),
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
actions: <Widget>[popupMenu],
|
||||
),
|
||||
appBar: LocalAppBar(labelKey: "discount.title", actions: [popupMenu]),
|
||||
body: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
separatorBuilder: (context, index) => Divider(
|
||||
color: Colors.black,
|
||||
height: 1,
|
||||
),
|
||||
separatorBuilder: (context, index) =>
|
||||
Divider(color: Colors.black, height: 1),
|
||||
controller: _controller,
|
||||
itemCount: discountModel.discounts.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
|
||||
Reference in New Issue
Block a user