insert pages
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
|
||||
import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:fcs/vo/announcement.dart';
|
||||
import 'package:fcs/vo/shipment.dart';
|
||||
|
||||
import 'base_model.dart';
|
||||
import 'constants.dart';
|
||||
@@ -10,6 +11,12 @@ import 'firebase_helper.dart';
|
||||
class AnnouncementModel extends BaseModel {
|
||||
List<Announcement> announcements = [];
|
||||
|
||||
List<Shipment> shipments = [
|
||||
Shipment(shipDate: DateTime(2020, 4, 23), shipmentNumber: 'A103B',status: 'In progress'),
|
||||
Shipment(shipDate: DateTime(2020, 4, 2), shipmentNumber: 'A100A',status: 'Delivered'),
|
||||
Shipment(shipDate: DateTime(2020, 4, 2), shipmentNumber: 'A100B',status: 'Delivered')
|
||||
];
|
||||
|
||||
void initUser(user) {
|
||||
super.initUser(user);
|
||||
_loadAnnouncements();
|
||||
@@ -37,9 +44,9 @@ class AnnouncementModel extends BaseModel {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Future<Announcement> getAnnouncement(String id) async {
|
||||
String path = "/$biz_collection/${setting.okEnergyId}/$announcement_collection";
|
||||
String path =
|
||||
"/$biz_collection/${setting.okEnergyId}/$announcement_collection";
|
||||
var snap = await getDocSnap(path, id);
|
||||
return Announcement.fromMap(snap.data, snap.documentID);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import 'package:cloud_firestore/cloud_firestore.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:fcs/vo/user.dart';
|
||||
|
||||
import '../vo/user.dart';
|
||||
import 'base_model.dart';
|
||||
import 'constants.dart';
|
||||
import 'firebase_helper.dart';
|
||||
@@ -9,7 +10,11 @@ import 'firebase_helper.dart';
|
||||
class EmployeeModel extends BaseModel {
|
||||
final log = Logger('EmployeeModel');
|
||||
|
||||
List<User> employees = [];
|
||||
List<User> employees = [
|
||||
User(name: 'Ko Nyi', phoneNumber: '+95 9 717273634',),
|
||||
User(name: 'Ko Phyu', phoneNumber: '+1 (939) 382-3844'),
|
||||
User(name: 'Ko Ye', phoneNumber: '+95 9 983734783',status: "Delivered"),
|
||||
];
|
||||
|
||||
void initUser(user) async {
|
||||
super.initUser(user);
|
||||
|
||||
@@ -46,6 +46,14 @@ class MainModel extends ChangeNotifier {
|
||||
bool pinRequired;
|
||||
Timer pinTimer;
|
||||
|
||||
User customer = User(
|
||||
name: "Ko Myo Min",
|
||||
phoneNumber: '+95 9 444444444',
|
||||
fcsID: 'FCS-0203-390-2',
|
||||
shippingAddress:
|
||||
'154-19 64th Ave.Flushing, NY 11367 TEL. +1 (929) 215-2247',
|
||||
deliveryAddress: '39 42th St. Kyaut Ta Thar Township Yangon');
|
||||
|
||||
Setting setting;
|
||||
PackageInfo packageInfo;
|
||||
bool isLoaded = true;
|
||||
|
||||
@@ -8,8 +8,30 @@ import 'constants.dart';
|
||||
import 'firebase_helper.dart';
|
||||
|
||||
class NotificationModel extends BaseModel {
|
||||
int filer=0;
|
||||
List<Notification> notifications = [];
|
||||
int filer = 0;
|
||||
List<Notification> notifications = [
|
||||
Notification(
|
||||
desc: 'A102A-34-#23',
|
||||
status: 'delivered',
|
||||
time: DateTime(2020, 4, 28, 10, 32)),
|
||||
Notification(
|
||||
desc: 'A102A-34-#24',
|
||||
status: 'picked up',
|
||||
time: DateTime(2020, 4, 26, 9, 32)),
|
||||
Notification(
|
||||
desc: 'A102A-34-#23',
|
||||
status: 'sorted',
|
||||
time: DateTime(2020, 4, 24, 10, 32)),
|
||||
Notification(
|
||||
desc: 'ORDER # 114-0725982-9074639',
|
||||
status: 'audited',
|
||||
time: DateTime(2020, 4, 22, 12, 30)),
|
||||
Notification(
|
||||
marketPlace: "Amazon",
|
||||
desc: 'ORDER # 114-0725982-9074639',
|
||||
status: 'received',
|
||||
time: DateTime(2020, 4, 22, 12, 22))
|
||||
];
|
||||
|
||||
var filterValues = {1: "po", 2: "do", 3: "buyer"};
|
||||
List<Notification> get notis {
|
||||
@@ -25,7 +47,6 @@ class NotificationModel extends BaseModel {
|
||||
_loadNotifications();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
logout() async {
|
||||
notifications = [];
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'package:fcs/vo/popup_menu.dart';
|
||||
import 'package:fcs/vo/role.dart';
|
||||
|
||||
import '../config.dart';
|
||||
import '../vo/role.dart';
|
||||
import '../vo/user.dart';
|
||||
import 'base_model.dart';
|
||||
import 'constants.dart';
|
||||
@@ -19,7 +20,13 @@ class UserModel extends BaseModel {
|
||||
PopupMenu popupMenu = new PopupMenu();
|
||||
|
||||
List<User> users = [];
|
||||
List<Privilege> privileges = [];
|
||||
List<Privilege> privileges = [
|
||||
Privilege(name: 'Manage shipment'),
|
||||
Privilege(name: 'Manage pickups'),
|
||||
Privilege(name: 'Manage packages'),
|
||||
Privilege(name: 'Manage deliveries'),
|
||||
Privilege(name: 'Admin')
|
||||
];
|
||||
List<UserLevel> userLevels = [];
|
||||
User user = new User();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user