Merge branch 'master' of https://gitlab.com/mirza.shafique/mohem_flutter_app into development_sultan
|
Before Width: | Height: | Size: 544 B After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 442 B After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 721 B After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 15 KiB |
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#ffffff</color>
|
||||
</resources>
|
||||
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
<base-config cleartextTrafficPermitted="true">
|
||||
<trust-anchors>
|
||||
<certificates src="system" />
|
||||
</trust-anchors>
|
||||
</base-config>
|
||||
</network-security-config>
|
||||
@ -1,122 +1,128 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
"images":[
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"20x20",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-20x20@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"20x20",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-20x20@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-29x29@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-29x29@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"29x29",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-29x29@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-40x40@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"40x40",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-40x40@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-60x60@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"60x60",
|
||||
"scale":"3x",
|
||||
"filename":"Icon-App-60x60@3x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"iphone",
|
||||
"size":"76x76",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-76x76@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"20x20",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-20x20@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"20x20",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-20x20@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"29x29",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-29x29@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"29x29",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-29x29@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"40x40",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-40x40@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"40x40",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-40x40@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"1x",
|
||||
"filename":"Icon-App-76x76@1x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"76x76",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-76x76@2x.png"
|
||||
},
|
||||
{
|
||||
"idiom":"ipad",
|
||||
"size":"83.5x83.5",
|
||||
"scale":"2x",
|
||||
"filename":"Icon-App-83.5x83.5@2x.png"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"scale" : "1x",
|
||||
"filename" : "ItunesArtwork@2x.png"
|
||||
}
|
||||
],
|
||||
"info":{
|
||||
"version":1,
|
||||
"author":"easyappicon"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 564 B After Width: | Height: | Size: 684 B |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 61 KiB |
@ -0,0 +1,18 @@
|
||||
class AddAttSuccessList {
|
||||
bool? addSuccess;
|
||||
int? attachmentID;
|
||||
|
||||
AddAttSuccessList({this.addSuccess, this.attachmentID});
|
||||
|
||||
AddAttSuccessList.fromJson(Map<String, dynamic> json) {
|
||||
addSuccess = json['AddSuccess'];
|
||||
attachmentID = json['AttachmentID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AddSuccess'] = this.addSuccess;
|
||||
data['AttachmentID'] = this.attachmentID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
class AddAttachmentList {
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
|
||||
AddAttachmentList({this.pRETURNMSG, this.pRETURNSTATUS});
|
||||
|
||||
AddAttachmentList.fromJson(Map<String, dynamic> json) {
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
class AttachmentModel {
|
||||
int? attachmentID;
|
||||
String? pFILECONTENTTYPE;
|
||||
String? pFILEDATA;
|
||||
String? pFILENAME;
|
||||
int? pTRANSACTIONID;
|
||||
|
||||
AttachmentModel({this.attachmentID, this.pFILECONTENTTYPE, this.pFILEDATA, this.pFILENAME, this.pTRANSACTIONID});
|
||||
|
||||
AttachmentModel.fromJson(Map<String, dynamic> json) {
|
||||
attachmentID = json['AttachmentID'];
|
||||
pFILECONTENTTYPE = json['P_FILE_CONTENT_TYPE'];
|
||||
pFILEDATA = json['P_FILE_DATA'];
|
||||
pFILENAME = json['P_FILE_NAME'];
|
||||
pTRANSACTIONID = json['P_TRANSACTION_ID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['AttachmentID'] = this.attachmentID;
|
||||
data['P_FILE_CONTENT_TYPE'] = this.pFILECONTENTTYPE;
|
||||
data['P_FILE_DATA'] = this.pFILEDATA;
|
||||
data['P_FILE_NAME'] = this.pFILENAME;
|
||||
data['P_TRANSACTION_ID'] = this.pTRANSACTIONID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
class ValidateEitTransactionModel {
|
||||
int? tRANSACTIONNUMBER;
|
||||
String? nAME;
|
||||
String? vARCHAR2VALUE;
|
||||
int? nUMBERVALUE;
|
||||
String? dATEVALUE;
|
||||
|
||||
ValidateEitTransactionModel({this.tRANSACTIONNUMBER, this.nAME, this.vARCHAR2VALUE, this.nUMBERVALUE, this.dATEVALUE});
|
||||
|
||||
ValidateEitTransactionModel.fromJson(Map<String, dynamic> json) {
|
||||
tRANSACTIONNUMBER = json['TRANSACTION_NUMBER'];
|
||||
nAME = json['NAME'];
|
||||
vARCHAR2VALUE = json['VARCHAR2_VALUE'];
|
||||
nUMBERVALUE = json['NUMBER_VALUE'];
|
||||
dATEVALUE = json['DATE_VALUE'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['TRANSACTION_NUMBER'] = this.tRANSACTIONNUMBER;
|
||||
data['NAME'] = this.nAME;
|
||||
data['VARCHAR2_VALUE'] = this.vARCHAR2VALUE;
|
||||
data['NUMBER_VALUE'] = this.nUMBERVALUE;
|
||||
data['DATE_VALUE'] = this.dATEVALUE;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
class GetApprovesList {
|
||||
String? aPPROVALSTATUS;
|
||||
String? aPPROVER;
|
||||
String? aPPROVERCATEGORY;
|
||||
int? aPPROVERORDERNUMBER;
|
||||
String? aPPROVERTYPE;
|
||||
String? eMPLOYEEIMAGE;
|
||||
int? fROMROWNUM;
|
||||
int? lINENO;
|
||||
int? nOOFROWS;
|
||||
String? pOSITIONTITLE;
|
||||
int? rOWNUM;
|
||||
int? tOROWNUM;
|
||||
|
||||
GetApprovesList(
|
||||
{this.aPPROVALSTATUS,
|
||||
this.aPPROVER,
|
||||
this.aPPROVERCATEGORY,
|
||||
this.aPPROVERORDERNUMBER,
|
||||
this.aPPROVERTYPE,
|
||||
this.eMPLOYEEIMAGE,
|
||||
this.fROMROWNUM,
|
||||
this.lINENO,
|
||||
this.nOOFROWS,
|
||||
this.pOSITIONTITLE,
|
||||
this.rOWNUM,
|
||||
this.tOROWNUM});
|
||||
|
||||
GetApprovesList.fromJson(Map<String, dynamic> json) {
|
||||
aPPROVALSTATUS = json['APPROVAL_STATUS'];
|
||||
aPPROVER = json['APPROVER'];
|
||||
aPPROVERCATEGORY = json['APPROVER_CATEGORY'];
|
||||
aPPROVERORDERNUMBER = json['APPROVER_ORDER_NUMBER'];
|
||||
aPPROVERTYPE = json['APPROVER_TYPE'];
|
||||
eMPLOYEEIMAGE = json['EMPLOYEE_IMAGE'];
|
||||
fROMROWNUM = json['FROM_ROW_NUM'];
|
||||
lINENO = json['LINE_NO'];
|
||||
nOOFROWS = json['NO_OF_ROWS'];
|
||||
pOSITIONTITLE = json['POSITION_TITLE'];
|
||||
rOWNUM = json['ROW_NUM'];
|
||||
tOROWNUM = json['TO_ROW_NUM'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['APPROVAL_STATUS'] = this.aPPROVALSTATUS;
|
||||
data['APPROVER'] = this.aPPROVER;
|
||||
data['APPROVER_CATEGORY'] = this.aPPROVERCATEGORY;
|
||||
data['APPROVER_ORDER_NUMBER'] = this.aPPROVERORDERNUMBER;
|
||||
data['APPROVER_TYPE'] = this.aPPROVERTYPE;
|
||||
data['EMPLOYEE_IMAGE'] = this.eMPLOYEEIMAGE;
|
||||
data['FROM_ROW_NUM'] = this.fROMROWNUM;
|
||||
data['LINE_NO'] = this.lINENO;
|
||||
data['NO_OF_ROWS'] = this.nOOFROWS;
|
||||
data['POSITION_TITLE'] = this.pOSITIONTITLE;
|
||||
data['ROW_NUM'] = this.rOWNUM;
|
||||
data['TO_ROW_NUM'] = this.tOROWNUM;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
class GetDefaultValueList {
|
||||
String? pIDCOLUMNNAME;
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
String? pVALUECOLUMNNAME;
|
||||
|
||||
GetDefaultValueList(
|
||||
{this.pIDCOLUMNNAME,
|
||||
this.pRETURNMSG,
|
||||
this.pRETURNSTATUS,
|
||||
this.pVALUECOLUMNNAME});
|
||||
|
||||
GetDefaultValueList.fromJson(Map<String, dynamic> json) {
|
||||
pIDCOLUMNNAME = json['P_ID_COLUMN_NAME'];
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
pVALUECOLUMNNAME = json['P_VALUE_COLUMN_NAME'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_ID_COLUMN_NAME'] = this.pIDCOLUMNNAME;
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
data['P_VALUE_COLUMN_NAME'] = this.pVALUECOLUMNNAME;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
class StartEitApprovalProcess {
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
|
||||
StartEitApprovalProcess({this.pRETURNMSG, this.pRETURNSTATUS});
|
||||
|
||||
StartEitApprovalProcess.fromJson(Map<String, dynamic> json) {
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
class SubmitEITTransactionList {
|
||||
String? pITEMKEY;
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
int? pTRANSACTIONID;
|
||||
|
||||
SubmitEITTransactionList(
|
||||
{this.pITEMKEY,
|
||||
this.pRETURNMSG,
|
||||
this.pRETURNSTATUS,
|
||||
this.pTRANSACTIONID});
|
||||
|
||||
SubmitEITTransactionList.fromJson(Map<String, dynamic> json) {
|
||||
pITEMKEY = json['P_ITEM_KEY'];
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
pTRANSACTIONID = json['P_TRANSACTION_ID'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_ITEM_KEY'] = this.pITEMKEY;
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
data['P_TRANSACTION_ID'] = this.pTRANSACTIONID;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
class ValidateEITTransactionList {
|
||||
String? pRETURNMSG;
|
||||
String? pRETURNSTATUS;
|
||||
|
||||
ValidateEITTransactionList({this.pRETURNMSG, this.pRETURNSTATUS});
|
||||
|
||||
ValidateEITTransactionList.fromJson(Map<String, dynamic> json) {
|
||||
pRETURNMSG = json['P_RETURN_MSG'];
|
||||
pRETURNSTATUS = json['P_RETURN_STATUS'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['P_RETURN_MSG'] = this.pRETURNMSG;
|
||||
data['P_RETURN_STATUS'] = this.pRETURNSTATUS;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final getFavoriteReplacements = getFavoriteReplacementsFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
GetFavoriteReplacements getFavoriteReplacementsFromJson(String str) => GetFavoriteReplacements.fromJson(json.decode(str));
|
||||
|
||||
String getFavoriteReplacementsToJson(GetFavoriteReplacements data) => json.encode(data.toJson());
|
||||
|
||||
class GetFavoriteReplacements {
|
||||
GetFavoriteReplacements({
|
||||
this.userName,
|
||||
this.employeeDisplayName,
|
||||
this.emailAddress,
|
||||
this.employeeImage,
|
||||
});
|
||||
|
||||
final String? userName;
|
||||
final String? employeeDisplayName;
|
||||
final String? emailAddress;
|
||||
final String? employeeImage;
|
||||
|
||||
factory GetFavoriteReplacements.fromJson(Map<String, dynamic> json) => GetFavoriteReplacements(
|
||||
userName: json["USER_NAME"] == null ? null : json["USER_NAME"],
|
||||
employeeDisplayName: json["EMPLOYEE_DISPLAY_NAME"] == null ? null : json["EMPLOYEE_DISPLAY_NAME"],
|
||||
emailAddress: json["EMAIL_ADDRESS"] == null ? null : json["EMAIL_ADDRESS"],
|
||||
employeeImage: json["EMPLOYEE_IMAGE"] == null ? null : json["EMPLOYEE_IMAGE"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"USER_NAME": userName == null ? null : userName,
|
||||
"EMPLOYEE_DISPLAY_NAME": employeeDisplayName == null ? null : employeeDisplayName,
|
||||
"EMAIL_ADDRESS": emailAddress == null ? null : emailAddress,
|
||||
"EMPLOYEE_IMAGE": employeeImage,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
class GetEitCollectionNotificationBodyList {
|
||||
GetEitCollectionNotificationBodyList({
|
||||
this.collectionNotification,
|
||||
});
|
||||
|
||||
final List<CollectionNotificationEit>? collectionNotification;
|
||||
|
||||
factory GetEitCollectionNotificationBodyList.fromJson(Map<String, dynamic> json) => GetEitCollectionNotificationBodyList(
|
||||
collectionNotification: json["Collection_Notification"] == null ? null : List<CollectionNotificationEit>.from(json["Collection_Notification"].map((x) => CollectionNotificationEit.fromJson(x))),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"Collection_Notification": collectionNotification == null ? null : List<dynamic>.from(collectionNotification!.map((x) => x.toJson())),
|
||||
};
|
||||
}
|
||||
|
||||
class CollectionNotificationEit {
|
||||
CollectionNotificationEit({
|
||||
this.action,
|
||||
this.applicationColumnName,
|
||||
this.datatype,
|
||||
this.dateValue,
|
||||
this.descFlexContextCode,
|
||||
this.descFlexName,
|
||||
this.displayFlag,
|
||||
this.extraInfoId,
|
||||
this.numberValue,
|
||||
this.prevSegmentValueDsp,
|
||||
this.segmentName,
|
||||
this.segmentPrompt,
|
||||
this.segmentSeqNum,
|
||||
this.segmentValueDsp,
|
||||
this.transactionNumber,
|
||||
this.varchar2Value,
|
||||
});
|
||||
|
||||
final String? action;
|
||||
final String? applicationColumnName;
|
||||
final String? datatype;
|
||||
final String? dateValue;
|
||||
final String? descFlexContextCode;
|
||||
final String? descFlexName;
|
||||
final String? displayFlag;
|
||||
final int? extraInfoId;
|
||||
final int? numberValue;
|
||||
final String? prevSegmentValueDsp;
|
||||
final String? segmentName;
|
||||
final String? segmentPrompt;
|
||||
final int? segmentSeqNum;
|
||||
final String? segmentValueDsp;
|
||||
final int? transactionNumber;
|
||||
final String? varchar2Value;
|
||||
|
||||
factory CollectionNotificationEit.fromJson(Map<String, dynamic> json) => CollectionNotificationEit(
|
||||
action: json["ACTION"] == null ? null : json["ACTION"],
|
||||
applicationColumnName: json["APPLICATION_COLUMN_NAME"] == null ? null : json["APPLICATION_COLUMN_NAME"],
|
||||
datatype: json["DATATYPE"] == null ? null : json["DATATYPE"],
|
||||
dateValue: json["DATE_VALUE"] == null ? null : json["DATE_VALUE"],
|
||||
descFlexContextCode: json["DESC_FLEX_CONTEXT_CODE"] == null ? null : json["DESC_FLEX_CONTEXT_CODE"],
|
||||
descFlexName: json["DESC_FLEX_NAME"] == null ? null : json["DESC_FLEX_NAME"],
|
||||
displayFlag: json["DISPLAY_FLAG"] == null ? null : json["DISPLAY_FLAG"],
|
||||
extraInfoId: json["EXTRA_INFO_ID"] == null ? null : json["EXTRA_INFO_ID"],
|
||||
numberValue: json["NUMBER_VALUE"] == null ? null : json["NUMBER_VALUE"],
|
||||
prevSegmentValueDsp: json["PREV_SEGMENT_VALUE_DSP"] == null ? null : json["PREV_SEGMENT_VALUE_DSP"],
|
||||
segmentName: json["SEGMENT_NAME"] == null ? null : json["SEGMENT_NAME"],
|
||||
segmentPrompt: json["SEGMENT_PROMPT"] == null ? null : json["SEGMENT_PROMPT"],
|
||||
segmentSeqNum: json["SEGMENT_SEQ_NUM"] == null ? null : json["SEGMENT_SEQ_NUM"],
|
||||
segmentValueDsp: json["SEGMENT_VALUE_DSP"] == null ? null : json["SEGMENT_VALUE_DSP"],
|
||||
transactionNumber: json["TRANSACTION_NUMBER"] == null ? null : json["TRANSACTION_NUMBER"],
|
||||
varchar2Value: json["VARCHAR2_VALUE"] == null ? null : json["VARCHAR2_VALUE"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"ACTION": action == null ? null : action,
|
||||
"APPLICATION_COLUMN_NAME": applicationColumnName == null ? null : applicationColumnName,
|
||||
"DATATYPE": datatype == null ? null : datatype,
|
||||
"DATE_VALUE": dateValue == null ? null : dateValue,
|
||||
"DESC_FLEX_CONTEXT_CODE": descFlexContextCode == null ? null : descFlexContextCode,
|
||||
"DESC_FLEX_NAME": descFlexName == null ? null : descFlexName,
|
||||
"DISPLAY_FLAG": displayFlag == null ? null : displayFlag,
|
||||
"EXTRA_INFO_ID": extraInfoId == null ? null : extraInfoId,
|
||||
"NUMBER_VALUE": numberValue == null ? null : numberValue,
|
||||
"PREV_SEGMENT_VALUE_DSP": prevSegmentValueDsp == null ? null : prevSegmentValueDsp,
|
||||
"SEGMENT_NAME": segmentName == null ? null : segmentName,
|
||||
"SEGMENT_PROMPT": segmentPrompt == null ? null : segmentPrompt,
|
||||
"SEGMENT_SEQ_NUM": segmentSeqNum == null ? null : segmentSeqNum,
|
||||
"SEGMENT_VALUE_DSP": segmentValueDsp == null ? null : segmentValueDsp,
|
||||
"TRANSACTION_NUMBER": transactionNumber == null ? null : transactionNumber,
|
||||
"VARCHAR2_VALUE": varchar2Value == null ? null : varchar2Value,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
class GetAbsenceCollectionNotificationBodyList {
|
||||
GetAbsenceCollectionNotificationBodyList({
|
||||
this.collectionNotification,
|
||||
});
|
||||
|
||||
final List<CollectionNotification>? collectionNotification;
|
||||
|
||||
factory GetAbsenceCollectionNotificationBodyList.fromJson(Map<String, dynamic> json) => GetAbsenceCollectionNotificationBodyList(
|
||||
collectionNotification: json["Collection_Notification"] == null ? null : List<CollectionNotification>.from(json["Collection_Notification"].map((x) => CollectionNotification.fromJson(x))),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"Collection_Notification": collectionNotification == null ? null : List<dynamic>.from(collectionNotification!.map((x) => x.toJson())),
|
||||
};
|
||||
}
|
||||
|
||||
class CollectionNotification {
|
||||
CollectionNotification({
|
||||
this.action,
|
||||
this.applicationColumnName,
|
||||
this.datatype,
|
||||
this.dateValue,
|
||||
this.descFlexContextCode,
|
||||
this.descFlexName,
|
||||
this.displayFlag,
|
||||
this.numberValue,
|
||||
this.prevSegmentValueDsp,
|
||||
this.segmentName,
|
||||
this.segmentPrompt,
|
||||
this.segmentSeqNum,
|
||||
this.segmentValueDsp,
|
||||
this.transactionNumber,
|
||||
this.varchar2Value,
|
||||
});
|
||||
|
||||
final String? action;
|
||||
final String? applicationColumnName;
|
||||
final String? datatype;
|
||||
final String? dateValue;
|
||||
final String? descFlexContextCode;
|
||||
final String? descFlexName;
|
||||
final String? displayFlag;
|
||||
final int? numberValue;
|
||||
final String? prevSegmentValueDsp;
|
||||
final String? segmentName;
|
||||
final String? segmentPrompt;
|
||||
final int? segmentSeqNum;
|
||||
final String? segmentValueDsp;
|
||||
final int? transactionNumber;
|
||||
final String? varchar2Value;
|
||||
|
||||
factory CollectionNotification.fromJson(Map<String, dynamic> json) => CollectionNotification(
|
||||
action: json["ACTION"] == null ? null : json["ACTION"],
|
||||
applicationColumnName: json["APPLICATION_COLUMN_NAME"] == null ? null :json["APPLICATION_COLUMN_NAME"],
|
||||
datatype: json["DATATYPE"] == null ? null : json["DATATYPE"],
|
||||
dateValue: json["DATE_VALUE"] == null ? null : json["DATE_VALUE"],
|
||||
descFlexContextCode: json["DESC_FLEX_CONTEXT_CODE"] == null ? null : json["DESC_FLEX_CONTEXT_CODE"],
|
||||
descFlexName: json["DESC_FLEX_NAME"] == null ? null : json["DESC_FLEX_NAME"],
|
||||
displayFlag: json["DISPLAY_FLAG"] == null ? null : json["DISPLAY_FLAG"],
|
||||
numberValue: json["NUMBER_VALUE"] == null ? null : json["NUMBER_VALUE"],
|
||||
prevSegmentValueDsp: json["PREV_SEGMENT_VALUE_DSP"] == null ? null : json["PREV_SEGMENT_VALUE_DSP"],
|
||||
segmentName: json["SEGMENT_NAME"] == null ? null : json["SEGMENT_NAME"],
|
||||
segmentPrompt: json["SEGMENT_PROMPT"] == null ? null : json["SEGMENT_PROMPT"],
|
||||
segmentSeqNum: json["SEGMENT_SEQ_NUM"] == null ? null : json["SEGMENT_SEQ_NUM"],
|
||||
segmentValueDsp: json["SEGMENT_VALUE_DSP"] == null ? null : json["SEGMENT_VALUE_DSP"],
|
||||
transactionNumber: json["TRANSACTION_NUMBER"] == null ? null : json["TRANSACTION_NUMBER"],
|
||||
varchar2Value: json["VARCHAR2_VALUE"] == null ? null : json["VARCHAR2_VALUE"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"ACTION": action == null ? null : action,
|
||||
"APPLICATION_COLUMN_NAME": applicationColumnName == null ? null : applicationColumnName,
|
||||
"DATATYPE": datatype == null ? null :datatype,
|
||||
"DATE_VALUE": dateValue == null ? null : dateValue,
|
||||
"DESC_FLEX_CONTEXT_CODE": descFlexContextCode == null ? null : descFlexContextCode,
|
||||
"DESC_FLEX_NAME": descFlexName == null ? null : descFlexName,
|
||||
"DISPLAY_FLAG": displayFlag == null ? null : displayFlag,
|
||||
"NUMBER_VALUE": numberValue == null ? null : numberValue,
|
||||
"PREV_SEGMENT_VALUE_DSP": prevSegmentValueDsp == null ? null : prevSegmentValueDsp,
|
||||
"SEGMENT_NAME": segmentName == null ? null : segmentName,
|
||||
"SEGMENT_PROMPT": segmentPrompt == null ? null : segmentPrompt,
|
||||
"SEGMENT_SEQ_NUM": segmentSeqNum == null ? null : segmentSeqNum,
|
||||
"SEGMENT_VALUE_DSP": segmentValueDsp == null ? null : segmentValueDsp,
|
||||
"TRANSACTION_NUMBER": transactionNumber == null ? null : transactionNumber,
|
||||
"VARCHAR2_VALUE": varchar2Value == null ? null : varchar2Value,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
class GetContactNotificationBodyList {
|
||||
GetContactNotificationBodyList({
|
||||
this.contactNotificationBody,
|
||||
|
||||
});
|
||||
|
||||
final List<ContactNotificationBody>? contactNotificationBody;
|
||||
|
||||
factory GetContactNotificationBodyList.fromJson(Map<String, dynamic> json) => GetContactNotificationBodyList(
|
||||
contactNotificationBody: json["ContactNotificationBody"] == null ? null : List<ContactNotificationBody>.from(json["ContactNotificationBody"].map((x) => ContactNotificationBody.fromJson(x))),
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"ContactNotificationBody": contactNotificationBody == null ? null : List<dynamic>.from(contactNotificationBody!.map((x) => x.toJson())),
|
||||
};
|
||||
}
|
||||
|
||||
class ContactNotificationBody {
|
||||
ContactNotificationBody({
|
||||
this.prevSegmentValueDsp,
|
||||
this.segmentPrompt,
|
||||
this.segmentValueDsp,
|
||||
this.updatedFlag,
|
||||
});
|
||||
|
||||
final String? prevSegmentValueDsp;
|
||||
final String? segmentPrompt;
|
||||
final String? segmentValueDsp;
|
||||
final String? updatedFlag;
|
||||
|
||||
factory ContactNotificationBody.fromJson(Map<String, dynamic> json) => ContactNotificationBody(
|
||||
prevSegmentValueDsp: json["PREV_SEGMENT_VALUE_DSP"] == null ? null : json["PREV_SEGMENT_VALUE_DSP"],
|
||||
segmentPrompt: json["SEGMENT_PROMPT"] == null ? null : json["SEGMENT_PROMPT"],
|
||||
segmentValueDsp: json["SEGMENT_VALUE_DSP"] == null ? null : json["SEGMENT_VALUE_DSP"],
|
||||
updatedFlag: json["UPDATED_FLAG"] == null ? null : json["UPDATED_FLAG"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"PREV_SEGMENT_VALUE_DSP": prevSegmentValueDsp == null ? null : prevSegmentValueDsp,
|
||||
"SEGMENT_PROMPT": segmentPrompt == null ? null : segmentPrompt,
|
||||
"SEGMENT_VALUE_DSP": segmentValueDsp == null ? null : segmentValueDsp,
|
||||
"UPDATED_FLAG": updatedFlag == null ? null : updatedFlag,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
class GetPhonesNotificationBodyList {
|
||||
GetPhonesNotificationBodyList({
|
||||
this.currentPhoneNumber,
|
||||
this.phoneType,
|
||||
this.phoneTypeMeaning,
|
||||
this.proposedPhoneNumber,
|
||||
});
|
||||
|
||||
final String? currentPhoneNumber;
|
||||
final String? phoneType;
|
||||
final String? phoneTypeMeaning;
|
||||
final String? proposedPhoneNumber;
|
||||
|
||||
factory GetPhonesNotificationBodyList.fromJson(Map<String, dynamic> json) => GetPhonesNotificationBodyList(
|
||||
currentPhoneNumber: json["CURRENT_PHONE_NUMBER"] == null ? null : json["CURRENT_PHONE_NUMBER"],
|
||||
phoneType: json["PHONE_TYPE"] == null ? null : json["PHONE_TYPE"],
|
||||
phoneTypeMeaning: json["PHONE_TYPE_MEANING"] == null ? null : json["PHONE_TYPE_MEANING"],
|
||||
proposedPhoneNumber: json["PROPOSED_PHONE_NUMBER"] == null ? null : json["PROPOSED_PHONE_NUMBER"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"CURRENT_PHONE_NUMBER": currentPhoneNumber == null ? null : currentPhoneNumber,
|
||||
"PHONE_TYPE": phoneType == null ? null : phoneType,
|
||||
"PHONE_TYPE_MEANING": phoneTypeMeaning == null ? null : phoneTypeMeaning,
|
||||
"PROPOSED_PHONE_NUMBER": proposedPhoneNumber == null ? null : proposedPhoneNumber,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
// To parse this JSON data, do
|
||||
//
|
||||
// final replacementList = replacementListFromJson(jsonString);
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
ReplacementList replacementListFromJson(String str) => ReplacementList.fromJson(json.decode(str));
|
||||
|
||||
String replacementListToJson(ReplacementList data) => json.encode(data.toJson());
|
||||
|
||||
class ReplacementList {
|
||||
ReplacementList({
|
||||
this.emailAddress,
|
||||
this.employeeDisplayName,
|
||||
this.employeeImage,
|
||||
this.fromRowNum,
|
||||
this.isFavorite,
|
||||
this.noOfRows,
|
||||
this.rowNum,
|
||||
this.toRowNum,
|
||||
this.userName,
|
||||
});
|
||||
|
||||
final String? emailAddress;
|
||||
final String? employeeDisplayName;
|
||||
final String? employeeImage;
|
||||
final int? fromRowNum;
|
||||
bool? isFavorite;
|
||||
final int? noOfRows;
|
||||
final int? rowNum;
|
||||
final int? toRowNum;
|
||||
final String? userName;
|
||||
|
||||
factory ReplacementList.fromJson(Map<String, dynamic> json) => ReplacementList(
|
||||
emailAddress: json["EMAIL_ADDRESS"] == null ? null : json["EMAIL_ADDRESS"],
|
||||
employeeDisplayName: json["EMPLOYEE_DISPLAY_NAME"] == null ? null : json["EMPLOYEE_DISPLAY_NAME"],
|
||||
employeeImage: json["EMPLOYEE_IMAGE"] == null ? null : json["EMPLOYEE_IMAGE"],
|
||||
fromRowNum: json["FROM_ROW_NUM"] == null ? null : json["FROM_ROW_NUM"],
|
||||
isFavorite: json["IsFavorite"] == null ? null : json["IsFavorite"],
|
||||
noOfRows: json["NO_OF_ROWS"] == null ? null : json["NO_OF_ROWS"],
|
||||
rowNum: json["ROW_NUM"] == null ? null : json["ROW_NUM"],
|
||||
toRowNum: json["TO_ROW_NUM"] == null ? null : json["TO_ROW_NUM"],
|
||||
userName: json["USER_NAME"] == null ? null : json["USER_NAME"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"EMAIL_ADDRESS": emailAddress == null ? null : emailAddress,
|
||||
"EMPLOYEE_DISPLAY_NAME": employeeDisplayName == null ? null : employeeDisplayName,
|
||||
"EMPLOYEE_IMAGE": employeeImage == null ? null : employeeImage,
|
||||
"FROM_ROW_NUM": fromRowNum == null ? null : fromRowNum,
|
||||
"IsFavorite": isFavorite == null ? null : isFavorite,
|
||||
"NO_OF_ROWS": noOfRows == null ? null : noOfRows,
|
||||
"ROW_NUM": rowNum == null ? null : rowNum,
|
||||
"TO_ROW_NUM": toRowNum == null ? null : toRowNum,
|
||||
"USER_NAME": userName == null ? null : userName,
|
||||
};
|
||||
}
|
||||
@ -0,0 +1,259 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:file_picker/file_picker.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/api/my_attendance_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/models/attachment_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_approves_list_model.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/simple_button.dart';
|
||||
import 'package:mohem_flutter_app/widgets/circular_avatar.dart';
|
||||
import 'package:mohem_flutter_app/widgets/dialogs/confirm_dialog.dart';
|
||||
import 'package:mohem_flutter_app/widgets/input_widget.dart';
|
||||
|
||||
class RequestSubmitScreenParams {
|
||||
String title;
|
||||
int transactionId;
|
||||
String pItemId;
|
||||
|
||||
RequestSubmitScreenParams(this.title, this.transactionId, this.pItemId);
|
||||
}
|
||||
|
||||
class RequestSubmitScreen extends StatefulWidget {
|
||||
RequestSubmitScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_RequestSubmitScreenState createState() {
|
||||
return _RequestSubmitScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _RequestSubmitScreenState extends State<RequestSubmitScreen> {
|
||||
RequestSubmitScreenParams? params;
|
||||
TextEditingController comments = TextEditingController();
|
||||
|
||||
List<GetApprovesList> approverList = [];
|
||||
List<File> attachmentFiles = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
void getApproverList() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
approverList = await MyAttendanceApiClient().getApproversList("SSHRMS", params!.transactionId);
|
||||
|
||||
Utils.hideLoading(context);
|
||||
setState(() {});
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
void submitRequest() async {
|
||||
try {
|
||||
Utils.showLoading(context);
|
||||
List<Map<String, dynamic>> list = [];
|
||||
if (attachmentFiles.isNotEmpty) {
|
||||
attachmentFiles.asMap().forEach((index, value) async {
|
||||
String type = value.path.split('.').last;
|
||||
String name = value.path.split('/').last;
|
||||
List<int> fileContent = await value.readAsBytes();
|
||||
String encodedFile = base64Encode(fileContent);
|
||||
list.add(AttachmentModel(
|
||||
attachmentID: index,
|
||||
pFILECONTENTTYPE: type,
|
||||
pFILENAME: name,
|
||||
pFILEDATA: encodedFile,
|
||||
pTRANSACTIONID: params!.transactionId,
|
||||
).toJson());
|
||||
});
|
||||
}
|
||||
await MyAttendanceApiClient().addAttachment(list);
|
||||
await MyAttendanceApiClient().startEitApprovalProcess(
|
||||
"SUBMIT",
|
||||
comments.text,
|
||||
params!.pItemId,
|
||||
params!.transactionId,
|
||||
);
|
||||
Utils.hideLoading(context);
|
||||
Utils.showToast(LocaleKeys.yourRequestHasBeenSubmittedForApprovals.tr(), longDuration: true);
|
||||
Navigator.of(context).popUntil((route) {
|
||||
return route.settings.name == AppRoutes.dashboard;
|
||||
});
|
||||
Navigator.pushNamed(context, AppRoutes.workList);
|
||||
} catch (ex) {
|
||||
Utils.hideLoading(context);
|
||||
Utils.handleException(ex, context, null);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (params == null) {
|
||||
params = ModalRoute.of(context)!.settings.arguments as RequestSubmitScreenParams;
|
||||
getApproverList();
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: params!.title,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
ListView(
|
||||
padding: const EdgeInsets.all(21).copyWith(top: 14),
|
||||
physics: const BouncingScrollPhysics(),
|
||||
children: [
|
||||
attachmentView("Attachments"),
|
||||
14.height,
|
||||
InputWidget(
|
||||
LocaleKeys.comments.tr(),
|
||||
LocaleKeys.writeComment.tr(),
|
||||
comments,
|
||||
isBackgroundEnable: true,
|
||||
lines: 3,
|
||||
onChange: (String note) {
|
||||
// this.note = note;
|
||||
},
|
||||
), //.objectContainerView(title: "Comments"),
|
||||
14.height,
|
||||
LocaleKeys.approversList.tr().toSectionHeading(),
|
||||
14.height,
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (cxt, index) {
|
||||
return approverView(cxt, approverList[index]);
|
||||
},
|
||||
separatorBuilder: (cxt, index) => 12.height,
|
||||
itemCount: approverList.length,
|
||||
)
|
||||
],
|
||||
).expanded,
|
||||
DefaultButton(
|
||||
LocaleKeys.submit.tr(),
|
||||
() {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (cxt) => ConfirmDialog(
|
||||
message: LocaleKeys.areYouSureYouWantToSubmit.tr(),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
submitRequest();
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
).insideContainer,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget approverView(BuildContext context, GetApprovesList approver) {
|
||||
return Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircularAvatar(url: approver.eMPLOYEEIMAGE, isImageBase64: true, height: 40, width: 40),
|
||||
9.width,
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
approver.aPPROVER!.toText16(),
|
||||
approver.pOSITIONTITLE!.toText12(color: MyColors.lightTextColor),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
).objectContainerView();
|
||||
}
|
||||
|
||||
Widget attachmentView(String title) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.only(top: 15, bottom: 15, left: 14, right: 14),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color(0xff000000).withOpacity(.05),
|
||||
blurRadius: 26,
|
||||
offset: const Offset(0, -3),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
title.toText16().expanded,
|
||||
6.width,
|
||||
SimpleButton("Add", () async {
|
||||
FilePickerResult? result = await FilePicker.platform.pickFiles(allowMultiple: true);
|
||||
if (result != null) {
|
||||
attachmentFiles = attachmentFiles + result.paths.map((path) => File(path!)).toList();
|
||||
attachmentFiles = attachmentFiles.toSet().toList();
|
||||
setState(() {});
|
||||
}
|
||||
}, fontSize: 14),
|
||||
],
|
||||
),
|
||||
if (attachmentFiles.isNotEmpty) 12.height,
|
||||
if (attachmentFiles.isNotEmpty)
|
||||
ListView.separated(
|
||||
shrinkWrap: true,
|
||||
physics: const NeverScrollableScrollPhysics(),
|
||||
itemBuilder: (cxt, index) {
|
||||
String fileName = attachmentFiles[index].path.split('/').last;
|
||||
|
||||
return Row(
|
||||
children: [
|
||||
fileName.toText13().expanded,
|
||||
6.width,
|
||||
IconButton(
|
||||
padding: EdgeInsets.zero,
|
||||
iconSize: 20,
|
||||
icon: const Icon(Icons.cancel_rounded),
|
||||
color: MyColors.redColor,
|
||||
constraints: const BoxConstraints(),
|
||||
onPressed: () async {
|
||||
attachmentFiles.removeAt(index);
|
||||
setState(() {});
|
||||
},
|
||||
)
|
||||
],
|
||||
);
|
||||
},
|
||||
separatorBuilder: (cxt, index) => 6.height,
|
||||
itemCount: attachmentFiles.length),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
import 'package:easy_localization/src/public_ext.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/api/profile_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/colors.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/config/routes.dart';
|
||||
import 'package:mohem_flutter_app/dialogs/otp_dialog.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_familyMembers_screen.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/dynamic_screens/dynamic_input_profile_screen.dart';
|
||||
import 'package:mohem_flutter_app/ui/profile/profile.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
|
||||
class DeleteFamilyMember extends StatefulWidget {
|
||||
const DeleteFamilyMember({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DeleteFamilyMemberState createState() => _DeleteFamilyMemberState();
|
||||
}
|
||||
|
||||
class _DeleteFamilyMemberState extends State<DeleteFamilyMember> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: "Dependents And Beneficiaries",
|
||||
),
|
||||
backgroundColor: MyColors.backgroundColor,
|
||||
bottomSheet: footer(),
|
||||
body:Column(
|
||||
children: [
|
||||
|
||||
],
|
||||
)
|
||||
|
||||
);
|
||||
}
|
||||
footer() {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
color: MyColors.gradiantEndColor,
|
||||
// margin: EdgeInsets.only(left: 50,right: 20),
|
||||
padding: EdgeInsets.only(left: 50,right: 50),
|
||||
child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
primary:MyColors.white,
|
||||
onSurface: MyColors.white,
|
||||
backgroundColor: MyColors.gradiantEndColor,
|
||||
),
|
||||
onPressed: (){},
|
||||
child: Text('Next',
|
||||
style: TextStyle(
|
||||
fontStyle: FontStyle.normal,
|
||||
fontSize: 16,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w600
|
||||
),),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/api/my_attendance_api_client.dart';
|
||||
import 'package:mohem_flutter_app/api/profile_api_client.dart';
|
||||
import 'package:mohem_flutter_app/classes/utils.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
import 'package:mohem_flutter_app/generated/locale_keys.g.dart';
|
||||
import 'package:mohem_flutter_app/models/dyanmic_forms/get_set_values_request_model.dart';
|
||||
import 'package:mohem_flutter_app/models/generic_response_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_eit_dff_structure_list_model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_basic_details.model.dart';
|
||||
import 'package:mohem_flutter_app/models/get_employee_contacts.model.dart';
|
||||
import 'package:mohem_flutter_app/models/profile/basic_details_cols_structions.dart';
|
||||
import 'package:mohem_flutter_app/models/profile/basic_details_dff_structure.dart';
|
||||
import 'package:mohem_flutter_app/ui/my_attendance/dynamic_screens/dynamic_listview_screen.dart';
|
||||
import 'package:mohem_flutter_app/widgets/app_bar_widget.dart';
|
||||
import 'package:mohem_flutter_app/widgets/button/default_button.dart';
|
||||
import 'package:mohem_flutter_app/widgets/dynamic_forms/dynamic_textfield_widget.dart';
|
||||
|
||||
class DynamicFamilyMembersParams {
|
||||
String title;
|
||||
//String dynamicId;
|
||||
// String uRL;
|
||||
// String requestID;
|
||||
// String colsURL;
|
||||
List<GetEmployeeContactsList>? getEmployeeContactsList;
|
||||
|
||||
DynamicFamilyMembersParams(this.title,
|
||||
{this.getEmployeeContactsList = const <GetEmployeeContactsList>[]});
|
||||
}
|
||||
|
||||
class DynamicFamilyMembersScreen extends StatefulWidget {
|
||||
DynamicFamilyMembersScreen({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
_DynamicFamilyMembersScreenState createState() {
|
||||
return _DynamicFamilyMembersScreenState();
|
||||
}
|
||||
}
|
||||
|
||||
class _DynamicFamilyMembersScreenState extends State<DynamicFamilyMembersScreen> {
|
||||
// GenericResponseModel? genericResponseModel;
|
||||
DynamicFamilyMembersParams? dynamicFamilyParams;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if(dynamicFamilyParams == null) {
|
||||
dynamicFamilyParams = ModalRoute.of(context)!.settings.arguments as DynamicFamilyMembersParams;
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.white,
|
||||
appBar: AppBarWidget(
|
||||
context,
|
||||
title: dynamicFamilyParams!.title,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -1,819 +0,0 @@
|
||||
// import 'package:flutter/cupertino.dart';
|
||||
// import 'package:flutter/material.dart';
|
||||
// import 'package:flutter_html/flutter_html.dart';
|
||||
// import 'package:flutter_svg/flutter_svg.dart';
|
||||
// import 'package:shared_preferences/shared_preferences.dart';
|
||||
// import 'package:tangheem/api/admin_configuration_api_client.dart';
|
||||
// import 'package:tangheem/api/tangheem_user_api_client.dart';
|
||||
// import 'package:tangheem/app_state/app_state.dart';
|
||||
// import 'package:tangheem/classes/colors.dart';
|
||||
// import 'package:tangheem/classes/consts.dart';
|
||||
// import 'package:tangheem/classes/utils.dart';
|
||||
// import 'package:tangheem/extensions/string_extensions.dart';
|
||||
// import 'package:tangheem/models/aya_tangheem_type_mapped.dart';
|
||||
// import 'package:tangheem/models/discussion_model.dart';
|
||||
// import 'package:tangheem/ui/dialogs/discussion_input_dialog.dart';
|
||||
// import 'package:tangheem/widgets/aya_player_widget.dart';
|
||||
// import 'package:tangheem/widgets/aya_record_widget.dart';
|
||||
// import 'package:tangheem/widgets/text_highlight_widget.dart';
|
||||
//
|
||||
// import 'login_screen.dart';
|
||||
//
|
||||
// class TangheemDetailParams {
|
||||
// final String selectedTangheemTypeId;
|
||||
// final List<AyatTangheemTypeMappedData> ayatTangheemTypeMappedDataList;
|
||||
//
|
||||
// TangheemDetailParams({@required this.selectedTangheemTypeId, @required this.ayatTangheemTypeMappedDataList});
|
||||
// }
|
||||
//
|
||||
// class TangheemDetailScreen extends StatefulWidget {
|
||||
// static const String routeName = "/tangheem_detail";
|
||||
// final TangheemDetailParams tangheemDetailParams;
|
||||
//
|
||||
// TangheemDetailScreen({Key key, this.tangheemDetailParams}) : super(key: key);
|
||||
//
|
||||
// @override
|
||||
// _TangheemDetailScreenState createState() {
|
||||
// return _TangheemDetailScreenState();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// class _TangheemDetailScreenState extends State<TangheemDetailScreen> {
|
||||
// GlobalKey _globalKey = GlobalKey();
|
||||
//
|
||||
// List<VoiceNote> voiceNoteList = [];
|
||||
//
|
||||
// List<AyatTangheemTypeMappedData> ayatTangheemTypeMappedDataList = [];
|
||||
//
|
||||
// List<AyatTangheemTypeMappedData> _dataList = [];
|
||||
//
|
||||
// int _discussionPage = -1;
|
||||
// AyatTangheemTypeMappedData _ayatTangheemTypeMappedFirstData;
|
||||
// DiscussionModel _discussionModel;
|
||||
//
|
||||
// bool showAyaPlayer = false;
|
||||
//
|
||||
// @override
|
||||
// void initState() {
|
||||
// super.initState();
|
||||
// ayatTangheemTypeMappedDataList = widget.tangheemDetailParams.ayatTangheemTypeMappedDataList;
|
||||
// _ayatTangheemTypeMappedFirstData = ayatTangheemTypeMappedDataList.first;
|
||||
// filterVoiceListData();
|
||||
// getPrefs();
|
||||
// getTangheemDiscussionAndRelatedData();
|
||||
// }
|
||||
//
|
||||
// double fontSize = 18;
|
||||
//
|
||||
// SharedPreferences prefs;
|
||||
//
|
||||
// void getPrefs() async {
|
||||
// prefs = await SharedPreferences.getInstance();
|
||||
// fontSize = (prefs.getInt(GlobalConsts.fontZoomSize) ?? 18) + 0.0;
|
||||
// setState(() {});
|
||||
// }
|
||||
//
|
||||
// String getArabicIndexWord(int index) {
|
||||
// if (index == 0) {
|
||||
// return 'الأولى';
|
||||
// } else if (index == 1) {
|
||||
// return 'الثانية';
|
||||
// } else if (index == 2) {
|
||||
// return 'الثالثة';
|
||||
// } else if (index == 3) {
|
||||
// return 'الرابعة';
|
||||
// } else if (index == 4) {
|
||||
// return 'الخامسة';
|
||||
// }
|
||||
// return "";
|
||||
// }
|
||||
//
|
||||
// void getTangheemDiscussionAndRelatedData() async {
|
||||
// Utils.showLoading(context);
|
||||
// try {
|
||||
// _discussionModel = await TangheemUserApiClient().getDiscussionByTangheemID(_discussionPage, widget.tangheemDetailParams.selectedTangheemTypeId);
|
||||
// if (!_ayatTangheemTypeMappedFirstData.ayatNumberInSurahs.contains(",")) {
|
||||
// _dataList = await getTangheemRelatedData();
|
||||
// }
|
||||
// Utils.hideLoading(context);
|
||||
// setState(() {});
|
||||
// } catch (ex) {
|
||||
// print(ex);
|
||||
// Utils.handleException(ex, context, null);
|
||||
// Utils.hideLoading(context);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Future<List<AyatTangheemTypeMappedData>> getTangheemRelatedData() async {
|
||||
// _dataList = [];
|
||||
// AyatTangheemTypeMapped _ayatTangheemTypeMapped =
|
||||
// await TangheemUserApiClient().getAyaTangheemTypeMappedRelated(_ayatTangheemTypeMappedFirstData.surahNo, _ayatTangheemTypeMappedFirstData.ayatNumberInSurahs);
|
||||
// _dataList = _ayatTangheemTypeMapped?.data ?? [];
|
||||
// if (_dataList.isNotEmpty) {
|
||||
// _dataList = _dataList.where((element) => element.tangheemTypeId != _ayatTangheemTypeMappedFirstData.tangheemTypeId)?.toList() ?? [];
|
||||
// var _tempList = _dataList.map((e) => e.tangheemTypeId).toList().toSet().toList();
|
||||
// var _dataTempList = <AyatTangheemTypeMappedData>[];
|
||||
// _tempList.forEach((_tempElement) {
|
||||
// _dataTempList.add(_dataList.firstWhere((element) {
|
||||
// return !element.ayatNumberInSurahs.contains(",") && (element.tangheemTypeId == _tempElement);
|
||||
// }, orElse: null));
|
||||
// });
|
||||
// _dataList = _dataTempList;
|
||||
// }
|
||||
//
|
||||
// return _dataList;
|
||||
// }
|
||||
//
|
||||
// void sendComment(String discussionText) async {
|
||||
// Utils.showLoading(context);
|
||||
// try {
|
||||
// await AdminConfigurationApiClient().addDiscussion(discussionText, _ayatTangheemTypeMappedFirstData.ayaTangheemTypeId);
|
||||
// Utils.showToast("تم إرسال التعليق ، سيكون مرئيًا بمجرد موافقة المسؤول عليه");
|
||||
// Utils.hideLoading(context);
|
||||
// Navigator.pop(context);
|
||||
// } catch (ex) {
|
||||
// Utils.handleException(ex, context, null);
|
||||
// Utils.hideLoading(context);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void filterVoiceListData() {
|
||||
// ayatTangheemTypeMappedDataList.forEach((element) {
|
||||
// voiceNoteList.addAll(element.voiceNote);
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// void dispose() {
|
||||
// super.dispose();
|
||||
// }
|
||||
//
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
// return Container(
|
||||
// padding: EdgeInsets.fromLTRB(16, 0, 16, 0),
|
||||
// width: double.infinity,
|
||||
// child: _ayatTangheemTypeMappedFirstData == null
|
||||
// ? SizedBox()
|
||||
// : Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: ListView(
|
||||
// physics: BouncingScrollPhysics(),
|
||||
// padding: EdgeInsets.only(bottom: 16, top: 16),
|
||||
// children: [
|
||||
// Text(
|
||||
// _ayatTangheemTypeMappedFirstData.tangheemTypeName ?? "",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20, color: ColorConsts.primaryBlue, height: 1.5),
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// Text(
|
||||
// _ayatTangheemTypeMappedFirstData.tangheemTypeDescription ?? "",
|
||||
// style: TextStyle(fontSize: 14, color: ColorConsts.textGrey, height: 1),
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(top: 4, bottom: 4),
|
||||
// padding: EdgeInsets.only(top: 8, bottom: 8, right: 4, left: 4),
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// ),
|
||||
// child: SingleChildScrollView(
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// child: RepaintBoundary(
|
||||
// key: _globalKey,
|
||||
// child: Material(
|
||||
// color: Colors.white,
|
||||
// child: ListView.builder(
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// shrinkWrap: true,
|
||||
// itemCount: ayatTangheemTypeMappedDataList.length > 5 ? 5 : ayatTangheemTypeMappedDataList.length,
|
||||
// itemBuilder: (context, index) {
|
||||
// var _ayatTangheemTypeMappedData = ayatTangheemTypeMappedDataList[index];
|
||||
// List<TangheemProperty> _tangheemInsideTableList = [];
|
||||
// List<TangheemProperty> _tangheemAboveTableList = [];
|
||||
// List<TangheemProperty> _tangheemBelowTableList = [];
|
||||
// List<String> _tangheemWords = [];
|
||||
//
|
||||
// List<TangheemProperty> _tempPropertyList = List<TangheemProperty>() + _ayatTangheemTypeMappedData?.property ?? [];
|
||||
// int firstIndex = _tempPropertyList.indexWhere((element) => element.isInsideTable);
|
||||
// if (firstIndex >= 0) {
|
||||
// var _tempPropertyListTop = _tempPropertyList.take(firstIndex);
|
||||
// _tempPropertyListTop = _tempPropertyListTop.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
||||
// _tangheemAboveTableList = _tempPropertyListTop;
|
||||
// _tempPropertyListTop.forEach((element) {
|
||||
// _tempPropertyList.remove(element);
|
||||
// });
|
||||
// var _tempPropertyListInside = _tempPropertyList?.where((element) => (element.isInsideTable))?.toList() ?? [];
|
||||
// _tempPropertyListInside.forEach((element) {
|
||||
// _tempPropertyList.remove(element);
|
||||
// });
|
||||
// _tempPropertyListInside = _tempPropertyListInside.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
||||
// _tangheemInsideTableList = _tempPropertyListInside;
|
||||
// var _tempPropertyListBelow = _tempPropertyList;
|
||||
// _tempPropertyListBelow = _tempPropertyListBelow.where((element) => (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
||||
// _tangheemBelowTableList = _tempPropertyListBelow;
|
||||
// }
|
||||
//
|
||||
// _tangheemWords.add(_ayatTangheemTypeMappedData.highlightText ?? "");
|
||||
// // _tangheemInsideTableList =
|
||||
// // _ayatTangheemTypeMappedData?.property?.where((element) => (element.isInsideTable) && (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
||||
// // _tangheemAboveTableList =
|
||||
// // _ayatTangheemTypeMappedData?.property?.where((element) => (!element.isInsideTable) && (element.propertyValue ?? "").isNotEmpty)?.toList() ?? [];
|
||||
// //
|
||||
// //
|
||||
//
|
||||
// var _tempTangheemIndexWord = "";
|
||||
// if (ayatTangheemTypeMappedDataList.length == 1) {
|
||||
// _tempTangheemIndexWord = "";
|
||||
// } else {
|
||||
// _tempTangheemIndexWord = getArabicIndexWord(index) + " ";
|
||||
// }
|
||||
//
|
||||
// return ListView(
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// shrinkWrap: true,
|
||||
// padding: EdgeInsets.all(4),
|
||||
// children: [
|
||||
// Row(
|
||||
// children: [
|
||||
// Text(
|
||||
// " جملة ${_ayatTangheemTypeMappedData.tangheemTypeName} $_tempTangheemIndexWord",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white, backgroundColor: ColorConsts.primaryBlue),
|
||||
// ),
|
||||
// Expanded(
|
||||
// child: Container(height: 2, color: ColorConsts.primaryBlue),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// TextHighLightWidget(
|
||||
// text: _ayatTangheemTypeMappedData.reverseAyatNumber() ?? "",
|
||||
// valueColor: ColorConsts.primaryBlue,
|
||||
// highlights: _tangheemWords,
|
||||
// highLightFontSize: fontSize,
|
||||
// style: TextStyle(
|
||||
// fontFamily: "UthmanicHafs",
|
||||
// fontSize: fontSize,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 16),
|
||||
// ListView.separated(
|
||||
// itemCount: _tangheemAboveTableList.length,
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// shrinkWrap: true,
|
||||
// separatorBuilder: (context, index) {
|
||||
// return Divider(
|
||||
// color: Colors.white,
|
||||
// height: 4,
|
||||
// thickness: 0,
|
||||
// );
|
||||
// },
|
||||
// itemBuilder: (context, index) {
|
||||
// return Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Container(
|
||||
// height: 40,
|
||||
// padding: EdgeInsets.only(left: 4, right: 8),
|
||||
// alignment: Alignment.centerRight,
|
||||
// child: Text(
|
||||
// _tangheemAboveTableList[index].propertyText,
|
||||
// maxLines: 1,
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, color: ColorConsts.secondaryOrange),
|
||||
// ),
|
||||
// color: ColorConsts.secondaryWhite,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(width: 4),
|
||||
// Expanded(
|
||||
// child: Container(
|
||||
// color: ColorConsts.secondaryWhite,
|
||||
// padding: EdgeInsets.all(4),
|
||||
// child: Container(
|
||||
// color: Colors.white,
|
||||
// padding: EdgeInsets.only(left: 4, right: 8),
|
||||
// // alignment: Alignment.centerRight,
|
||||
// child: Html(
|
||||
// data: _tangheemAboveTableList[index]?.propertyValue ?? "",
|
||||
// style: {
|
||||
// 'html': Style(textAlign: TextAlign.left),
|
||||
// },
|
||||
// ),
|
||||
//
|
||||
// // Text(
|
||||
// // _tangheemAboveTableList[index].propertyValue,
|
||||
// // maxLines: 1,
|
||||
// // style: TextStyle(
|
||||
// // color: Color(
|
||||
// // Utils.stringToHex(_tangheemAboveTableList[index].textColor),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// }),
|
||||
// if (_tangheemInsideTableList.isNotEmpty)
|
||||
// Container(
|
||||
// color: ColorConsts.primaryBlue,
|
||||
// margin: EdgeInsets.only(top: 8, bottom: 8),
|
||||
// padding: EdgeInsets.all(8),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Text(
|
||||
// "خط النبر و التنغيم ل${_ayatTangheemTypeMappedData.tangheemTypeName ?? ""}",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, color: Colors.white),
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// tangheemInsideTablePropertyView(_tangheemInsideTableList)
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// tangheemOutSideTablePropertyView(_tangheemBelowTableList)
|
||||
// ],
|
||||
// );
|
||||
// }),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 8),
|
||||
// discussionView(_discussionModel?.data ?? []),
|
||||
// if (_dataList.isNotEmpty)
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(top: 8),
|
||||
// padding: EdgeInsets.only(bottom: 20),
|
||||
// width: double.infinity,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// ),
|
||||
// child: Column(
|
||||
// children: [
|
||||
// Container(
|
||||
// height: 60,
|
||||
// width: double.infinity,
|
||||
// margin: EdgeInsets.only(bottom: 8),
|
||||
// alignment: Alignment.center,
|
||||
// decoration: BoxDecoration(
|
||||
// color: ColorConsts.primaryBlue,
|
||||
// borderRadius: BorderRadius.only(
|
||||
// topLeft: Radius.circular(8),
|
||||
// topRight: Radius.circular(8),
|
||||
// ),
|
||||
// ),
|
||||
// child: Text(
|
||||
// "قائمة الأساليب اللغوية في هذه الآية",
|
||||
// style: TextStyle(fontSize: 16, color: Colors.white),
|
||||
// ),
|
||||
// ),
|
||||
// ListView.separated(
|
||||
// padding: EdgeInsets.fromLTRB(4, 8, 4, 4),
|
||||
// shrinkWrap: true,
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// itemCount: _dataList.length,
|
||||
// separatorBuilder: (context, index) => SizedBox(height: 16),
|
||||
// itemBuilder: (context, index) {
|
||||
// return InkWell(
|
||||
// onTap: () {
|
||||
// List<AyatTangheemTypeMappedData> list = _dataList;
|
||||
// var removedData = list[index];
|
||||
// list.remove(removedData);
|
||||
// list.insert(0, removedData);
|
||||
// TangheemDetailParams tangheem = TangheemDetailParams(selectedTangheemTypeId: _dataList[index].ayaTangheemTypeId, ayatTangheemTypeMappedDataList: list);
|
||||
// Navigator.pushNamed(context, TangheemDetailScreen.routeName, arguments: tangheem);
|
||||
// },
|
||||
// child: Text(
|
||||
// _dataList[index].tangheemTypeName,
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16, color: ColorConsts.secondaryOrange, height: 1.5),
|
||||
// ),
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(height: 16),
|
||||
// AyaRecordWidget()
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// if (MediaQuery.of(context).orientation == Orientation.portrait)
|
||||
// AyaPlayerWidget(
|
||||
// surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "",
|
||||
// ayaTangheemTypeId: _ayatTangheemTypeMappedFirstData?.ayaTangheemTypeId ?? "",
|
||||
// globalKey: _globalKey,
|
||||
// ayaNo: _ayatTangheemTypeMappedFirstData?.ayahNo,
|
||||
// surahNo: _ayatTangheemTypeMappedFirstData?.surahNo,
|
||||
// voiceNoteList: voiceNoteList),
|
||||
// if (MediaQuery.of(context).orientation == Orientation.landscape)
|
||||
// Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Container(
|
||||
// height: 24,
|
||||
// margin: EdgeInsets.only(bottom: 8, top: 8),
|
||||
// // color: Colors.transparent,
|
||||
// child: TextButton(
|
||||
// onPressed: () {
|
||||
// setState(() {
|
||||
// showAyaPlayer = !showAyaPlayer;
|
||||
// });
|
||||
// },
|
||||
// child: Text(
|
||||
// showAyaPlayer ? "إخفاء التسجيلات" : "إظهار التسجيلات",
|
||||
// style: TextStyle(color: Colors.black87, fontSize: 12),
|
||||
// ),
|
||||
// style: TextButton.styleFrom(
|
||||
// backgroundColor: ColorConsts.gradientOrange,
|
||||
// primary: ColorConsts.primaryBlue,
|
||||
// padding: EdgeInsets.only(top: 4, bottom: 4, right: 8, left: 8),
|
||||
// textStyle: TextStyle(color: Colors.white, fontSize: 12),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// if (showAyaPlayer)
|
||||
// AyaPlayerWidget(
|
||||
// surahName: _ayatTangheemTypeMappedFirstData?.surahNameAr ?? "",
|
||||
// ayaTangheemTypeId: _ayatTangheemTypeMappedFirstData?.ayaTangheemTypeId ?? "",
|
||||
// ayaNo: _ayatTangheemTypeMappedFirstData?.ayahNo,
|
||||
// surahNo: _ayatTangheemTypeMappedFirstData?.surahNo,
|
||||
// globalKey: _globalKey,
|
||||
// voiceNoteList: voiceNoteList),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// Widget nextOptionButton(String icon, String text, VoidCallback onPressed) {
|
||||
// return InkWell(
|
||||
// onTap: onPressed,
|
||||
// child: onPressed == null
|
||||
// ? SizedBox()
|
||||
// : Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// SvgPicture.asset(icon, height: 12, width: 12),
|
||||
// SizedBox(width: 4),
|
||||
// Text(
|
||||
// text,
|
||||
// style: TextStyle(color: ColorConsts.textGrey),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// Widget previousOptionButton(String icon, String text, VoidCallback onPressed) {
|
||||
// return InkWell(
|
||||
// onTap: onPressed,
|
||||
// child: onPressed == null
|
||||
// ? SizedBox()
|
||||
// : Row(
|
||||
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Text(
|
||||
// text,
|
||||
// style: TextStyle(color: ColorConsts.textGrey),
|
||||
// ),
|
||||
// SizedBox(width: 4),
|
||||
// SvgPicture.asset(icon, height: 12, width: 12),
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// Widget tangheemOutSideTablePropertyView(List<TangheemProperty> tangheemPropertyList) {
|
||||
// return ListView.separated(
|
||||
// itemCount: tangheemPropertyList.length,
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// shrinkWrap: true,
|
||||
// separatorBuilder: (context, index) {
|
||||
// return Divider(
|
||||
// color: Colors.white,
|
||||
// height: 4,
|
||||
// thickness: 0,
|
||||
// );
|
||||
// },
|
||||
// itemBuilder: (context, index) {
|
||||
// return Row(
|
||||
// children: [
|
||||
// Expanded(
|
||||
// child: Container(
|
||||
// height: 40,
|
||||
// padding: EdgeInsets.only(left: 4, right: 8),
|
||||
// alignment: Alignment.centerRight,
|
||||
// child: Text(
|
||||
// tangheemPropertyList[index].propertyText,
|
||||
// maxLines: 1,
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, color: ColorConsts.secondaryOrange),
|
||||
// ),
|
||||
// color: ColorConsts.secondaryWhite,
|
||||
// ),
|
||||
// ),
|
||||
// SizedBox(width: 4),
|
||||
// Expanded(
|
||||
// child: Container(
|
||||
// color: ColorConsts.secondaryWhite,
|
||||
// padding: EdgeInsets.all(4),
|
||||
// child: Container(
|
||||
// color: Colors.white,
|
||||
// padding: EdgeInsets.only(left: 4, right: 8),
|
||||
// // alignment: Alignment.centerRight,
|
||||
// child: Html(
|
||||
// data: tangheemPropertyList[index]?.propertyValue ?? "",
|
||||
// style: {
|
||||
// 'html': Style(textAlign: TextAlign.left),
|
||||
// },
|
||||
// ),
|
||||
// // Text(
|
||||
// // tangheemPropertyList[index].propertyValue,
|
||||
// // maxLines: 1,
|
||||
// // style: TextStyle(
|
||||
// // color: Color(
|
||||
// // Utils.stringToHex(tangheemPropertyList[index].textColor),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// });
|
||||
// }
|
||||
//
|
||||
// Widget tangheemInsideTablePropertyView(List<TangheemProperty> tangheemPropertyList) {
|
||||
// return Container(
|
||||
// color: Colors.white,
|
||||
// padding: EdgeInsets.all(2),
|
||||
// child: Row(
|
||||
// children: [
|
||||
// for (var property in tangheemPropertyList)
|
||||
// Expanded(
|
||||
// child: Container(
|
||||
// // color: ColorConsts.secondaryWhite,
|
||||
// // padding: EdgeInsets.all(8),
|
||||
// margin: EdgeInsets.only(left: 2, right: 2),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Container(
|
||||
// color: ColorConsts.secondaryWhite,
|
||||
// //height: 30,
|
||||
// alignment: Alignment.center,
|
||||
// padding: EdgeInsets.only(left: 2, right: 4),
|
||||
// width: double.infinity,
|
||||
// child: Text(
|
||||
// property.propertyText ?? "",
|
||||
// // maxLines: 1,
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 12, color: ColorConsts.secondaryOrange),
|
||||
// ),
|
||||
// ),
|
||||
// Container(width: double.infinity, height: 4, color: Colors.white),
|
||||
// Container(
|
||||
// color: ColorConsts.secondaryWhite,
|
||||
// padding: EdgeInsets.all(4),
|
||||
// child: Container(
|
||||
// color: Colors.white,
|
||||
// padding: EdgeInsets.only(left: 2, right: 4),
|
||||
// width: double.infinity,
|
||||
// child: Html(
|
||||
// data: property.propertyValue ?? "",
|
||||
// style: {
|
||||
// 'html': Style(textAlign: TextAlign.left),
|
||||
// },
|
||||
// ),
|
||||
//
|
||||
// // Text(
|
||||
// // property.propertyValue ?? "",
|
||||
// // maxLines: 1,
|
||||
// // style: TextStyle(
|
||||
// // fontSize: 12,
|
||||
// // color: Color(
|
||||
// // Utils.stringToHex(property.textColor),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// )
|
||||
//
|
||||
// //@todo sikander :commented these line for later discussion
|
||||
// // ListView.separated(
|
||||
// // itemCount: tangheemPropertyList.length,
|
||||
// // physics: NeverScrollableScrollPhysics(),
|
||||
// // padding: EdgeInsets.zero,
|
||||
// // shrinkWrap: true,
|
||||
// // separatorBuilder: (context, index) {
|
||||
// // return Divider(
|
||||
// // color: Colors.white,
|
||||
// // height: 1,
|
||||
// // thickness: 0,
|
||||
// // );
|
||||
// // },
|
||||
// // itemBuilder: (context, index) {
|
||||
// // return Container(
|
||||
// // color: ColorConsts.secondaryWhite,
|
||||
// // padding: EdgeInsets.all(8),
|
||||
// // child: Column(
|
||||
// // mainAxisSize: MainAxisSize.min,
|
||||
// // crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// // mainAxisAlignment: MainAxisAlignment.center,
|
||||
// // children: [
|
||||
// // Text(
|
||||
// // tangheemPropertyList[index].propertyText ?? "",
|
||||
// // style: TextStyle(fontWeight: FontWeight.bold, fontSize: 12, color: ColorConsts.secondaryOrange),
|
||||
// // ),
|
||||
// // SizedBox(height: 4),
|
||||
// // Text(
|
||||
// // tangheemPropertyList[index].propertyValue ?? "",
|
||||
// // style: TextStyle(
|
||||
// // fontSize: 12,
|
||||
// // color: Color(
|
||||
// // Utils.stringToHex(tangheemPropertyList[index].textColor),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// // ],
|
||||
// // ),
|
||||
// // );
|
||||
// // },
|
||||
// // ),
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// Widget discussionView(List<DiscussionModelData> _discussionList) {
|
||||
// _discussionList = _discussionList.where((element) => element.status.toLowerCase() == "Accept".toLowerCase()).toList();
|
||||
// return Stack(
|
||||
// alignment: Alignment.bottomCenter,
|
||||
// children: [
|
||||
// Container(
|
||||
// margin: EdgeInsets.only(top: 4, bottom: 25),
|
||||
// padding: EdgeInsets.all(8),
|
||||
// width: double.infinity,
|
||||
// decoration: BoxDecoration(
|
||||
// color: Colors.white,
|
||||
// borderRadius: BorderRadius.circular(8),
|
||||
// ),
|
||||
// child: _discussionList.length > 0
|
||||
// ? ListView.separated(
|
||||
// padding: EdgeInsets.only(top: 4, bottom: 24),
|
||||
// shrinkWrap: true,
|
||||
// physics: NeverScrollableScrollPhysics(),
|
||||
// itemCount: _discussionList.length,
|
||||
// separatorBuilder: (context, index) => SizedBox(height: 16),
|
||||
// itemBuilder: (context, index) {
|
||||
// return Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Row(
|
||||
// children: [
|
||||
// SvgPicture.asset(
|
||||
// "assets/icons/chat_user.svg",
|
||||
// width: 60,
|
||||
// height: 60,
|
||||
// ),
|
||||
// SizedBox(width: 8),
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// mainAxisAlignment: MainAxisAlignment.center,
|
||||
// children: [
|
||||
// Text(
|
||||
// "تعليق على الآية ${_ayatTangheemTypeMappedFirstData.ayatNumberInSurahs}",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16, color: ColorConsts.primaryBlue, height: 1.5),
|
||||
// ),
|
||||
// SizedBox(height: 4),
|
||||
// Directionality(
|
||||
// textDirection: TextDirection.ltr,
|
||||
// child: Text(
|
||||
// _discussionList[index].date.toFormattedDate(),
|
||||
// style: TextStyle(fontSize: 12, color: ColorConsts.textGrey, height: 1),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// SizedBox(height: 4),
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Text(
|
||||
// "تعليق من: " + _discussionList[index].userName,
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14, color: ColorConsts.primaryBlue, height: 1.5),
|
||||
// ),
|
||||
// Text(
|
||||
// _discussionList[index].discussionText,
|
||||
// style: TextStyle(fontSize: 14, color: ColorConsts.textGrey, height: 1.4),
|
||||
// ),
|
||||
// if ((_discussionList[index]?.adminResponse ?? "").isNotEmpty) SizedBox(height: 4),
|
||||
// if ((_discussionList[index]?.adminResponse ?? "").isNotEmpty)
|
||||
// Text(
|
||||
// "رد من المسؤول: " + _discussionList[index].adminResponse,
|
||||
// style: TextStyle(fontSize: 14, color: ColorConsts.textGrey, height: 1.4),
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// ],
|
||||
// );
|
||||
// },
|
||||
// )
|
||||
// : Text(
|
||||
// "لا يوجد تعليقات",
|
||||
// style: TextStyle(fontSize: 12, color: ColorConsts.primaryBlue, height: 1.5),
|
||||
// ),
|
||||
// ),
|
||||
// Positioned(
|
||||
// bottom: 0,
|
||||
// child: InkWell(
|
||||
// borderRadius: BorderRadius.circular(30),
|
||||
// onTap: () async {
|
||||
// if (!AppState().isUserLogin) {
|
||||
// Widget cancelButton = FlatButton(
|
||||
// child: Text("أرغب بالتسجيل"),
|
||||
// onPressed: () async {
|
||||
// Navigator.pop(context);
|
||||
// await Navigator.pushNamed(context, LoginScreen.routeName);
|
||||
// if (!AppState().isUserLogin) {
|
||||
// return;
|
||||
// }
|
||||
// },
|
||||
// );
|
||||
// Widget continueButton = FlatButton(
|
||||
// child: Text("استمرار كضيف"),
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context);
|
||||
// return;
|
||||
// },
|
||||
// );
|
||||
//
|
||||
// AlertDialog alert = AlertDialog(
|
||||
// content: Text("هذه الخاصية متاحه فقط للأعضاء المسجلين"),
|
||||
// actions: [
|
||||
// cancelButton,
|
||||
// continueButton,
|
||||
// ],
|
||||
// );
|
||||
//
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return alert;
|
||||
// },
|
||||
// );
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// barrierColor: ColorConsts.secondaryWhite.withOpacity(0.8),
|
||||
// builder: (BuildContext context) => DiscussionInputDialog(onCommentPress: (comment) {
|
||||
// sendComment(comment);
|
||||
// }),
|
||||
// );
|
||||
// },
|
||||
// child: Container(
|
||||
// height: 40,
|
||||
// padding: EdgeInsets.only(left: 24, right: 24),
|
||||
// alignment: Alignment.centerRight,
|
||||
// decoration: BoxDecoration(
|
||||
// borderRadius: BorderRadius.circular(30),
|
||||
// color: ColorConsts.gradientPink,
|
||||
// gradient: LinearGradient(
|
||||
// stops: [0.0, 0.5],
|
||||
// begin: Alignment.topCenter,
|
||||
// end: Alignment.bottomCenter,
|
||||
// colors: [ColorConsts.gradientPink, ColorConsts.gradientOrange],
|
||||
// ),
|
||||
// ),
|
||||
// child: Text(
|
||||
// "إضافة تعليق",
|
||||
// style: TextStyle(fontWeight: FontWeight.bold, fontSize: 14, color: Colors.white, height: 1.5),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -0,0 +1,65 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
||||
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
||||
|
||||
import '../../../classes/colors.dart';
|
||||
import '../../../widgets/radio/show_radio.dart';
|
||||
|
||||
class SearchOptionsSheet extends StatelessWidget {
|
||||
String selectedType;
|
||||
Function(String) onSelection;
|
||||
|
||||
SearchOptionsSheet(this.selectedType, {required this.onSelection});
|
||||
|
||||
List<String> searchOptions = [
|
||||
"Workflow",
|
||||
"Favorites",
|
||||
"Employee ID",
|
||||
"Employee Email",
|
||||
"Employee Name",
|
||||
];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(left: 20, right: 20, top: 8, bottom: 8),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
"Search By".toText16(),
|
||||
12.height,
|
||||
ListView.separated(
|
||||
itemBuilder: (context, index) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(top: 12, bottom: 12),
|
||||
child: ShowRadio(
|
||||
title: searchOptions[index],
|
||||
value: searchOptions[index],
|
||||
groupValue: selectedType,
|
||||
selectedColor: MyColors.gradiantStartColor,
|
||||
),
|
||||
).onPress(() {
|
||||
onSelection(searchOptions[index]);
|
||||
Navigator.pop(context);
|
||||
});
|
||||
},
|
||||
separatorBuilder: (context, index) {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 1,
|
||||
color: Color(0xffE3E3E3),
|
||||
);
|
||||
},
|
||||
itemCount: searchOptions.length,
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||