add disable customer function

This commit is contained in:
Sai Naw Wun
2020-10-17 01:40:24 +06:30
parent 13fa1903bc
commit fa9738f307
28 changed files with 196 additions and 205 deletions

View File

@@ -20,6 +20,8 @@ const rate_doc_id = "rate";
const user_requested_status = "requested";
const user_invited_status = "invited";
const user_disabled_status = "disabled";
const user_joined_status = "joined";
const pkg_files_path = "/packages";

View File

@@ -1,5 +1,4 @@
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:fcs/helpers/const.dart';
import 'package:flutter/foundation.dart';
import 'package:intl/intl.dart';
@@ -53,9 +52,11 @@ class User {
String get phone => phoneNumber != null && phoneNumber.startsWith("959")
? "0${phoneNumber.substring(2)}"
: phoneNumber;
bool get joined => status != null && status == userStatusJoined;
bool get invited => status != null && status == userStatusInvited;
bool get requested => status != null && status == userStatusRequested;
bool get joined => status != null && status == user_joined_status;
bool get invited => status != null && status == user_invited_status;
bool get requested => status != null && status == user_requested_status;
bool get disabled => status != null && status == user_disabled_status;
String get share => "Your phone number:$phoneNumber";
User(
{this.id,