fix profile
This commit is contained in:
@@ -3,8 +3,8 @@ import 'dart:async';
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:fcs/data/services/services.dart';
|
||||
import 'package:fcs/domain/constants.dart';
|
||||
import 'package:fcs/domain/entities/role.dart';
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/domain/vo/privilege.dart';
|
||||
import 'package:fcs/helpers/firebase_helper.dart';
|
||||
import 'package:fcs/pages/main/model/base_model.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
@@ -58,8 +58,6 @@ class StaffModel extends BaseModel {
|
||||
}
|
||||
|
||||
Future<void> _loadPrivileges() async {
|
||||
if (user == null || !user.hasStaffs()) return;
|
||||
|
||||
try {
|
||||
privilegeListener = Firestore.instance
|
||||
.collection("/$privilege_collection")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:fcs/domain/entities/role.dart';
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/domain/vo/privilege.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/pages/main/model/language_model.dart';
|
||||
import 'package:fcs/pages/staff/model/staff_model.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/staff/model/staff_model.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
@@ -68,16 +68,22 @@ class _StaffEditorState extends State<StaffEditor> {
|
||||
p.isChecked = value;
|
||||
});
|
||||
}),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
p.name,
|
||||
style: TextStyle(fontSize: 15.0, color: primaryColor),
|
||||
),
|
||||
Text(p.desc,
|
||||
style: TextStyle(fontSize: 13, color: Colors.grey[600]))
|
||||
],
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: Icon(p.iconData, size: 50, color: Colors.black38),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Text(
|
||||
p.name,
|
||||
style: TextStyle(fontSize: 15.0, color: primaryColor),
|
||||
),
|
||||
Text(p.desc,
|
||||
style: TextStyle(fontSize: 13, color: Colors.grey[600]))
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -192,6 +198,9 @@ class _StaffEditorState extends State<StaffEditor> {
|
||||
Column(
|
||||
children: showprivilegeList(context),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
Container(
|
||||
child: isNew ? addButton : updateButton,
|
||||
),
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/localization/app_translations.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/staff/model/staff_model.dart';
|
||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_icons/flutter_icons.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
import 'staff_editor.dart';
|
||||
|
||||
class StaffList extends StatefulWidget {
|
||||
|
||||
Reference in New Issue
Block a user