Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sai Srinivas
GEN_ERP_2025
Commits
b2b7af29
Commit
b2b7af29
authored
Aug 06, 2025
by
Sai Srinivas
Browse files
05-08-2025 By Sai Srinivas
Service Inventory and Gen Tracker Modules.
parent
2c3ccbb5
Changes
20
Expand all
Show whitespace changes
Inline
Side-by-side
assets/svg/service/inventory_det_ic.svg
0 → 100644
View file @
b2b7af29
<svg
width=
"21"
height=
"21"
viewBox=
"0 0 21 21"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M16.1086 2.14788C16.7829 2.45791 17.4493 2.78539 18.0922 3.12492C19.3438 3.7811 20.0909 5.11152 20.1228 6.43291C20.203 9.0777 20.203 11.7221 20.1228 14.3661C20.0909 15.6905 19.3432 17.0149 18.0922 17.6741C16.0328 18.7649 13.7723 19.6968 11.7026 20.4108C10.8659 20.6979 9.95733 20.6979 9.12062 20.4108C7.05095 19.6968 4.78984 18.7643 2.73039 17.6741C1.47944 17.0173 0.732356 15.6875 0.699848 14.3661C0.619582 11.7213 0.619582 9.0769 0.699848 6.43291C0.732356 5.10851 1.47944 3.78411 2.73039 3.12492C4.78984 2.0341 7.05095 1.1022 9.12062 0.38823C9.95733 0.101059 10.8659 0.101059 11.7026 0.38823C12.3227 0.603746 12.9566 0.834914 13.5971 1.08474L16.1086 2.14788Z"
fill=
"url(#paint0_linear_539_4114)"
/>
<path
d=
"M16.1086 2.14788C16.7829 2.45791 17.4493 2.78539 18.0922 3.12492C19.3438 3.7811 20.0909 5.11152 20.1228 6.43291C20.203 9.0777 20.203 11.7221 20.1228 14.3661C20.0909 15.6905 19.3432 17.0149 18.0922 17.6741C16.0328 18.7649 13.7723 19.6968 11.7026 20.4108C10.8659 20.6979 9.95733 20.6979 9.12062 20.4108C7.05095 19.6968 4.78984 18.7643 2.73039 17.6741C1.47944 17.0173 0.732356 15.6875 0.699848 14.3661C0.619582 11.7213 0.619582 9.0769 0.699848 6.43291C0.732356 5.10851 1.47944 3.78411 2.73039 3.12492C4.78984 2.0341 7.05095 1.1022 9.12062 0.38823C9.95733 0.101059 10.8659 0.101059 11.7026 0.38823C12.3227 0.603746 12.9566 0.834914 13.5971 1.08474L16.1086 2.14788Z"
fill=
"url(#paint1_linear_539_4114)"
/>
<path
d=
"M16.1084 2.14772C13.0742 3.12277 10.0943 4.25916 7.18135 5.55203C6.87898 5.68566 6.61992 5.90107 6.43337 6.17399C6.24681 6.44691 6.14017 6.7665 6.12545 7.09676C6.07668 8.6132 6.06163 10.1814 6.0815 11.7292C6.08318 11.7746 6.07021 11.8195 6.0445 11.857C6.0188 11.8946 5.9817 11.9229 5.93869 11.9378C5.89568 11.9527 5.84903 11.9534 5.80559 11.9398C5.76216 11.9262 5.72424 11.899 5.69742 11.8622C5.36512 11.4372 5.03884 11.0146 4.72158 10.598C4.69809 10.5657 4.66341 10.5434 4.62432 10.5354C4.58524 10.5274 4.54457 10.5343 4.51028 10.5546C4.26306 10.7015 4.02045 10.8464 3.78246 10.9893C3.75058 11.007 3.7145 11.0158 3.67804 11.0148C3.64157 11.0137 3.60606 11.0029 3.57525 10.9833C3.54444 10.9638 3.51947 10.9363 3.50297 10.9038C3.48646 10.8712 3.47903 10.8349 3.48146 10.7985C3.47364 9.25553 3.51216 7.70839 3.59464 6.20881C3.61719 5.88879 3.72336 5.5803 3.90253 5.31418C4.0817 5.04806 4.3276 4.83365 4.61563 4.69237C7.63225 3.20182 10.8511 1.98337 13.5969 1.08398C14.453 1.39206 15.2914 1.74718 16.1084 2.14772Z"
fill=
"url(#paint2_linear_539_4114)"
/>
<path
d=
"M15.619 11.4668C14.7132 11.4668 13.8279 11.7354 13.0748 12.2386C12.3217 12.7418 11.7347 13.457 11.3881 14.2937C11.0415 15.1305 10.9508 16.0513 11.1275 16.9396C11.3042 17.8279 11.7404 18.6439 12.3808 19.2843C13.0213 19.9248 13.8372 20.3609 14.7256 20.5376C15.6139 20.7143 16.5347 20.6236 17.3714 20.277C18.2082 19.9304 18.9234 19.3435 19.4266 18.5904C19.9298 17.8373 20.1984 16.9519 20.1984 16.0462C20.1982 14.8317 19.7157 13.667 18.8569 12.8083C17.9982 11.9495 16.8335 11.467 15.619 11.4668Z"
fill=
"url(#paint3_linear_539_4114)"
/>
<path
d=
"M18.2094 15.3044L15.4679 18.1862C15.3931 18.2646 15.3032 18.3271 15.2037 18.37C15.1042 18.413 14.9971 18.4354 14.8887 18.436H14.8845C14.7768 18.436 14.6702 18.4144 14.571 18.3724C14.4719 18.3304 14.3821 18.2689 14.3072 18.1916L12.851 16.6914C12.7022 16.5382 12.6205 16.3322 12.6236 16.1187C12.6268 15.9052 12.7146 15.7018 12.8678 15.553C13.021 15.4043 13.227 15.3225 13.4405 15.3257C13.654 15.3289 13.8575 15.4167 14.0062 15.5699L14.8791 16.4693L17.0463 14.1943C17.195 14.046 17.3957 13.9615 17.6057 13.959C17.8157 13.9565 18.0184 14.0362 18.1705 14.1809C18.3226 14.3257 18.4122 14.5242 18.4202 14.734C18.4281 14.9439 18.3538 15.1486 18.213 15.3044H18.2094Z"
fill=
"url(#paint4_linear_539_4114)"
/>
<defs>
<linearGradient
id=
"paint0_linear_539_4114"
x1=
"18.0061"
y1=
"17.9943"
x2=
"2.81708"
y2=
"2.80466"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#FE7838"
/>
<stop
offset=
"0.54"
stop-color=
"#FE7636"
/>
<stop
offset=
"1"
stop-color=
"#FFAD8A"
/>
</linearGradient>
<linearGradient
id=
"paint1_linear_539_4114"
x1=
"0.639245"
y1=
"10.3993"
x2=
"20.183"
y2=
"10.3993"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#0080DE"
/>
<stop
offset=
"0.6"
stop-color=
"#49BCFF"
/>
<stop
offset=
"1"
stop-color=
"#61CAFF"
/>
</linearGradient>
<linearGradient
id=
"paint2_linear_539_4114"
x1=
"10.7663"
y1=
"7.49047"
x2=
"6.22357"
y2=
"2.94778"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#FFDDCE"
/>
<stop
offset=
"0.57"
stop-color=
"white"
/>
<stop
offset=
"1"
stop-color=
"white"
/>
</linearGradient>
<linearGradient
id=
"paint3_linear_539_4114"
x1=
"18.8571"
y1=
"19.2844"
x2=
"12.1069"
y2=
"12.5347"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#13B601"
/>
<stop
offset=
"0.52"
stop-color=
"#13B601"
/>
<stop
offset=
"1"
stop-color=
"#CBF4B4"
/>
</linearGradient>
<linearGradient
id=
"paint4_linear_539_4114"
x1=
"16.8573"
y1=
"16.7938"
x2=
"14.241"
y2=
"14.1769"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#CBF4B4"
/>
<stop
offset=
"0.57"
stop-color=
"white"
/>
<stop
offset=
"1"
stop-color=
"white"
/>
</linearGradient>
</defs>
</svg>
assets/svg/service/stock_issue_ic.svg
0 → 100644
View file @
b2b7af29
<svg
width=
"22"
height=
"22"
viewBox=
"0 0 22 22"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M10.6 0C4.74598 0 0 4.74557 0 10.6C0 16.4544 4.74598 21.2 10.6 21.2C16.454 21.2 21.2 16.454 21.2 10.6C21.2 4.74598 16.454 0 10.6 0ZM15.6135 9.42572C15.7677 9.42572 15.9204 9.45609 16.0628 9.51511C16.2053 9.57412 16.3348 9.66062 16.4438 9.76966C16.5529 9.8787 16.6394 10.0082 16.6984 10.1506C16.7574 10.2931 16.7878 10.4458 16.7878 10.6C16.7878 10.7542 16.7574 10.9069 16.6984 11.0494C16.6394 11.1918 16.5529 11.3213 16.4438 11.4303C16.3348 11.5394 16.2053 11.6259 16.0628 11.6849C15.9204 11.7439 15.7677 11.7743 15.6135 11.7743H5.58653C5.27509 11.7743 4.97641 11.6506 4.75619 11.4303C4.53597 11.2101 4.41225 10.9114 4.41225 10.6C4.41225 10.2886 4.53597 9.98988 4.75619 9.76966C4.97641 9.54944 5.27509 9.42572 5.58653 9.42572H15.6135Z"
fill=
"url(#paint0_linear_541_4121)"
/>
<defs>
<linearGradient
id=
"paint0_linear_541_4121"
x1=
"0"
y1=
"10.6"
x2=
"21.2"
y2=
"10.6"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#CC3232"
/>
<stop
offset=
"0.6"
stop-color=
"#EF5A5A"
/>
<stop
offset=
"1"
stop-color=
"#F47E67"
/>
</linearGradient>
</defs>
</svg>
assets/svg/service/stock_recieve_ic.svg
0 → 100644
View file @
b2b7af29
<svg
width=
"22"
height=
"22"
viewBox=
"0 0 22 22"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M10.5984 0C4.74527 0 0 4.74485 0 10.5984C0 16.4519 4.74527 21.1968 10.5984 21.1968C16.4515 21.1968 21.1968 16.4515 21.1968 10.5984C21.1968 4.74527 16.4515 0 10.5984 0ZM16.7852 10.5984C16.7852 10.7526 16.7548 10.9053 16.6958 11.0477C16.6368 11.1902 16.5504 11.3196 16.4413 11.4286C16.3323 11.5376 16.2029 11.6241 16.0604 11.6831C15.918 11.7421 15.7653 11.7725 15.6111 11.7725H11.7725V15.6111C11.7725 15.9225 11.6488 16.2211 11.4286 16.4413C11.2084 16.6615 10.9098 16.7852 10.5984 16.7852C10.287 16.7852 9.98837 16.6615 9.76818 16.4413C9.548 16.2211 9.4243 15.9225 9.4243 15.6111V11.7725H5.58569C5.2743 11.7725 4.97566 11.6488 4.75547 11.4286C4.53528 11.2084 4.41158 10.9098 4.41158 10.5984C4.41158 10.287 4.53528 9.98837 4.75547 9.76818C4.97566 9.548 5.2743 9.4243 5.58569 9.4243H9.4243V5.58569C9.4243 5.2743 9.548 4.97566 9.76818 4.75547C9.98837 4.53528 10.287 4.41158 10.5984 4.41158C10.9098 4.41158 11.2084 4.53528 11.4286 4.75547C11.6488 4.97566 11.7725 5.2743 11.7725 5.58569V9.4243H15.6111C15.9225 9.4243 16.2211 9.548 16.4413 9.76818C16.6615 9.98837 16.7852 10.287 16.7852 10.5984Z"
fill=
"url(#paint0_linear_541_4122)"
/>
<defs>
<linearGradient
id=
"paint0_linear_541_4122"
x1=
"0"
y1=
"10.5984"
x2=
"21.1968"
y2=
"10.5984"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#ED6C14"
/>
<stop
offset=
"0.6"
stop-color=
"#FF9045"
/>
<stop
offset=
"1"
stop-color=
"#FFB54A"
/>
</linearGradient>
</defs>
</svg>
lib/Models/loadGeneratorDetailsResponse.dart
View file @
b2b7af29
...
@@ -238,6 +238,7 @@ class ComplaintList {
...
@@ -238,6 +238,7 @@ class ComplaintList {
String
?
complaintId
;
String
?
complaintId
;
String
?
createdBy
;
String
?
createdBy
;
String
?
complaintTypeName
;
String
?
complaintTypeName
;
String
?
technicianName
;
String
?
complaintCategoryName
;
String
?
complaintCategoryName
;
String
?
openStatus
;
String
?
openStatus
;
String
?
createdDate
;
String
?
createdDate
;
...
@@ -246,6 +247,7 @@ class ComplaintList {
...
@@ -246,6 +247,7 @@ class ComplaintList {
{
this
.
complaintId
,
{
this
.
complaintId
,
this
.
createdBy
,
this
.
createdBy
,
this
.
complaintTypeName
,
this
.
complaintTypeName
,
this
.
technicianName
,
this
.
complaintCategoryName
,
this
.
complaintCategoryName
,
this
.
openStatus
,
this
.
openStatus
,
this
.
createdDate
});
this
.
createdDate
});
...
@@ -254,6 +256,7 @@ class ComplaintList {
...
@@ -254,6 +256,7 @@ class ComplaintList {
complaintId
=
json
[
'complaint_id'
];
complaintId
=
json
[
'complaint_id'
];
createdBy
=
json
[
'created_by'
];
createdBy
=
json
[
'created_by'
];
complaintTypeName
=
json
[
'complaint_type_name'
];
complaintTypeName
=
json
[
'complaint_type_name'
];
technicianName
=
json
[
'technician_name'
];
complaintCategoryName
=
json
[
'complaint_category_name'
];
complaintCategoryName
=
json
[
'complaint_category_name'
];
openStatus
=
json
[
'open_status'
];
openStatus
=
json
[
'open_status'
];
createdDate
=
json
[
'created_date'
];
createdDate
=
json
[
'created_date'
];
...
@@ -264,6 +267,7 @@ class ComplaintList {
...
@@ -264,6 +267,7 @@ class ComplaintList {
data
[
'complaint_id'
]
=
this
.
complaintId
;
data
[
'complaint_id'
]
=
this
.
complaintId
;
data
[
'created_by'
]
=
this
.
createdBy
;
data
[
'created_by'
]
=
this
.
createdBy
;
data
[
'complaint_type_name'
]
=
this
.
complaintTypeName
;
data
[
'complaint_type_name'
]
=
this
.
complaintTypeName
;
data
[
'technician_name'
]
=
this
.
technicianName
;
data
[
'complaint_category_name'
]
=
this
.
complaintCategoryName
;
data
[
'complaint_category_name'
]
=
this
.
complaintCategoryName
;
data
[
'open_status'
]
=
this
.
openStatus
;
data
[
'open_status'
]
=
this
.
openStatus
;
data
[
'created_date'
]
=
this
.
createdDate
;
data
[
'created_date'
]
=
this
.
createdDate
;
...
...
lib/Notifiers/GeneratorDetailsProvider.dart
View file @
b2b7af29
...
@@ -19,6 +19,8 @@ import '../Utils/app_colors.dart';
...
@@ -19,6 +19,8 @@ import '../Utils/app_colors.dart';
import
'HomeScreenNotifier.dart'
;
import
'HomeScreenNotifier.dart'
;
class
Generatordetailsprovider
extends
ChangeNotifier
{
class
Generatordetailsprovider
extends
ChangeNotifier
{
bool
_showMoreDetails
=
false
;
bool
_submitLoading
=
false
;
bool
_submitLoading
=
false
;
bool
_showMoreScheduleDetails
=
false
;
bool
_showMoreScheduleDetails
=
false
;
bool
_showMoreScheduleList
=
false
;
bool
_showMoreScheduleList
=
false
;
...
@@ -31,7 +33,10 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -31,7 +33,10 @@ class Generatordetailsprovider extends ChangeNotifier {
QRViewController
?
_qrViewController
;
QRViewController
?
_qrViewController
;
TextEditingController
engNoController
=
TextEditingController
();
TextEditingController
engNoController
=
TextEditingController
();
FocusNode
engineNoFocusNode
=
FocusNode
();
FocusNode
engineNoFocusNode
=
FocusNode
();
List
<
C_List
>
_complaintList
=
[];
List
<
ComplaintList
>
_complaintList
=
[];
List
<
C_List
>
_complaintListOther
=
[];
String
?
_genID
=
"-"
;
String
?
_genID
=
"-"
;
String
?
_genHashID
=
"-"
;
String
?
_genHashID
=
"-"
;
String
?
_aname
=
"-"
;
String
?
_aname
=
"-"
;
...
@@ -119,7 +124,9 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -119,7 +124,9 @@ class Generatordetailsprovider extends ChangeNotifier {
bool
get
showMoreScheduleDetails
=>
_showMoreScheduleDetails
;
bool
get
showMoreScheduleDetails
=>
_showMoreScheduleDetails
;
bool
get
showMoreScheduleList
=>
_showMoreScheduleList
;
bool
get
showMoreScheduleList
=>
_showMoreScheduleList
;
bool
get
showMoreDetails
=>
_showMoreDetails
;
List
<
C_List
>
get
complaintListOther
=>
_complaintListOther
;
List
<
ComplaintTypeList
>
get
complaintTypeDropdown
=>
_complaintTypeDropdown
;
List
<
ComplaintTypeList
>
get
complaintTypeDropdown
=>
_complaintTypeDropdown
;
List
<
ComplaintCategoryList
>
get
complaintCategorydropdown
=>
List
<
ComplaintCategoryList
>
get
complaintCategorydropdown
=>
...
@@ -151,7 +158,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -151,7 +158,7 @@ class Generatordetailsprovider extends ChangeNotifier {
String
?
get
selectedDescriptionId
=>
_selectedDescriptionId
;
String
?
get
selectedDescriptionId
=>
_selectedDescriptionId
;
List
<
C
_
List
>
get
complaintList
=>
_complaintList
;
List
<
C
omplaint
List
>
get
complaint
s
List
=>
_complaintList
;
String
?
get
genID
=>
_genID
;
String
?
get
genID
=>
_genID
;
...
@@ -222,6 +229,11 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -222,6 +229,11 @@ class Generatordetailsprovider extends ChangeNotifier {
notifyListeners
();
notifyListeners
();
}
}
set
showMoreDetails
(
bool
value
)
{
_showMoreDetails
=
value
;
notifyListeners
();
}
set
showMoreScheduleDetails
(
bool
value
)
{
set
showMoreScheduleDetails
(
bool
value
)
{
_showMoreScheduleDetails
=
value
;
_showMoreScheduleDetails
=
value
;
notifyListeners
();
notifyListeners
();
...
@@ -556,6 +568,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -556,6 +568,7 @@ class Generatordetailsprovider extends ChangeNotifier {
_complaintTypeDropdown
=
data
.
complaintTypeList
??
[];
_complaintTypeDropdown
=
data
.
complaintTypeList
??
[];
_complaintCategorydropdown
=
data
.
complaintCategoryList
??
[];
_complaintCategorydropdown
=
data
.
complaintCategoryList
??
[];
_complaintDescriptionDropdown
=
data
.
complaintDescriptionList
??
[];
_complaintDescriptionDropdown
=
data
.
complaintDescriptionList
??
[];
_complaintList
=
data
.
complaintList
??
[];
if
(
_selectedComplaintType
!=
null
&&
if
(
_selectedComplaintType
!=
null
&&
!
_complaintTypeDropdown
.
contains
(
_selectedComplaintType
))
{
!
_complaintTypeDropdown
.
contains
(
_selectedComplaintType
))
{
_selectedComplaintType
=
null
;
_selectedComplaintType
=
null
;
...
@@ -579,7 +592,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -579,7 +592,7 @@ class Generatordetailsprovider extends ChangeNotifier {
_selectedDescriptionId
=
""
;
_selectedDescriptionId
=
""
;
}
}
notifyListeners
();
notifyListeners
();
Navigator
.
pop
(
context
);
//
Navigator.pop(context);
if
(
from
==
"Generator Details"
)
{
if
(
from
==
"Generator Details"
)
{
this
.
_qrViewController
!.
pauseCamera
();
this
.
_qrViewController
!.
pauseCamera
();
Navigator
.
pushAndRemoveUntil
(
Navigator
.
pushAndRemoveUntil
(
...
@@ -592,7 +605,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -592,7 +605,7 @@ class Generatordetailsprovider extends ChangeNotifier {
),
),
),
),
(
Route
<
dynamic
>
route
)
{
(
Route
<
dynamic
>
route
)
{
return
route
.
settings
.
arguments
==
'Gentrackerdashboard
'
;
return
route
.
settings
.
name
==
'MyHomePage
'
;
},
},
);
);
}
else
if
(
from
==
"Register Complaint"
)
{
}
else
if
(
from
==
"Register Complaint"
)
{
...
@@ -658,6 +671,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -658,6 +671,7 @@ class Generatordetailsprovider extends ChangeNotifier {
_complaintTypeDropdown
=
data
.
complaintTypeList
??
[];
_complaintTypeDropdown
=
data
.
complaintTypeList
??
[];
_complaintCategorydropdown
=
data
.
complaintCategoryList
??
[];
_complaintCategorydropdown
=
data
.
complaintCategoryList
??
[];
_complaintDescriptionDropdown
=
data
.
complaintDescriptionList
??
[];
_complaintDescriptionDropdown
=
data
.
complaintDescriptionList
??
[];
_complaintList
=
data
.
complaintList
??
[];
if
(
_selectedComplaintType
!=
null
&&
if
(
_selectedComplaintType
!=
null
&&
!
_complaintTypeDropdown
.
contains
(
_selectedComplaintType
))
{
!
_complaintTypeDropdown
.
contains
(
_selectedComplaintType
))
{
_selectedComplaintType
=
null
;
_selectedComplaintType
=
null
;
...
@@ -721,7 +735,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -721,7 +735,7 @@ class Generatordetailsprovider extends ChangeNotifier {
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
if
(
data
.
sessionExists
==
1
)
{
if
(
data
.
sessionExists
==
1
)
{
if
(
data
.
error
==
0
)
{
if
(
data
.
error
==
0
)
{
_complaintList
=
data
.
list
!
;
_complaintList
Other
=
data
.
list
??[]
;
notifyListeners
();
notifyListeners
();
_isLoading
=
false
;
_isLoading
=
false
;
}
else
{
}
else
{
...
@@ -1000,6 +1014,7 @@ class Generatordetailsprovider extends ChangeNotifier {
...
@@ -1000,6 +1014,7 @@ class Generatordetailsprovider extends ChangeNotifier {
_isLoading
=
true
;
_isLoading
=
true
;
_submitLoading
=
false
;
_submitLoading
=
false
;
notifyListeners
();
notifyListeners
();
sessionDoesNotExist
(
context
);
// SharedpreferencesService().clearPreferences();
// SharedpreferencesService().clearPreferences();
// toast(context, "Your Session expired, Please Login Again!");
// toast(context, "Your Session expired, Please Login Again!");
// Navigator.push(
// Navigator.push(
...
...
lib/Notifiers/UpdatePasswordProvider.dart
View file @
b2b7af29
...
@@ -84,7 +84,9 @@ class UpdatePasswordProvider with ChangeNotifier {
...
@@ -84,7 +84,9 @@ class UpdatePasswordProvider with ChangeNotifier {
toast
(
context
,
data
.
message
);
toast
(
context
,
data
.
message
);
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
()),
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
(),
settings:
RouteSettings
(
name:
"MyHomePage"
)
),
);
);
}
else
{
}
else
{
toast
(
context
,
data
.
message
);
toast
(
context
,
data
.
message
);
...
@@ -94,7 +96,8 @@ class UpdatePasswordProvider with ChangeNotifier {
...
@@ -94,7 +96,8 @@ class UpdatePasswordProvider with ChangeNotifier {
SharedpreferencesService
().
clearPreferences
();
SharedpreferencesService
().
clearPreferences
();
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
LoginScreen
()),
MaterialPageRoute
(
builder:
(
context
)
=>
LoginScreen
(),
settings:
RouteSettings
(
name:
"LoginScreen"
)),
);
);
}
}
}
}
...
...
lib/Notifiers/loginNotifier.dart
View file @
b2b7af29
...
@@ -195,7 +195,8 @@ set isLoading(bool value){
...
@@ -195,7 +195,8 @@ set isLoading(bool value){
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
()),
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
(),
settings:
RouteSettings
(
name:
"MyHomePage"
)),
);
);
notifyListeners
();
notifyListeners
();
}
else
if
(
data
.
error
==
1
)
{
}
else
if
(
data
.
error
==
1
)
{
...
...
lib/Notifiers/splashVersionNotifier.dart
View file @
b2b7af29
...
@@ -98,19 +98,22 @@ class SplashVersionNotifier extends ChangeNotifier {
...
@@ -98,19 +98,22 @@ class SplashVersionNotifier extends ChangeNotifier {
if
(
data
.
updatePasswordRequired
==
0
)
{
if
(
data
.
updatePasswordRequired
==
0
)
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
()),
MaterialPageRoute
(
builder:
(
context
)
=>
MyHomePage
(),
settings:
RouteSettings
(
name:
"MyHomePage"
)),
);
);
}
else
if
(
data
.
updatePasswordRequired
==
1
)
{
}
else
if
(
data
.
updatePasswordRequired
==
1
)
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
UpdatePassword
()),
MaterialPageRoute
(
builder:
(
context
)
=>
UpdatePassword
(),
settings:
RouteSettings
(
name:
"UpdatePassword"
)),
);
);
}
}
}
else
{
}
else
{
print
(
"goes here"
);
print
(
"goes here"
);
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
LoginScreen
()),
MaterialPageRoute
(
builder:
(
context
)
=>
LoginScreen
(),
settings:
RouteSettings
(
name:
"LoginScreen"
)),
);
);
// toast(context,
// toast(context,
// "Your Session has been expired, Please Login Again");
// "Your Session has been expired, Please Login Again");
...
...
lib/screens/HomeScreen.dart
View file @
b2b7af29
...
@@ -9,6 +9,7 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart';
...
@@ -9,6 +9,7 @@ import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import
'package:flutter_svg/flutter_svg.dart'
;
import
'package:flutter_svg/flutter_svg.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'../Utils/commonServices.dart'
;
import
'../Utils/commonServices.dart'
;
import
'genTracker/ScanEnterGeneratorIDScreen.dart'
;
import
'notifierExports.dart'
;
import
'notifierExports.dart'
;
import
'screensExports.dart'
;
import
'screensExports.dart'
;
import
'package:geolocator/geolocator.dart'
;
import
'package:geolocator/geolocator.dart'
;
...
@@ -1269,16 +1270,28 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -1269,16 +1270,28 @@ class _MyHomePageState extends State<MyHomePage> {
var
res
;
var
res
;
switch
(
coreFilteredItems
[
ci
][
'name'
])
{
switch
(
coreFilteredItems
[
ci
][
'name'
])
{
case
"Gen Tracker"
:
case
"Gen Tracker"
:
// res = await Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) =>
// Gentrackerdashboard(),
// settings: RouteSettings(
// arguments:
// 'Gentrackerdashboard',
// ),
// ),
// );
res
=
await
Navigator
.
push
(
res
=
await
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
MaterialPageRoute
(
builder:
builder:
(
context
)
=>
(
context
)
=>
Scanentergeneratoridscreen
(
Gentrackerdashboard
(),
from:
"Generator Details"
,
settings:
RouteSettings
(
arguments:
'Gentrackerdashboard'
,
),
),
settings:
RouteSettings
(
name:
'Scanentergeneratoridscreen'
)
),
),
);
);
break
;
break
;
...
...
lib/screens/genTracker/ComplaintHistory.dart
View file @
b2b7af29
...
@@ -83,11 +83,11 @@ class _ComplainthistoryState extends State<Complainthistory> {
...
@@ -83,11 +83,11 @@ class _ComplainthistoryState extends State<Complainthistory> {
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
if
(
provider
.
complaintList
.
isNotEmpty
)
...[
if
(
provider
.
complaintList
Other
.
isNotEmpty
)
...[
ListView
.
builder
(
ListView
.
builder
(
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
NeverScrollableScrollPhysics
(),
physics:
NeverScrollableScrollPhysics
(),
itemCount:
provider
.
complaintList
.
length
,
itemCount:
provider
.
complaintList
Other
.
length
,
itemBuilder:
(
context
,
l
)
{
itemBuilder:
(
context
,
l
)
{
return
Column
(
return
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
@@ -95,7 +95,7 @@ class _ComplainthistoryState extends State<Complainthistory> {
...
@@ -95,7 +95,7 @@ class _ComplainthistoryState extends State<Complainthistory> {
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
left:
8.0
,
top:
5.0
),
padding:
const
EdgeInsets
.
only
(
left:
8.0
,
top:
5.0
),
child:
Text
(
child:
Text
(
"
${provider.complaintList[l].compRegdate}
"
,
"
${provider.complaintList
Other
[l].compRegdate}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
,
fontSize:
14
,
color:
Color
(
0xFF818181
)),
color:
Color
(
0xFF818181
)),
...
@@ -121,10 +121,10 @@ class _ComplainthistoryState extends State<Complainthistory> {
...
@@ -121,10 +121,10 @@ class _ComplainthistoryState extends State<Complainthistory> {
];
];
final
values
=
[
final
values
=
[
provider
.
complaintList
[
l
].
techName
,
provider
.
complaintList
Other
[
l
].
techName
,
provider
.
complaintList
[
l
].
compType
,
provider
.
complaintList
Other
[
l
].
compType
,
provider
.
complaintList
[
l
].
compStatus
,
provider
.
complaintList
Other
[
l
].
compStatus
,
provider
.
complaintList
[
l
].
createdBy
,
provider
.
complaintList
Other
[
l
].
createdBy
,
];
];
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
...
...
lib/screens/genTracker/GeneratorDetails.dart
View file @
b2b7af29
This diff is collapsed.
Click to expand it.
lib/screens/genTracker/ScanEnterGeneratorIDScreen.dart
View file @
b2b7af29
...
@@ -74,8 +74,29 @@ class _ScanentergeneratoridscreenState
...
@@ -74,8 +74,29 @@ class _ScanentergeneratoridscreenState
default
:
default
:
connection
=
'Offline'
;
connection
=
'Offline'
;
}
}
return
connection
==
"Online"
return
(
connection
==
"Online"
)
?
Consumer
<
Generatordetailsprovider
>(
?
Platform
.
isAndroid
?
WillPopScope
(
onWillPop:
()
async
{
Provider
.
of
<
Generatordetailsprovider
>(
context
,
listen:
false
,
).
resetForm
();
return
onBackPressed
(
context
);
},
child:
SafeArea
(
top:
false
,
bottom:
true
,
child:
_scaffold
(
context
),
),
)
:
_scaffold
(
context
)
:
NoNetwork
(
context
);
}
Widget
_scaffold
(
BuildContext
context
)
{
return
Consumer
<
Generatordetailsprovider
>(
builder:
(
context
,
provider
,
child
)
{
builder:
(
context
,
provider
,
child
)
{
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
...
@@ -85,7 +106,7 @@ class _ScanentergeneratoridscreenState
...
@@ -85,7 +106,7 @@ class _ScanentergeneratoridscreenState
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"
${widget.from}
"
),
appBar:
appbar
New
(
context
,
"
${widget.from}
"
,
0xFFFFFFFF
),
body:
Container
(
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
child:
Column
(
...
@@ -97,11 +118,7 @@ class _ScanentergeneratoridscreenState
...
@@ -97,11 +118,7 @@ class _ScanentergeneratoridscreenState
child:
QRView
(
child:
QRView
(
key:
provider
.
scannerKey
,
key:
provider
.
scannerKey
,
onQRViewCreated:
(
p0
)
{
onQRViewCreated:
(
p0
)
{
provider
.
onQRViewCreated
(
provider
.
onQRViewCreated
(
p0
,
provider
.
title
,
context
);
p0
,
provider
.
title
,
context
,
);
},
},
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
formatsAllowed:
[
BarcodeFormat
.
qrcode
],
cameraFacing:
CameraFacing
.
back
,
cameraFacing:
CameraFacing
.
back
,
...
@@ -163,8 +180,7 @@ class _ScanentergeneratoridscreenState
...
@@ -163,8 +180,7 @@ class _ScanentergeneratoridscreenState
),
),
);
);
},
},
)
);
:
NoNetwork
(
context
);
}
}
Future
<
void
>
_showgenIdBottomSheet
(
BuildContext
context
)
{
Future
<
void
>
_showgenIdBottomSheet
(
BuildContext
context
)
{
...
@@ -242,7 +258,7 @@ class _ScanentergeneratoridscreenState
...
@@ -242,7 +258,7 @@ class _ScanentergeneratoridscreenState
15
,
15
,
0
,
0
,
),
),
child:
TextField
(
child:
TextF
ormF
ield
(
controller:
genIDcontroller
,
controller:
genIDcontroller
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
...
@@ -255,6 +271,17 @@ class _ScanentergeneratoridscreenState
...
@@ -255,6 +271,17 @@ class _ScanentergeneratoridscreenState
// Handle onTapOutside
// Handle onTapOutside
FocusScope
.
of
(
context
).
unfocus
();
FocusScope
.
of
(
context
).
unfocus
();
},
},
onFieldSubmitted:
(
value
)
{
provider
.
submitLoading
=
true
;
provider
.
LoadgeneratorDetailsApifunction
(
homeProvider
,
context
,
widget
.
from
,
genIDcontroller
.
text
,
"1"
,
);
genIDcontroller
.
clear
();
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
isDense:
true
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
...
@@ -275,8 +302,6 @@ class _ScanentergeneratoridscreenState
...
@@ -275,8 +302,6 @@ class _ScanentergeneratoridscreenState
provider
.
submitLoading
provider
.
submitLoading
?
null
?
null
:
()
async
{
:
()
async
{
switch
(
widget
.
from
)
{
case
"Generator Details"
:
provider
.
submitLoading
=
true
;
provider
.
submitLoading
=
true
;
provider
.
LoadgeneratorDetailsApifunction
(
provider
.
LoadgeneratorDetailsApifunction
(
homeProvider
,
homeProvider
,
...
@@ -286,39 +311,42 @@ class _ScanentergeneratoridscreenState
...
@@ -286,39 +311,42 @@ class _ScanentergeneratoridscreenState
"1"
,
"1"
,
);
);
genIDcontroller
.
clear
();
genIDcontroller
.
clear
();
break
;
// switch (widget.from) {
// case "Register Complaint":
// case "Generator Details":
// provider.LoadgeneratorDetailsApifunction(
//
// homeProvider,
// context,
// widget.from,
// genIDcontroller.text,
// "2"
// );
// break;
// break;
// case "Tag Location":
// // case "Register Complaint":
// provider.TagLocationAPIFunction(homeProvider, context, genIDcontroller.text);
// // provider.LoadgeneratorDetailsApifunction(
// // homeProvider,
// // context,
// // widget.from,
// // genIDcontroller.text,
// // "2"
// // );
// // break;
// // case "Tag Location":
// // provider.TagLocationAPIFunction(homeProvider, context, genIDcontroller.text);
// // break;
// // case "Tag Generator":
// // provider.submitLoading = false;
// // provider.TagGeneratorCheckAPIFunction(
// // homeProvider,
// // context,
// // genIDcontroller.text,
// // );
// // // final data = await ApiCalling.TagGeneratorCheckAPI(homeProvider.empId, homeProvider.session, genIDcontroller.text);
// // // if(data!=null){
// // // if(data.error==0){
// // // provider.showTagGeneratorBottomSheet(context, genIDcontroller.text);
// // // }else{
// // // toast(context, data.message);
// // // }
// // // }
// //
// // break;
// default:
// break;
// break;
case
"Tag Generator"
:
provider
.
submitLoading
=
false
;
provider
.
TagGeneratorCheckAPIFunction
(
homeProvider
,
context
,
genIDcontroller
.
text
,
);
// final data = await ApiCalling.TagGeneratorCheckAPI(homeProvider.empId, homeProvider.session, genIDcontroller.text);
// if(data!=null){
// if(data.error==0){
// provider.showTagGeneratorBottomSheet(context, genIDcontroller.text);
// }else{
// toast(context, data.message);
// }
// }
// }
break
;
default
:
break
;
}
},
},
child:
Container
(
child:
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
...
lib/screens/inventory/GeneratorPartDetailsScreen.dart
View file @
b2b7af29
This diff is collapsed.
Click to expand it.
lib/screens/inventory/InventoryScreen.dart
View file @
b2b7af29
...
@@ -81,7 +81,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
...
@@ -81,7 +81,7 @@ class _InventoryScreenState extends State<InventoryScreen> {
return
Scaffold
(
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar
(
context
,
"Gen Inventory"
),
appBar:
appbar
New
(
context
,
"Gen Inventory"
,
0xFFFFFFFF
),
body:
Container
(
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
black
),
decoration:
BoxDecoration
(
color:
Colors
.
black
),
child:
Column
(
child:
Column
(
...
...
lib/screens/serviceEngineer/AccountSuggestions.dart
View file @
b2b7af29
...
@@ -30,7 +30,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -30,7 +30,7 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Accounts"
),
appBar:
appbar
New
(
context
,
"Accounts"
,
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
body:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
),
decoration:
BoxDecoration
(
color:
Colors
.
white
),
...
@@ -50,26 +50,26 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -50,26 +50,26 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
height:
48
,
height:
48
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
AppColors
.
text_field_color
,
//
color: AppColors.text_field_color,
borderRadius:
BorderRadius
.
circular
(
14
),
borderRadius:
BorderRadius
.
circular
(
14
),
border:
//
border:
searchFocusNode
.
hasFocus
//
searchFocusNode.hasFocus
?
Border
.
all
(
//
? Border.all(
color:
AppColors
.
app_blue
,
//
color: AppColors.app_blue,
width:
0.5
,
//
width: 0.5,
)
//
)
:
null
,
//
: null,
),
),
// alignment: Alignment.center,
// alignment: Alignment.center,
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
margin:
EdgeInsets
.
only
(
left:
5.0
,
right:
5.0
),
child:
Padding
(
child:
Padding
(
padding:
const
EdgeInsets
.
fromLTRB
(
10
.0
,
0.0
,
15
,
0
),
padding:
const
EdgeInsets
.
fromLTRB
(
5
.0
,
0.0
,
15
,
0
),
child:
TextField
(
child:
TextField
(
controller:
_searchController
,
controller:
_searchController
,
keyboardType:
TextInputType
.
text
,
keyboardType:
TextInputType
.
text
,
focusNode:
searchFocusNode
,
focusNode:
searchFocusNode
,
textCapitalization:
TextCapitalization
.
characters
,
textCapitalization:
TextCapitalization
.
characters
,
autofocus:
true
,
style:
TextStyle
(
fontSize:
14
),
style:
TextStyle
(
fontSize:
14
),
onChanged:
(
value
)
{
onChanged:
(
value
)
{
if
(
value
.
length
>=
3
)
{
if
(
value
.
length
>=
3
)
{
...
@@ -81,16 +81,51 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -81,16 +81,51 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
FocusScope
.
of
(
context
).
unfocus
();
FocusScope
.
of
(
context
).
unfocus
();
},
},
decoration:
InputDecoration
(
decoration:
InputDecoration
(
isDense:
true
,
filled:
true
,
fillColor:
AppColors
.
text_field_color
,
suffixIconConstraints:
BoxConstraints
(
minWidth:
25
,
maxWidth:
30
,
minHeight:
25
,
maxHeight:
30
,
),
suffixIcon:
Container
(
padding:
EdgeInsets
.
only
(
right:
10
),
child:
_searchController
.
text
.
isNotEmpty
?
InkResponse
(
onTap:
()
{
_searchController
.
clear
();
provider
.
accountList
.
clear
();
},
child:
SvgPicture
.
asset
(
"assets/svg/crm/clear_search.svg"
,
),
):
SvgPicture
.
asset
(
"assets/svg/search_ic.svg"
,
),
),
counterText:
""
,
hintText:
"Enter Account Name"
,
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFF
818181
),
color:
Color
(
0xFF
B4BEC0
),
fontSize:
14
,
fontSize:
14
,
),
),
//contentPadding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
enabled:
true
,
enabledBorder:
InputBorder
.
none
,
enabledBorder:
OutlineInputBorder
(
focusedBorder:
InputBorder
.
none
,
borderSide:
BorderSide
.
none
,
hintText:
'Enter Account Name'
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
focusedBorder:
OutlineInputBorder
(
borderSide:
BorderSide
(
color:
AppColors
.
cyan_blue
,
),
borderRadius:
BorderRadius
.
circular
(
14
),
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
14
),
),
),
),
),
),
),
),
...
@@ -116,6 +151,60 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -116,6 +151,60 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
shrinkWrap:
true
,
shrinkWrap:
true
,
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
var
accountList
=
provider
.
accountList
;
var
accountList
=
provider
.
accountList
;
String
accname
=
provider
.
accountList
[
index
].
accountName
??
""
;
RegExp
regex
=
RegExp
(
_searchController
.
text
,
caseSensitive:
false
);
Iterable
<
Match
>
matches
=
regex
.
allMatches
(
accname
);
List
<
TextSpan
>
textSpans
=
[];
int
previousMatchEnd
=
0
;
for
(
Match
match
in
matches
)
{
if
(
match
.
start
>
previousMatchEnd
)
{
// Add non-matching text before this match
textSpans
.
add
(
TextSpan
(
text:
accname
.
substring
(
previousMatchEnd
,
match
.
start
),
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
);
}
// Add the matching text with highlighting
textSpans
.
add
(
TextSpan
(
text:
accname
.
substring
(
match
.
start
,
match
.
end
),
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
14
,
// Highlight color
fontFamily:
"JakartaMedium"
,
),
),
);
previousMatchEnd
=
match
.
end
;
}
// Add any remaining non-matching text after the last match
if
(
previousMatchEnd
<
accname
.
length
)
{
textSpans
.
add
(
TextSpan
(
text:
accname
.
substring
(
previousMatchEnd
),
style:
TextStyle
(
color:
AppColors
.
semi_black
,
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
);
}
if
(
accountList
!.
length
>
0
)
{
if
(
accountList
!.
length
>
0
)
{
return
InkWell
(
return
InkWell
(
onTap:
()
{
onTap:
()
{
...
@@ -142,49 +231,65 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
...
@@ -142,49 +231,65 @@ class _AccountsuggestionsState extends State<Accountsuggestions> {
width:
width:
MediaQuery
.
of
(
context
).
size
.
width
*
MediaQuery
.
of
(
context
).
size
.
width
*
0.9
,
0.9
,
padding:
EdgeInsets
.
fromLTRB
(
0
,
5
,
0
,
10
),
// padding: EdgeInsets.fromLTRB(0, 5, 0, 10),
child:
Row
(
// child: Row(
children:
[
// children: [
Expanded
(
// Expanded(
flex:
1
,
// flex: 1,
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
symmetric
(
// padding: EdgeInsets.symmetric(
horizontal:
10
,
// horizontal: 10,
vertical:
10
,
// vertical: 10,
),
// ),
decoration:
BoxDecoration
(
// decoration: BoxDecoration(
color:
Color
(
0xFFE6F6FF
),
// color: Color(0xFFE6F6FF),
borderRadius:
// borderRadius:
BorderRadius
.
circular
(
8
),
// BorderRadius.circular(8),
),
// ),
child:
SvgPicture
.
asset
(
// child: SvgPicture.asset(
width:
30
,
// width: 30,
height:
30
,
// height: 30,
"assets/svg/se_block_head.svg"
,
// "assets/svg/se_block_head.svg",
),
// ),
),
// ),
),
// ),
SizedBox
(
width:
10
),
// SizedBox(width: 10),
Expanded
(
// Expanded(
flex:
5
,
// flex: 5,
child:
Text
(
// child: Text(
"
${accountList![index].accountName}
"
,
// "${accountList![index].accountName}",
textAlign:
TextAlign
.
start
,
// textAlign: TextAlign.start,
maxLines:
3
,
// maxLines: 3,
overflow:
TextOverflow
.
ellipsis
,
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// color: AppColors.semi_black,
// ),
// ),
// ),
// Expanded(
// flex: 1,
// child: SvgPicture.asset(
// "assets/svg/arrow_right_new.svg",
// ),
// ),
// ],
// ),
child:
ListTile
(
leading:
SvgPicture
.
asset
(
"assets/svg/crm/crm_search_list_ic.svg"
,
),
title:
RichText
(
text:
TextSpan
(
children:
textSpans
,
style:
TextStyle
(
style:
TextStyle
(
color:
AppColors
.
semi_black
,
color:
AppColors
.
semi_black
,
fontSize:
14
,
// Highlight color
fontFamily:
"JakartaMedium"
,
),
),
),
)),
),
trailing:
SvgPicture
.
asset
(
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
"assets/svg/arrow_right_new.svg"
,
),
),
),
)
],
),
),
),
),
),
);
);
...
...
lib/screens/serviceEngineer/MonthlyCollection.dart
View file @
b2b7af29
...
@@ -31,6 +31,46 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -31,6 +31,46 @@ class _MonthlycollectionState extends State<Monthlycollection> {
});
});
}
}
Color
getDecorationColor
(
value
)
{
var
color
=
AppColors
.
approved_bg_color
;
switch
(
value
)
{
case
'Pending Approval'
:
return
AppColors
.
requested_bg_color
;
case
'Approved'
:
return
AppColors
.
approved_bg_color
;
case
'Rejected'
:
return
AppColors
.
rejected_bg_color
;
}
return
color
;
}
Color
getTextColor
(
value
)
{
var
color
=
AppColors
.
approved_text_color
;
switch
(
value
)
{
case
'Pending Approval'
:
return
AppColors
.
requested_text_color
;
case
'Approved'
:
return
AppColors
.
approved_text_color
;
case
'Rejected'
:
return
AppColors
.
rejected_text_color
;
}
return
color
;
}
// Pending Approval', 'Approved', 'Rejected
getText
(
value
)
{
var
text
=
"A"
;
switch
(
value
)
{
case
'Approved'
:
return
"A"
;
case
'Pending Approval'
:
return
"PA"
;
case
'Rejected'
:
return
"R"
;
}
return
text
;
}
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
Paymentcollectionprovider
>(
return
Consumer
<
Paymentcollectionprovider
>(
...
@@ -41,38 +81,68 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -41,38 +81,68 @@ class _MonthlycollectionState extends State<Monthlycollection> {
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountsuggestions
()),
MaterialPageRoute
(
builder:
(
context
)
=>
Accountsuggestions
()),
);
);
if
(
res
==
true
){
if
(
res
==
true
)
{
provider
.
PaymentCollectionAPI
(
context
);
provider
.
PaymentCollectionAPI
(
context
);
}
}
},
},
child:
SvgPicture
.
asset
(
child:
Container
(
"assets/svg/add_account.svg"
,
height:
45
,
width:
20
,
alignment:
Alignment
.
center
,
color:
Color
(
0xFF2D2D2D
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
height:
20
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
Text
(
"Add Payment"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
// child: SvgPicture.asset(
// "assets/svg/add_account.svg",
// width: 20,
// color: Color(0xFF2D2D2D),
// height: 20,
// ),
);
);
return
WillPopScope
(
return
WillPopScope
(
onWillPop:
()
=>
onBackPressed
(
context
),
onWillPop:
()
=>
onBackPressed
(
context
),
child:
SafeArea
(
child:
SafeArea
(
top:
false
,
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbar2
(
context
,
"Payment Collection"
,
provider
.
resetAll
,
sendWidget
),
appBar:
appbar2
(
body:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
context
,
"Payment Collection"
,
provider
.
resetAll
,
SizedBox
.
shrink
(),
),
body:
provider
.
paymenCollectionList
.
isNotEmpty
?
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
scrollDirection:
Axis
.
vertical
,
scrollDirection:
Axis
.
vertical
,
shrinkWrap:
true
,
shrinkWrap:
true
,
physics:
AlwaysScrollableScrollPhysics
(),
physics:
AlwaysScrollableScrollPhysics
(),
itemCount:
provider
.
paymenCollectionList
.
length
,
itemCount:
provider
.
paymenCollectionList
.
length
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
itemBuilder:
(
context
,
index
)
{
itemBuilder:
(
context
,
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
vertical:
5
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
Colors
.
white
,
...
@@ -82,24 +152,56 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -82,24 +152,56 @@ class _MonthlycollectionState extends State<Monthlycollection> {
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
// Expanded(
// flex: 1,
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 10,
// ),
// decoration: BoxDecoration(
// color: Color(0xFFE6F6FF),
// shape: BoxShape.circle
// ),
// child: SvgPicture.asset(
// width: 30,
// height: 30,
// "assets/svg/se_block_head.svg",
// ),
// ),
// ),
Expanded
(
Expanded
(
flex:
1
,
flex:
1
,
child:
Container
(
child:
Container
(
height:
45
,
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
10
,
vertical:
10
,
),
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
color:
getDecorationColor
(
borderRadius:
BorderRadius
.
circular
(
8
),
provider
.
paymenCollectionList
[
index
]
.
approvalStatus
,
),
shape:
BoxShape
.
circle
,
),
child:
Center
(
child:
Text
(
"
${getText(provider.paymenCollectionList[index].approvalStatus)}
"
,
style:
TextStyle
(
fontSize:
16
,
fontFamily:
"JakartaMedium"
,
color:
getTextColor
(
provider
.
paymenCollectionList
[
index
]
.
approvalStatus
,
),
),
),
),
child:
SvgPicture
.
asset
(
width:
30
,
height:
30
,
"assets/svg/se_block_head.svg"
,
),
),
),
),
),
),
...
@@ -109,21 +211,26 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -109,21 +211,26 @@ class _MonthlycollectionState extends State<Monthlycollection> {
flex:
4
,
flex:
4
,
child:
SizedBox
(
child:
SizedBox
(
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
Text
(
"
${provider.paymenCollectionList[index].accountName}
"
,
"
${provider.paymenCollectionList[index].accountName}
"
,
maxLines:
2
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
style:
TextStyle
(
fontFamily:
"JakartaMedium"
fontFamily:
"JakartaMedium"
,
),
),
),
),
Text
(
Text
(
"
₹
${provider.paymenCollectionList[index].
amount
}
"
,
"
${provider.paymenCollectionList[index].
paymentMode
}
"
,
maxLines:
1
,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
color:
AppColors
.
app_blue
),
style:
TextStyle
(
color:
AppColors
.
grey_semi
,
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
),
// Text("Gen Pvt. Ltd"),
// Text("Gen Pvt. Ltd"),
],
],
...
@@ -132,17 +239,21 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -132,17 +239,21 @@ class _MonthlycollectionState extends State<Monthlycollection> {
),
),
Container
(
Container
(
height:
35
,
height:
35
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
decoration:
BoxDecoration
(
horizontal:
10
,
color:
Color
(
0xFFE3FFE0
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
),
child:
Center
(
child:
Center
(
child:
Text
(
child:
Text
(
"
${provider.paymenCollectionList[index].a
pprovalStatus
}
"
,
"₹
${provider.paymenCollectionList[index].a
mount
}
"
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
13
,
fontSize:
13
,
color:
Color
(
0xFF0D9C00
)),
color:
getTextColor
(
provider
.
paymenCollectionList
[
index
]
.
approvalStatus
,
),
),
),
),
),
),
),
),
...
@@ -157,49 +268,59 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -157,49 +268,59 @@ class _MonthlycollectionState extends State<Monthlycollection> {
// ),
// ),
],
],
),
),
Padding
(
// Padding(
padding:
const
EdgeInsets
.
all
(
8.0
),
// padding: const EdgeInsets.all(8.0),
child:
Divider
(
// child: Divider(
thickness:
0.5
,
// thickness: 0.5,
color:
Color
(
0xFFD7D7D7
),
// color: Color(0xFFD7D7D7),
),
// ),
),
// ),
SizedBox
(
height:
5
),
// SizedBox(height: 5),
...
List
.
generate
(
2
,
(
j
)
{
// ...List.generate(2, (j) {
final
textheads
=
[
"ID"
,
"Generator Type"
];
// final textheads = ["ID", "Generator Type"];
final
textSubheads
=
[
// final textSubheads = [
provider
.
paymenCollectionList
[
index
].
paymentRefNo
,
// provider
provider
.
paymenCollectionList
[
index
].
paymentMode
,
// .paymenCollectionList[index]
];
// .paymentRefNo,
return
Container
(
// provider
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
// .paymenCollectionList[index]
child:
Column
(
// .paymentMode,
children:
[
// ];
Row
(
// return Container(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
// padding: EdgeInsets.symmetric(
children:
[
// vertical: 3,
Expanded
(
// ),
flex:
1
,
// child: Column(
child:
Text
(
textheads
[
j
].
toString
(),
style:
TextStyle
(
// children: [
fontFamily:
"JakartaMedium"
// Row(
),),
// crossAxisAlignment:
),
// CrossAxisAlignment.start,
SizedBox
(
width:
5
),
// children: [
Expanded
(
// Expanded(
flex:
2
,
// flex: 1,
child:
Text
(
// child: Text(
textSubheads
[
j
].
toString
(),
// textheads[j].toString(),
style:
TextStyle
(
// style: TextStyle(
color:
Color
(
0xFF818181
),
// fontFamily: "JakartaMedium",
),
// ),
),
// ),
),
// ),
],
// SizedBox(width: 5),
),
// Expanded(
],
// flex: 2,
),
// child: Text(
);
// textSubheads[j].toString(),
}),
// style: TextStyle(
// color: Color(0xFF818181),
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// );
// }),
SizedBox
(
height:
10
),
SizedBox
(
height:
10
),
InkResponse
(
InkResponse
(
onTap:
()
{
onTap:
()
{
...
@@ -219,15 +340,22 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -219,15 +340,22 @@ class _MonthlycollectionState extends State<Monthlycollection> {
},
},
child:
SizedBox
(
child:
SizedBox
(
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
crossAxisAlignment:
CrossAxisAlignment
.
center
,
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
Text
(
Text
(
"View Attachment"
,
"View Attachment"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
),
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
,
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
],
),
),
),
),
...
@@ -237,7 +365,11 @@ class _MonthlycollectionState extends State<Monthlycollection> {
...
@@ -237,7 +365,11 @@ class _MonthlycollectionState extends State<Monthlycollection> {
);
);
},
},
),
),
):
Emptywidget
(
context
)
)
:
Emptywidget
(
context
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
sendWidget
,
),
),
),
),
);
);
...
...
lib/screens/serviceEngineer/PCWallet.dart
View file @
b2b7af29
This diff is collapsed.
Click to expand it.
lib/screens/serviceEngineer/PaymentDetails.dart
View file @
b2b7af29
...
@@ -73,7 +73,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
...
@@ -73,7 +73,7 @@ class _PaymentdetailsState extends State<Paymentdetails> {
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Payment Details"
),
appBar:
appbar
New
(
context
,
"Payment Details"
,
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SingleChildScrollView
(
body:
SingleChildScrollView
(
child:
RefreshIndicator
.
adaptive
(
child:
RefreshIndicator
.
adaptive
(
...
...
lib/screens/splash.dart
View file @
b2b7af29
...
@@ -339,6 +339,17 @@ class _SplashState extends State<Splash> {
...
@@ -339,6 +339,17 @@ class _SplashState extends State<Splash> {
@override
@override
void
didChangeDependencies
()
{
void
didChangeDependencies
()
{
// TODO: implement didChangeDependencies
// TODO: implement didChangeDependencies
switch
(
_source
.
keys
.
toList
()[
0
])
{
case
ConnectivityResult
.
mobile
:
connection
=
'Online'
;
break
;
case
ConnectivityResult
.
wifi
:
connection
=
'Online'
;
break
;
case
ConnectivityResult
.
none
:
default
:
connection
=
'Offline'
;
}
super
.
didChangeDependencies
();
super
.
didChangeDependencies
();
precacheImage
(
splashImage
.
image
,
context
);
precacheImage
(
splashImage
.
image
,
context
);
}
}
...
...
lib/services/api_calling.dart
View file @
b2b7af29
...
@@ -524,7 +524,7 @@ class ApiCalling {
...
@@ -524,7 +524,7 @@ class ApiCalling {
};
};
final
res
=
await
post
(
data
,
genTrackerGeneratorDetailsUrl
,
{});
final
res
=
await
post
(
data
,
genTrackerGeneratorDetailsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
debugPrint
(
"gen details:
${
res.body
}
"
);
debugPrint
(
"gen details
222
:
${
jsonDecode(res.body)['complaint_list']
}
"
);
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
@@ -786,8 +786,9 @@ class ApiCalling {
...
@@ -786,8 +786,9 @@ class ApiCalling {
'gen_id'
:
(
gen_id
).
toString
(),
'gen_id'
:
(
gen_id
).
toString
(),
};
};
final
res
=
await
post
(
data
,
technicianGeneratorDetailsUrl
,
{});
final
res
=
await
post
(
data
,
technicianGeneratorDetailsUrl
,
{});
if
(
res
!=
null
)
{
if
(
res
!=
null
)
{
debugPrint
(
res
.
body
);
print
(
"genderrails:
${jsonDecode
(res
!
.body)
}
"
)
;
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
return
loadGeneratorDetailsResponse
.
fromJson
(
jsonDecode
(
res
.
body
));
}
else
{
}
else
{
debugPrint
(
"Null Response"
);
debugPrint
(
"Null Response"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment