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
a7dc0d35
Commit
a7dc0d35
authored
Jun 21, 2025
by
Sai Srinivas
Browse files
21-06-2025 By Sai Srinivas
test cases and CRM module Lead list and details
parent
b8ffa919
Changes
33
Expand all
Show whitespace changes
Inline
Side-by-side
assets/svg/crm_appoint_details.svg
0 → 100644
View file @
a7dc0d35
<svg
width=
"16"
height=
"25"
viewBox=
"0 0 16 25"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M1.05399 5.4043H14.7234C15.3055 5.4043 15.7774 5.93151 15.7774 6.58175V23.7338C15.7774 24.3841 15.3055 24.9113 14.7234 24.9113H1.05399C0.471858 24.9113 0 24.3841 0 23.7338V6.58175C0 5.93151 0.471858 5.4043 1.05399 5.4043Z"
fill=
"#4154D9"
/>
<path
d=
"M2.54723 12.6177C2.44574 12.6177 2.34689 12.5826 2.26737 12.5171L1.74367 12.0853C1.5565 11.9306 1.53014 11.6543 1.68435 11.4667C1.83856 11.2799 2.11535 11.2531 2.30295 11.4074L2.4844 11.5572L3.39209 10.4324C3.54499 10.2444 3.82133 10.2145 4.01025 10.367C4.19873 10.5199 4.22817 10.7967 4.07572 10.9851L2.8886 12.4548C2.81479 12.5457 2.70759 12.6037 2.59073 12.6156C2.57667 12.6169 2.56173 12.6177 2.54723 12.6177ZM2.54723 16.9326C2.44574 16.9326 2.34689 16.8974 2.26737 16.832L1.74367 16.4001C1.5565 16.2454 1.53014 15.9691 1.68435 15.7815C1.83856 15.5952 2.11535 15.568 2.30295 15.7222L2.4844 15.872L3.39253 14.7477C3.54499 14.5592 3.82133 14.5289 4.01025 14.6827C4.19873 14.8351 4.22817 15.1119 4.07528 15.3004L2.88816 16.7696C2.81479 16.8605 2.70759 16.9185 2.59073 16.9304C2.57667 16.9317 2.56173 16.9326 2.54723 16.9326ZM2.54723 21.247C2.44574 21.247 2.34689 21.2118 2.26737 21.1463L1.74367 20.7145C1.5565 20.5598 1.53014 20.2835 1.68435 20.0959C1.83856 19.9091 2.11535 19.8823 2.30295 20.0366L2.4844 20.1864L3.39253 19.0621C3.54499 18.8736 3.82133 18.8433 4.01025 18.9971C4.19873 19.1495 4.22817 19.4263 4.07528 19.6148L2.88816 21.084C2.81479 21.1749 2.70759 21.2329 2.59073 21.2448C2.57667 21.2461 2.56173 21.247 2.54723 21.247ZM13.7545 11.8832H5.79795C5.55499 11.8832 5.35861 11.6868 5.35861 11.4438C5.35861 11.2009 5.55499 11.0045 5.79795 11.0045H13.7541C13.997 11.0045 14.1934 11.2009 14.1934 11.4438C14.1934 11.6868 13.997 11.8832 13.7545 11.8832ZM13.7545 16.198H5.79795C5.55499 16.198 5.35861 16.0016 5.35861 15.7586C5.35861 15.5157 5.55499 15.3193 5.79795 15.3193H13.7541C13.997 15.3193 14.1934 15.5157 14.1934 15.7586C14.1934 16.0016 13.997 16.198 13.7545 16.198ZM13.7545 20.5124H5.79795C5.55499 20.5124 5.35861 20.316 5.35861 20.073C5.35861 19.8301 5.55499 19.6337 5.79795 19.6337H13.7541C13.997 19.6337 14.1934 19.8301 14.1934 20.073C14.1934 20.316 13.997 20.5124 13.7545 20.5124Z"
fill=
"#C2C7EB"
/>
<path
d=
"M7.88881 8.89676C10.3456 8.89676 12.3372 6.90515 12.3372 4.44838C12.3372 1.99161 10.3456 0 7.88881 0C5.43204 0 3.44043 1.99161 3.44043 4.44838C3.44043 6.90515 5.43204 8.89676 7.88881 8.89676Z"
fill=
"#1EC75C"
/>
<path
d=
"M9.26328 5.85556C9.17629 5.85556 9.08798 5.82964 9.01109 5.77516L7.63594 4.80772C7.51864 4.72556 7.44922 4.59156 7.44922 4.44834V1.85927C7.44922 1.61631 7.64561 1.41992 7.88857 1.41992C8.13152 1.41992 8.32791 1.61631 8.32791 1.85927V4.22032L9.51634 5.05683C9.71493 5.1961 9.76282 5.47026 9.62266 5.66884C9.53743 5.79054 9.40124 5.85556 9.26328 5.85556Z"
fill=
"white"
/>
</svg>
assets/svg/crm_cont_details.svg
0 → 100644
View file @
a7dc0d35
<svg
width=
"18"
height=
"18"
viewBox=
"0 0 18 18"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M7.25585 4.10721C7.02274 1.42584 4.22542 0.110169 4.10703 0.0564685C3.99636 0.0044444 3.87234 -0.0121773 3.75187 0.0088702C0.522505 0.544657 0.0367573 2.42418 0.0172298 2.50229C-0.00933825 2.61114 -0.0051126 2.72523 0.0294345 2.83182C3.88124 14.7827 11.8863 16.9978 14.5176 17.7265C14.7202 17.7826 14.8875 17.8277 15.0144 17.8692C15.1592 17.9166 15.3166 17.9074 15.455 17.8436C15.5355 17.807 17.437 16.9112 17.902 13.9894C17.9226 13.8618 17.9021 13.731 17.8434 13.6159C17.8019 13.5354 16.8073 11.6424 14.049 10.9736C13.9554 10.9497 13.8574 10.9488 13.7635 10.9711C13.6695 10.9935 13.5824 11.0383 13.5095 11.1017C12.6393 11.845 11.4372 12.6371 10.9185 12.7189C7.44136 11.0187 5.49959 7.75642 5.42636 7.13764C5.38364 6.78981 6.18061 5.56812 7.09718 4.57465C7.15479 4.51213 7.19867 4.43824 7.226 4.35773C7.25332 4.27722 7.26349 4.19189 7.25585 4.10721Z"
fill=
"#0D9C00"
/>
</svg>
assets/svg/crm_follow_up_details.svg
0 → 100644
View file @
a7dc0d35
<svg
width=
"16"
height=
"22"
viewBox=
"0 0 16 22"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M15.9862 7.60213L8.99224 0H2.99741C2.20245 0 1.44005 0.343259 0.877922 0.954263C0.315798 1.56527 0 2.39397 0 3.25806V18.4623C0 19.3264 0.315798 20.1551 0.877922 20.7661C1.44005 21.3771 2.20245 21.7204 2.99741 21.7204H12.9888C13.7837 21.7204 14.5462 21.3771 15.1083 20.7661C15.6704 20.1551 15.9862 19.3264 15.9862 18.4623V7.60213Z"
fill=
"url(#paint0_linear_1101_3161)"
/>
<defs>
<linearGradient
id=
"paint0_linear_1101_3161"
x1=
"7.9931"
y1=
"9.63049"
x2=
"20.9968"
y2=
"33.8665"
gradientUnits=
"userSpaceOnUse"
>
<stop
stop-color=
"#B2B1FF"
/>
<stop
offset=
"1"
stop-color=
"#6563FF"
/>
</linearGradient>
</defs>
</svg>
assets/svg/crm_prod_details.svg
0 → 100644
View file @
a7dc0d35
<svg
width=
"25"
height=
"15"
viewBox=
"0 0 25 15"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M22.4139 4.41176V15H11.207V0L13.7932 4.41176H22.4139Z"
fill=
"#FF9811"
/>
<path
d=
"M22.4135 4.41016V5.29251H14.6549L14.1377 4.41016H22.4135Z"
fill=
"#EE8700"
/>
<path
d=
"M11.2066 0H2.58594V15H11.2066V0Z"
fill=
"#FFB655"
/>
<path
d=
"M8.18971 0V4.41176L6.89661 3.52941L5.60352 4.41176V0H8.18971Z"
fill=
"#E6E7E8"
/>
<path
d=
"M2.58619 0V4.41176H0L2.58619 0Z"
fill=
"#FF9811"
/>
<path
d=
"M19.8274 7.05859H13.793V10.588H19.8274V7.05859Z"
fill=
"#E6E7E8"
/>
<path
d=
"M22.4139 0L25.0001 4.41176H22.4139H13.7932L11.207 0H22.4139Z"
fill=
"#FFB655"
/>
<path
d=
"M21.1206 12.793H19.3965V13.6753H21.1206V12.793Z"
fill=
"#FFB655"
/>
<path
d=
"M18.5339 12.793H17.6719V13.6753H18.5339V12.793Z"
fill=
"#FFB655"
/>
<path
d=
"M15.948 8.38281H15.0859V9.26517H15.948V8.38281Z"
fill=
"#BCBEC0"
/>
<path
d=
"M18.5347 8.38281H16.8105V9.26517H18.5347V8.38281Z"
fill=
"#BCBEC0"
/>
</svg>
assets/svg/crm_quotation_details.svg
0 → 100644
View file @
a7dc0d35
<svg
width=
"18"
height=
"25"
viewBox=
"0 0 18 25"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M17.7803 7.63063V23.7131C17.7803 24.1463 17.4391 24.5006 17.0147 24.5006H3.24656C2.82219 24.5006 2.47656 24.1463 2.47656 23.7131V3.22938C2.47656 2.79188 2.82219 2.4375 3.24656 2.4375H12.7228C13.0291 2.4375 13.3222 2.56438 13.5366 2.7875L15.3784 4.6775L17.4434 6.795C17.6578 7.01813 17.7803 7.32 17.7803 7.63063Z"
fill=
"#FFF2D9"
/>
<path
d=
"M15.3781 0.875V4.67687L13.5362 2.78687C13.3219 2.56375 13.0287 2.43687 12.7225 2.43687H3.24625C2.82187 2.43687 2.47625 2.79125 2.47625 3.22875V21.9756H0.875C0.39375 21.9756 0 21.5862 0 21.1006V0.875C0 0.39375 0.39375 0 0.875 0H14.5031C14.9887 0 15.3781 0.39375 15.3781 0.875Z"
fill=
"#FFDE8F"
/>
<path
d=
"M14.7657 7.56055H5.49512C5.19324 7.56055 4.94824 7.80555 4.94824 8.10742C4.94824 8.4093 5.19324 8.6543 5.49512 8.6543H14.7657C15.0676 8.6543 15.3126 8.4093 15.3126 8.10742C15.3126 7.80555 15.0676 7.56055 14.7657 7.56055ZM14.7657 10.8287H5.49512C5.19324 10.8287 4.94824 11.0737 4.94824 11.3755C4.94824 11.6774 5.19324 11.9224 5.49512 11.9224H14.7657C15.0676 11.9224 15.3126 11.6774 15.3126 11.3755C15.3126 11.0737 15.0676 10.8287 14.7657 10.8287ZM14.7657 14.0968H5.49512C5.19324 14.0968 4.94824 14.3418 4.94824 14.6437C4.94824 14.9455 5.19324 15.1905 5.49512 15.1905H14.7657C15.0676 15.1905 15.3126 14.9455 15.3126 14.6437C15.3126 14.3418 15.0676 14.0968 14.7657 14.0968ZM14.7657 17.3649H5.49512C5.19324 17.3649 4.94824 17.6099 4.94824 17.9118C4.94824 18.2137 5.19324 18.4587 5.49512 18.4587H14.7657C15.0676 18.4587 15.3126 18.2137 15.3126 17.9118C15.3126 17.6099 15.0676 17.3649 14.7657 17.3649ZM14.7657 20.6287H5.49512C5.19324 20.6287 4.94824 20.8737 4.94824 21.1755C4.94824 21.4774 5.19324 21.7224 5.49512 21.7224H14.7657C15.0676 21.7224 15.3126 21.4774 15.3126 21.1755C15.3126 20.8737 15.0676 20.6287 14.7657 20.6287Z"
fill=
"#7CC0D2"
/>
<path
d=
"M15.3779 0.875V4.67687L14.0654 3.32937V0.875C14.0654 0.39375 13.6761 0 13.1904 0H14.5029C14.9886 0 15.3779 0.39375 15.3779 0.875Z"
fill=
"#F4C464"
/>
<path
d=
"M17.7802 7.63063V23.7131C17.7802 24.1463 17.4389 24.5006 17.0145 24.5006H15.702C16.1264 24.5006 16.4677 24.1463 16.4677 23.7131V7.63063C16.4677 7.32 16.3452 7.01813 16.1308 6.795L14.0658 4.6775L12.2239 2.7875C12.0095 2.56438 11.7164 2.4375 11.4102 2.4375H12.7227C13.0289 2.4375 13.322 2.56438 13.5364 2.7875L15.3783 4.6775L17.4433 6.795C17.6577 7.01813 17.7802 7.32 17.7802 7.63063Z"
fill=
"#FCE3BB"
/>
</svg>
lib/Models/crmModels/AccessiblePagesResponse.dart
0 → 100644
View file @
a7dc0d35
class
AccessiblePagesResponse
{
String
?
error
;
List
<
PagesAccessible
>?
pagesAccessible
;
String
?
message
;
AccessiblePagesResponse
({
this
.
error
,
this
.
pagesAccessible
,
this
.
message
});
AccessiblePagesResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
if
(
json
[
'pages_accessible'
]
!=
null
)
{
pagesAccessible
=
<
PagesAccessible
>[];
json
[
'pages_accessible'
].
forEach
((
v
)
{
pagesAccessible
!.
add
(
new
PagesAccessible
.
fromJson
(
v
));
});
}
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
if
(
this
.
pagesAccessible
!=
null
)
{
data
[
'pages_accessible'
]
=
this
.
pagesAccessible
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
PagesAccessible
{
int
?
id
;
String
?
pageName
;
String
?
mode
;
PagesAccessible
({
this
.
id
,
this
.
pageName
,
this
.
mode
});
PagesAccessible
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
pageName
=
json
[
'page_name'
];
mode
=
json
[
'mode'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'page_name'
]
=
this
.
pageName
;
data
[
'mode'
]
=
this
.
mode
;
return
data
;
}
}
lib/Models/crmModels/LeadDetailsResponse.dart
0 → 100644
View file @
a7dc0d35
class
LeadDetailsResponse
{
String
?
error
;
LeadDetails
?
leadDetails
;
AccountDetails
?
accountDetails
;
List
<
LeadProducts
>?
leadProducts
;
List
<
ContactDetails
>?
contactDetails
;
List
<
FollowupDetails
>?
followupDetails
;
List
<
AppointmentDetails
>?
appointmentDetails
;
List
<
QuotationsDetails
>?
quotationsDetails
;
String
?
message
;
LeadDetailsResponse
(
{
this
.
error
,
this
.
leadDetails
,
this
.
accountDetails
,
this
.
leadProducts
,
this
.
contactDetails
,
this
.
followupDetails
,
this
.
appointmentDetails
,
this
.
quotationsDetails
,
this
.
message
});
LeadDetailsResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
error
=
json
[
'error'
];
leadDetails
=
json
[
'lead_details'
]
!=
null
?
new
LeadDetails
.
fromJson
(
json
[
'lead_details'
])
:
null
;
accountDetails
=
json
[
'account_details'
]
!=
null
?
new
AccountDetails
.
fromJson
(
json
[
'account_details'
])
:
null
;
if
(
json
[
'lead_products'
]
!=
null
)
{
leadProducts
=
<
LeadProducts
>[];
json
[
'lead_products'
].
forEach
((
v
)
{
leadProducts
!.
add
(
new
LeadProducts
.
fromJson
(
v
));
});
}
if
(
json
[
'contact_details'
]
!=
null
)
{
contactDetails
=
<
ContactDetails
>[];
json
[
'contact_details'
].
forEach
((
v
)
{
contactDetails
!.
add
(
new
ContactDetails
.
fromJson
(
v
));
});
}
if
(
json
[
'followup_details'
]
!=
null
)
{
followupDetails
=
<
FollowupDetails
>[];
json
[
'followup_details'
].
forEach
((
v
)
{
followupDetails
!.
add
(
new
FollowupDetails
.
fromJson
(
v
));
});
}
if
(
json
[
'appointment_details'
]
!=
null
)
{
appointmentDetails
=
<
AppointmentDetails
>[];
json
[
'appointment_details'
].
forEach
((
v
)
{
appointmentDetails
!.
add
(
new
AppointmentDetails
.
fromJson
(
v
));
});
}
if
(
json
[
'quotations_details'
]
!=
null
)
{
quotationsDetails
=
<
QuotationsDetails
>[];
json
[
'quotations_details'
].
forEach
((
v
)
{
quotationsDetails
!.
add
(
new
QuotationsDetails
.
fromJson
(
v
));
});
}
message
=
json
[
'message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'error'
]
=
this
.
error
;
if
(
this
.
leadDetails
!=
null
)
{
data
[
'lead_details'
]
=
this
.
leadDetails
!.
toJson
();
}
if
(
this
.
accountDetails
!=
null
)
{
data
[
'account_details'
]
=
this
.
accountDetails
!.
toJson
();
}
if
(
this
.
leadProducts
!=
null
)
{
data
[
'lead_products'
]
=
this
.
leadProducts
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
contactDetails
!=
null
)
{
data
[
'contact_details'
]
=
this
.
contactDetails
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
followupDetails
!=
null
)
{
data
[
'followup_details'
]
=
this
.
followupDetails
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
appointmentDetails
!=
null
)
{
data
[
'appointment_details'
]
=
this
.
appointmentDetails
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
if
(
this
.
quotationsDetails
!=
null
)
{
data
[
'quotations_details'
]
=
this
.
quotationsDetails
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
data
[
'message'
]
=
this
.
message
;
return
data
;
}
}
class
LeadDetails
{
String
?
id
;
String
?
ownerId
;
String
?
accId
;
String
?
accManagerId
;
String
?
status
;
String
?
openStatus
;
String
?
date
;
String
?
closeDate
;
String
?
closereason
;
String
?
competitor
;
String
?
orderGainId
;
String
?
isExists
;
String
?
createdDatetime
;
String
?
updatedDatetime
;
String
?
followupFunction
;
String
?
name
;
String
?
contName
;
String
?
address
;
String
?
mob1
;
String
?
mob2
;
String
?
tel
;
String
?
email
;
String
?
prod
;
String
?
lage
;
String
?
copyMessage
;
LeadDetails
(
{
this
.
id
,
this
.
ownerId
,
this
.
accId
,
this
.
accManagerId
,
this
.
status
,
this
.
openStatus
,
this
.
date
,
this
.
closeDate
,
this
.
closereason
,
this
.
competitor
,
this
.
orderGainId
,
this
.
isExists
,
this
.
createdDatetime
,
this
.
updatedDatetime
,
this
.
followupFunction
,
this
.
name
,
this
.
contName
,
this
.
address
,
this
.
mob1
,
this
.
mob2
,
this
.
tel
,
this
.
email
,
this
.
prod
,
this
.
lage
,
this
.
copyMessage
});
LeadDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
ownerId
=
json
[
'owner_id'
];
accId
=
json
[
'acc_id'
];
accManagerId
=
json
[
'acc_manager_id'
];
status
=
json
[
'status'
];
openStatus
=
json
[
'open_status'
];
date
=
json
[
'date'
];
closeDate
=
json
[
'close_date'
];
closereason
=
json
[
'closereason'
];
competitor
=
json
[
'competitor'
];
orderGainId
=
json
[
'order_gain_id'
];
isExists
=
json
[
'is_exists'
];
createdDatetime
=
json
[
'created_datetime'
];
updatedDatetime
=
json
[
'updated_datetime'
];
followupFunction
=
json
[
'followup_function'
];
name
=
json
[
'name'
];
contName
=
json
[
'cont_name'
];
address
=
json
[
'address'
];
mob1
=
json
[
'mob1'
];
mob2
=
json
[
'mob2'
];
tel
=
json
[
'tel'
];
email
=
json
[
'email'
];
prod
=
json
[
'prod'
];
lage
=
json
[
'lage'
];
copyMessage
=
json
[
'copy_message'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'owner_id'
]
=
this
.
ownerId
;
data
[
'acc_id'
]
=
this
.
accId
;
data
[
'acc_manager_id'
]
=
this
.
accManagerId
;
data
[
'status'
]
=
this
.
status
;
data
[
'open_status'
]
=
this
.
openStatus
;
data
[
'date'
]
=
this
.
date
;
data
[
'close_date'
]
=
this
.
closeDate
;
data
[
'closereason'
]
=
this
.
closereason
;
data
[
'competitor'
]
=
this
.
competitor
;
data
[
'order_gain_id'
]
=
this
.
orderGainId
;
data
[
'is_exists'
]
=
this
.
isExists
;
data
[
'created_datetime'
]
=
this
.
createdDatetime
;
data
[
'updated_datetime'
]
=
this
.
updatedDatetime
;
data
[
'followup_function'
]
=
this
.
followupFunction
;
data
[
'name'
]
=
this
.
name
;
data
[
'cont_name'
]
=
this
.
contName
;
data
[
'address'
]
=
this
.
address
;
data
[
'mob1'
]
=
this
.
mob1
;
data
[
'mob2'
]
=
this
.
mob2
;
data
[
'tel'
]
=
this
.
tel
;
data
[
'email'
]
=
this
.
email
;
data
[
'prod'
]
=
this
.
prod
;
data
[
'lage'
]
=
this
.
lage
;
data
[
'copy_message'
]
=
this
.
copyMessage
;
return
data
;
}
}
class
AccountDetails
{
String
?
id
;
String
?
tempId
;
String
?
ownerId
;
String
?
accManagerId
;
String
?
name
;
String
?
salutationName
;
String
?
subLocality
;
String
?
district
;
String
?
state
;
String
?
pincode
;
String
?
address
;
String
?
date
;
String
?
source
;
String
?
reference
;
String
?
segment
;
String
?
team
;
String
?
gstNumber
;
String
?
isExists
;
String
?
createdDatetime
;
String
?
updatedDatetime
;
String
?
email
;
String
?
mob1
;
String
?
accManager
;
String
?
owner
;
AccountDetails
(
{
this
.
id
,
this
.
tempId
,
this
.
ownerId
,
this
.
accManagerId
,
this
.
name
,
this
.
salutationName
,
this
.
subLocality
,
this
.
district
,
this
.
state
,
this
.
pincode
,
this
.
address
,
this
.
date
,
this
.
source
,
this
.
reference
,
this
.
segment
,
this
.
team
,
this
.
gstNumber
,
this
.
isExists
,
this
.
createdDatetime
,
this
.
updatedDatetime
,
this
.
email
,
this
.
mob1
,
this
.
accManager
,
this
.
owner
});
AccountDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
tempId
=
json
[
'temp_id'
];
ownerId
=
json
[
'owner_id'
];
accManagerId
=
json
[
'acc_manager_id'
];
name
=
json
[
'name'
];
salutationName
=
json
[
'salutation_name'
];
subLocality
=
json
[
'sub_locality'
];
district
=
json
[
'district'
];
state
=
json
[
'state'
];
pincode
=
json
[
'pincode'
];
address
=
json
[
'address'
];
date
=
json
[
'date'
];
source
=
json
[
'source'
];
reference
=
json
[
'reference'
];
segment
=
json
[
'segment'
];
team
=
json
[
'team'
];
gstNumber
=
json
[
'gst_number'
];
isExists
=
json
[
'is_exists'
];
createdDatetime
=
json
[
'created_datetime'
];
updatedDatetime
=
json
[
'updated_datetime'
];
email
=
json
[
'email'
];
mob1
=
json
[
'mob1'
];
accManager
=
json
[
'acc_manager'
];
owner
=
json
[
'owner'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'temp_id'
]
=
this
.
tempId
;
data
[
'owner_id'
]
=
this
.
ownerId
;
data
[
'acc_manager_id'
]
=
this
.
accManagerId
;
data
[
'name'
]
=
this
.
name
;
data
[
'salutation_name'
]
=
this
.
salutationName
;
data
[
'sub_locality'
]
=
this
.
subLocality
;
data
[
'district'
]
=
this
.
district
;
data
[
'state'
]
=
this
.
state
;
data
[
'pincode'
]
=
this
.
pincode
;
data
[
'address'
]
=
this
.
address
;
data
[
'date'
]
=
this
.
date
;
data
[
'source'
]
=
this
.
source
;
data
[
'reference'
]
=
this
.
reference
;
data
[
'segment'
]
=
this
.
segment
;
data
[
'team'
]
=
this
.
team
;
data
[
'gst_number'
]
=
this
.
gstNumber
;
data
[
'is_exists'
]
=
this
.
isExists
;
data
[
'created_datetime'
]
=
this
.
createdDatetime
;
data
[
'updated_datetime'
]
=
this
.
updatedDatetime
;
data
[
'email'
]
=
this
.
email
;
data
[
'mob1'
]
=
this
.
mob1
;
data
[
'acc_manager'
]
=
this
.
accManager
;
data
[
'owner'
]
=
this
.
owner
;
return
data
;
}
}
class
LeadProducts
{
String
?
id
;
String
?
leadId
;
String
?
productId
;
String
?
qty
;
String
?
price
;
String
?
date
;
String
?
isDel
;
String
?
isExists
;
String
?
createdDatetime
;
String
?
updatedDatetime
;
String
?
productName
;
LeadProducts
(
{
this
.
id
,
this
.
leadId
,
this
.
productId
,
this
.
qty
,
this
.
price
,
this
.
date
,
this
.
isDel
,
this
.
isExists
,
this
.
createdDatetime
,
this
.
updatedDatetime
,
this
.
productName
});
LeadProducts
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
leadId
=
json
[
'lead_id'
];
productId
=
json
[
'product_id'
];
qty
=
json
[
'qty'
];
price
=
json
[
'price'
];
date
=
json
[
'date'
];
isDel
=
json
[
'is_del'
];
isExists
=
json
[
'is_exists'
];
createdDatetime
=
json
[
'created_datetime'
];
updatedDatetime
=
json
[
'updated_datetime'
];
productName
=
json
[
'product_name'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'lead_id'
]
=
this
.
leadId
;
data
[
'product_id'
]
=
this
.
productId
;
data
[
'qty'
]
=
this
.
qty
;
data
[
'price'
]
=
this
.
price
;
data
[
'date'
]
=
this
.
date
;
data
[
'is_del'
]
=
this
.
isDel
;
data
[
'is_exists'
]
=
this
.
isExists
;
data
[
'created_datetime'
]
=
this
.
createdDatetime
;
data
[
'updated_datetime'
]
=
this
.
updatedDatetime
;
data
[
'product_name'
]
=
this
.
productName
;
return
data
;
}
}
class
ContactDetails
{
String
?
id
;
String
?
accId
;
String
?
name
;
String
?
salutationName
;
String
?
mob1
;
String
?
mob2
;
String
?
tel
;
String
?
email
;
String
?
type
;
String
?
designation
;
String
?
date
;
String
?
isExists
;
String
?
createdDatetime
;
String
?
updatedDatetime
;
ContactDetails
(
{
this
.
id
,
this
.
accId
,
this
.
name
,
this
.
salutationName
,
this
.
mob1
,
this
.
mob2
,
this
.
tel
,
this
.
email
,
this
.
type
,
this
.
designation
,
this
.
date
,
this
.
isExists
,
this
.
createdDatetime
,
this
.
updatedDatetime
});
ContactDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
accId
=
json
[
'acc_id'
];
name
=
json
[
'name'
];
salutationName
=
json
[
'salutation_name'
];
mob1
=
json
[
'mob1'
];
mob2
=
json
[
'mob2'
];
tel
=
json
[
'tel'
];
email
=
json
[
'email'
];
type
=
json
[
'type'
];
designation
=
json
[
'designation'
];
date
=
json
[
'date'
];
isExists
=
json
[
'is_exists'
];
createdDatetime
=
json
[
'created_datetime'
];
updatedDatetime
=
json
[
'updated_datetime'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'acc_id'
]
=
this
.
accId
;
data
[
'name'
]
=
this
.
name
;
data
[
'salutation_name'
]
=
this
.
salutationName
;
data
[
'mob1'
]
=
this
.
mob1
;
data
[
'mob2'
]
=
this
.
mob2
;
data
[
'tel'
]
=
this
.
tel
;
data
[
'email'
]
=
this
.
email
;
data
[
'type'
]
=
this
.
type
;
data
[
'designation'
]
=
this
.
designation
;
data
[
'date'
]
=
this
.
date
;
data
[
'is_exists'
]
=
this
.
isExists
;
data
[
'created_datetime'
]
=
this
.
createdDatetime
;
data
[
'updated_datetime'
]
=
this
.
updatedDatetime
;
return
data
;
}
}
class
FollowupDetails
{
String
?
ename
;
String
?
ftype
;
String
?
fdate
;
String
?
finTime
;
String
?
foutTime
;
String
?
fstatus
;
String
?
ffeedback
;
FollowupDetails
(
{
this
.
ename
,
this
.
ftype
,
this
.
fdate
,
this
.
finTime
,
this
.
foutTime
,
this
.
fstatus
,
this
.
ffeedback
});
FollowupDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
ename
=
json
[
'ename'
];
ftype
=
json
[
'ftype'
];
fdate
=
json
[
'fdate'
];
finTime
=
json
[
'fin_time'
];
foutTime
=
json
[
'fout_time'
];
fstatus
=
json
[
'fstatus'
];
ffeedback
=
json
[
'ffeedback'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'ename'
]
=
this
.
ename
;
data
[
'ftype'
]
=
this
.
ftype
;
data
[
'fdate'
]
=
this
.
fdate
;
data
[
'fin_time'
]
=
this
.
finTime
;
data
[
'fout_time'
]
=
this
.
foutTime
;
data
[
'fstatus'
]
=
this
.
fstatus
;
data
[
'ffeedback'
]
=
this
.
ffeedback
;
return
data
;
}
}
class
AppointmentDetails
{
String
?
ename
;
String
?
aappDate
;
String
?
atype
;
String
?
anote
;
String
?
astatus
;
String
?
adate
;
AppointmentDetails
(
{
this
.
ename
,
this
.
aappDate
,
this
.
atype
,
this
.
anote
,
this
.
astatus
,
this
.
adate
});
AppointmentDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
ename
=
json
[
'ename'
];
aappDate
=
json
[
'aapp_date'
];
atype
=
json
[
'atype'
];
anote
=
json
[
'anote'
];
astatus
=
json
[
'astatus'
];
adate
=
json
[
'adate'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'ename'
]
=
this
.
ename
;
data
[
'aapp_date'
]
=
this
.
aappDate
;
data
[
'atype'
]
=
this
.
atype
;
data
[
'anote'
]
=
this
.
anote
;
data
[
'astatus'
]
=
this
.
astatus
;
data
[
'adate'
]
=
this
.
adate
;
return
data
;
}
}
class
QuotationsDetails
{
String
?
id
;
String
?
empId
;
String
?
leadId
;
String
?
email
;
String
?
mobile
;
String
?
quote
;
String
?
info
;
String
?
type
;
String
?
quoteType
;
String
?
subject
;
String
?
taxes
;
String
?
spclNote
;
String
?
forTxt
;
String
?
payTerms
;
String
?
priceShead
;
String
?
extraChargeNarr
;
String
?
extraChargeAmount
;
String
?
transportCharge
;
String
?
loadUnloadCharge
;
String
?
minDuration
;
String
?
deliveryPeriod
;
String
?
minAdvance
;
String
?
extraHoursCharge
;
String
?
date
;
String
?
isExists
;
String
?
createdDatetime
;
String
?
updatedDatetime
;
String
?
employee
;
QuotationsDetails
(
{
this
.
id
,
this
.
empId
,
this
.
leadId
,
this
.
email
,
this
.
mobile
,
this
.
quote
,
this
.
info
,
this
.
type
,
this
.
quoteType
,
this
.
subject
,
this
.
taxes
,
this
.
spclNote
,
this
.
forTxt
,
this
.
payTerms
,
this
.
priceShead
,
this
.
extraChargeNarr
,
this
.
extraChargeAmount
,
this
.
transportCharge
,
this
.
loadUnloadCharge
,
this
.
minDuration
,
this
.
deliveryPeriod
,
this
.
minAdvance
,
this
.
extraHoursCharge
,
this
.
date
,
this
.
isExists
,
this
.
createdDatetime
,
this
.
updatedDatetime
,
this
.
employee
});
QuotationsDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
empId
=
json
[
'emp_id'
];
leadId
=
json
[
'lead_id'
];
email
=
json
[
'email'
];
mobile
=
json
[
'mobile'
];
quote
=
json
[
'quote'
];
info
=
json
[
'info'
];
type
=
json
[
'type'
];
quoteType
=
json
[
'quote_type'
];
subject
=
json
[
'subject'
];
taxes
=
json
[
'taxes'
];
spclNote
=
json
[
'spcl_note'
];
forTxt
=
json
[
'for_txt'
];
payTerms
=
json
[
'pay_terms'
];
priceShead
=
json
[
'price_shead'
];
extraChargeNarr
=
json
[
'extra_charge_narr'
];
extraChargeAmount
=
json
[
'extra_charge_amount'
];
transportCharge
=
json
[
'transport_charge'
];
loadUnloadCharge
=
json
[
'load_unload_charge'
];
minDuration
=
json
[
'min_duration'
];
deliveryPeriod
=
json
[
'delivery_period'
];
minAdvance
=
json
[
'min_advance'
];
extraHoursCharge
=
json
[
'extra_hours_charge'
];
date
=
json
[
'date'
];
isExists
=
json
[
'is_exists'
];
createdDatetime
=
json
[
'created_datetime'
];
updatedDatetime
=
json
[
'updated_datetime'
];
employee
=
json
[
'employee'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'id'
]
=
this
.
id
;
data
[
'emp_id'
]
=
this
.
empId
;
data
[
'lead_id'
]
=
this
.
leadId
;
data
[
'email'
]
=
this
.
email
;
data
[
'mobile'
]
=
this
.
mobile
;
data
[
'quote'
]
=
this
.
quote
;
data
[
'info'
]
=
this
.
info
;
data
[
'type'
]
=
this
.
type
;
data
[
'quote_type'
]
=
this
.
quoteType
;
data
[
'subject'
]
=
this
.
subject
;
data
[
'taxes'
]
=
this
.
taxes
;
data
[
'spcl_note'
]
=
this
.
spclNote
;
data
[
'for_txt'
]
=
this
.
forTxt
;
data
[
'pay_terms'
]
=
this
.
payTerms
;
data
[
'price_shead'
]
=
this
.
priceShead
;
data
[
'extra_charge_narr'
]
=
this
.
extraChargeNarr
;
data
[
'extra_charge_amount'
]
=
this
.
extraChargeAmount
;
data
[
'transport_charge'
]
=
this
.
transportCharge
;
data
[
'load_unload_charge'
]
=
this
.
loadUnloadCharge
;
data
[
'min_duration'
]
=
this
.
minDuration
;
data
[
'delivery_period'
]
=
this
.
deliveryPeriod
;
data
[
'min_advance'
]
=
this
.
minAdvance
;
data
[
'extra_hours_charge'
]
=
this
.
extraHoursCharge
;
data
[
'date'
]
=
this
.
date
;
data
[
'is_exists'
]
=
this
.
isExists
;
data
[
'created_datetime'
]
=
this
.
createdDatetime
;
data
[
'updated_datetime'
]
=
this
.
updatedDatetime
;
data
[
'employee'
]
=
this
.
employee
;
return
data
;
}
}
lib/Models/crmModels/LeadListViewResponse.dart
View file @
a7dc0d35
...
@@ -3,8 +3,16 @@ class LeadListViewResponse {
...
@@ -3,8 +3,16 @@ class LeadListViewResponse {
List
<
Teams
>?
teams
;
List
<
Teams
>?
teams
;
List
<
States
>?
states
;
List
<
States
>?
states
;
List
<
Employees
>?
employees
;
List
<
Employees
>?
employees
;
String
?
error
;
String
?
message
;
LeadListViewResponse
({
this
.
sources
,
this
.
teams
,
this
.
states
,
this
.
employees
});
LeadListViewResponse
(
{
this
.
sources
,
this
.
teams
,
this
.
states
,
this
.
employees
,
this
.
error
,
this
.
message
});
LeadListViewResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
LeadListViewResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'sources'
]
!=
null
)
{
if
(
json
[
'sources'
]
!=
null
)
{
...
@@ -31,6 +39,8 @@ class LeadListViewResponse {
...
@@ -31,6 +39,8 @@ class LeadListViewResponse {
employees
!.
add
(
new
Employees
.
fromJson
(
v
));
employees
!.
add
(
new
Employees
.
fromJson
(
v
));
});
});
}
}
error
=
json
[
'error'
];
message
=
json
[
'message'
];
}
}
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
...
@@ -47,6 +57,8 @@ class LeadListViewResponse {
...
@@ -47,6 +57,8 @@ class LeadListViewResponse {
if
(
this
.
employees
!=
null
)
{
if
(
this
.
employees
!=
null
)
{
data
[
'employees'
]
=
this
.
employees
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
data
[
'employees'
]
=
this
.
employees
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
}
data
[
'error'
]
=
this
.
error
;
data
[
'message'
]
=
this
.
message
;
return
data
;
return
data
;
}
}
}
}
...
...
lib/Notifiers/PendingComplaintsProvider.dart
View file @
a7dc0d35
...
@@ -86,14 +86,16 @@ class Pendingcomplaintsprovider extends ChangeNotifier {
...
@@ -86,14 +86,16 @@ class Pendingcomplaintsprovider extends ChangeNotifier {
runningHoursError
=
""
;
runningHoursError
=
""
;
_image
=
null
;
_image
=
null
;
_imageName
=
null
;
_imageName
=
null
;
notifyListeners
();
checkDropDownSelected
();
checkDropDownSelected
();
notifyListeners
();
}
}
void
checkDropDownSelected
(){
void
checkDropDownSelected
(){
if
(
_statusId
!=
null
&&
if
(
_statusId
!=
null
&&
!
CompletedStatus
.
contains
(
_statusId
))
{
!
CompletedStatus
.
contains
(
_statusId
))
{
_statusId
=
""
;
_statusId
=
null
;
}
}
notifyListeners
();
}
}
...
...
lib/Notifiers/commonProvider/commonPagesProvider.dart
View file @
a7dc0d35
...
@@ -25,4 +25,5 @@ class Commonpagesprovider extends ChangeNotifier{
...
@@ -25,4 +25,5 @@ class Commonpagesprovider extends ChangeNotifier{
}
}
}
}
}
}
\ No newline at end of file
lib/Notifiers/crmProvider/LeadListProvider.dart
View file @
a7dc0d35
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:flutter/foundation.dart'
;
import
'package:generp/Models/crmModels/GetSegmentOnTeamResponse.dart'
;
import
'package:generp/Models/crmModels/GetSourceOnReferenceResponse.dart'
;
import
'package:generp/Models/crmModels/LeadListViewResponse.dart'
;
import
'package:generp/Models/crmModels/SubmitLeadListFilterResponse.dart'
;
import
'package:provider/provider.dart'
;
class
Leadlistprovider
extends
ChangeNotifier
{
import
'../../Models/crmModels/GetDistrictOnStateResponse.dart'
;
import
'../../Models/crmModels/GetSubLocOnDistrictResponse.dart'
;
import
'../../Models/crmModels/LeadListContactPopUpResponse.dart'
show
Contacts
;
import
'../../services/api_calling.dart'
;
import
'../HomeScreenNotifier.dart'
;
class
Leadlistprovider
extends
ChangeNotifier
{
TextEditingController
sLeadIDController
=
TextEditingController
();
TextEditingController
mobileNumberController
=
TextEditingController
();
TextEditingController
companyNameController
=
TextEditingController
(
text:
"a"
,
);
bool
_isLoading
=
true
;
List
<
Sources
>
_sourcesList
=
[];
List
<
Teams
>
_teamsList
=
[];
List
<
States
>
_statesList
=
[];
List
<
Employees
>
_employeesList
=
[];
List
<
References
>
_referencesList
=
[];
List
<
Segments
>
_segmentsList
=
[];
List
<
Districts
>
_districtsList
=
[];
List
<
SubLocations
>
_subLocationsList
=
[];
List
<
Contacts
>
_contactsList
=
[];
List
<
LeadList
>
_crmLeadList
=
[];
List
<
String
?>
_leadStatusList
=
[];
List
<
String
?>
_openStatusList
=
[];
Sources
?
_selectedSources
;
Teams
?
_selectedTeams
;
States
?
_selectedStates
;
Employees
?
_selectedEmployees
;
References
?
_selectedReferences
;
Segments
?
_selectedSegments
;
Districts
?
_selectedDistricts
;
SubLocations
?
_selectedSubLocations
;
Contacts
?
_selectedContacts
;
String
?
_selectedLeadStatus
;
String
?
_selectedOpenStatus
;
String
?
_selectedSourceId
;
String
?
_selectedSourceValue
;
String
?
_selectedTeamId
;
String
?
_selectedTeamValue
;
String
?
_selectedStateId
;
String
?
_selectedStateValue
;
String
?
_selectedEmployeeId
;
String
?
_selectedEmployeeValue
;
String
?
_selectedReferenceId
;
String
?
_selectedReferenceValue
;
String
?
_selectedSegmentId
;
String
?
_selectedSegmentValue
;
String
?
_selectedDistrictId
;
String
?
_selectedDistrictValue
;
String
?
_selectedSubLocationId
;
String
?
_selectedSubLocationValue
;
String
?
_selectedContactId
;
String
?
_selectedContactValue
;
bool
get
isLoading
=>
_isLoading
;
List
<
Sources
>
get
sourcesList
=>
_sourcesList
;
List
<
Teams
>
get
teamsList
=>
_teamsList
;
List
<
States
>
get
statesList
=>
_statesList
;
List
<
Employees
>
get
employeesList
=>
_employeesList
;
List
<
References
>
get
referencesList
=>
_referencesList
;
List
<
Segments
>
get
segmentsList
=>
_segmentsList
;
List
<
Districts
>
get
districtsList
=>
_districtsList
;
List
<
SubLocations
>
get
subLocationsList
=>
_subLocationsList
;
List
<
Contacts
>
get
contactsList
=>
_contactsList
;
List
<
LeadList
>
get
crmLeadList
=>
_crmLeadList
;
List
<
String
?>
get
leadStatusList
=>
_leadStatusList
;
List
<
String
?>
get
openStatusList
=>
_openStatusList
;
Sources
?
get
selectedSources
=>
_selectedSources
;
Teams
?
get
selectedTeams
=>
_selectedTeams
;
States
?
get
selectedStates
=>
_selectedStates
;
Employees
?
get
selectedEmployees
=>
_selectedEmployees
;
References
?
get
selectedReferences
=>
_selectedReferences
;
Segments
?
get
selectedSegments
=>
_selectedSegments
;
Districts
?
get
selectedDistricts
=>
_selectedDistricts
;
SubLocations
?
get
selectedSubLocations
=>
_selectedSubLocations
;
Contacts
?
get
selectedContacts
=>
_selectedContacts
;
String
?
get
selectedLeadStatus
=>
_selectedLeadStatus
;
String
?
get
selectedOpenStatus
=>
_selectedOpenStatus
;
String
?
get
selectedSourceId
=>
_selectedSourceId
;
String
?
get
selectedSourceValue
=>
_selectedSourceValue
;
String
?
get
selectedTeamId
=>
_selectedTeamId
;
String
?
get
selectedTeamValue
=>
_selectedTeamValue
;
String
?
get
selectedStateId
=>
_selectedStateId
;
String
?
get
selectedStateValue
=>
_selectedStateValue
;
String
?
get
selectedEmployeeId
=>
_selectedEmployeeId
;
String
?
get
selectedEmployeeValue
=>
_selectedEmployeeValue
;
String
?
get
selectedReferenceId
=>
_selectedReferenceId
;
String
?
get
selectedReferenceValue
=>
_selectedReferenceValue
;
String
?
get
selectedSegmentId
=>
_selectedSegmentId
;
String
?
get
selectedSegmentValue
=>
_selectedSegmentValue
;
String
?
get
selectedDistrictId
=>
_selectedDistrictId
;
String
?
get
selectedDistrictValue
=>
_selectedDistrictValue
;
String
?
get
selectedSubLocationId
=>
_selectedSubLocationId
;
String
?
get
selectedSubLocationValue
=>
_selectedSubLocationValue
;
String
?
get
selectedContactId
=>
_selectedContactId
;
String
?
get
selectedContactValue
=>
_selectedContactValue
;
set
isLoading
(
bool
value
)
{
_isLoading
=
value
;
notifyListeners
();
}
set
selectedSources
(
Sources
?
value
)
{
_selectedSources
=
value
;
_selectedSourceId
=
value
!.
id
!;
_selectedSourceValue
=
value
!.
name
!;
notifyListeners
();
}
set
selectedTeams
(
Teams
?
value
)
{
_selectedTeams
=
value
;
_selectedTeamId
=
value
!.
id
!;
_selectedTeamValue
=
value
.
name
;
notifyListeners
();
}
set
selectedStates
(
States
?
value
)
{
_selectedStates
=
value
;
_selectedStateId
=
value
!.
id
!;
_selectedStateValue
=
value
.
name
;
notifyListeners
();
}
set
selectedEmployees
(
Employees
?
value
)
{
_selectedEmployees
=
value
;
_selectedEmployeeId
=
value
!.
id
!;
_selectedEmployeeValue
=
value
.
name
;
notifyListeners
();
}
set
selectedReferences
(
References
?
value
)
{
_selectedReferences
=
value
;
_selectedReferenceId
=
value
!.
id
!;
_selectedReferenceValue
=
value
.
name
;
notifyListeners
();
}
set
selectedSegments
(
Segments
?
value
)
{
_selectedSegments
=
value
;
_selectedSegmentId
=
value
!.
id
!;
_selectedSegmentValue
=
value
.
name
;
notifyListeners
();
}
set
selectedDistricts
(
Districts
?
value
)
{
_selectedDistricts
=
value
;
_selectedDistrictId
=
value
!.
id
!;
_selectedDistrictValue
=
value
.
district
;
notifyListeners
();
}
set
selectedSubLocations
(
SubLocations
?
value
)
{
_selectedSubLocations
=
value
;
_selectedSubLocationId
=
value
!.
id
!;
_selectedSubLocationValue
=
value
.
subLocality
;
notifyListeners
();
}
set
selectedContacts
(
Contacts
?
value
)
{
_selectedContacts
=
value
;
_selectedContactId
=
value
!.
id
!;
_selectedContactValue
=
value
.
name
;
notifyListeners
();
}
set
selectedLeadStatus
(
String
?
value
)
{
_selectedLeadStatus
=
value
;
notifyListeners
();
}
set
selectedOpenStatus
(
String
?
value
)
{
_selectedOpenStatus
=
value
;
notifyListeners
();
}
set
selectedSourceId
(
String
?
value
)
{
_selectedSourceId
=
value
;
notifyListeners
();
}
set
selectedSourceValue
(
String
?
value
)
{
_selectedSourceValue
=
value
;
notifyListeners
();
}
set
selectedTeamId
(
String
?
value
)
{
_selectedTeamId
=
value
;
notifyListeners
();
}
set
selectedTeamValue
(
String
?
value
)
{
_selectedTeamValue
=
value
;
notifyListeners
();
}
set
selectedStateId
(
String
?
value
)
{
_selectedStateId
=
value
;
notifyListeners
();
}
set
selectedStateValue
(
String
?
value
)
{
_selectedStateValue
=
value
;
notifyListeners
();
}
set
selectedEmployeeId
(
String
?
value
)
{
_selectedEmployeeId
=
value
;
notifyListeners
();
}
set
selectedEmployeeValue
(
String
?
value
)
{
_selectedEmployeeValue
=
value
;
notifyListeners
();
}
set
selectedReferenceId
(
String
?
value
)
{
_selectedReferenceId
=
value
;
notifyListeners
();
}
set
selectedReferenceValue
(
String
?
value
)
{
_selectedReferenceValue
=
value
;
notifyListeners
();
}
set
selectedSegmentId
(
String
?
value
)
{
_selectedSegmentId
=
value
;
notifyListeners
();
}
set
selectedSegmentValue
(
String
?
value
)
{
_selectedSegmentValue
=
value
;
notifyListeners
();
}
set
selectedDistrictId
(
String
?
value
)
{
_selectedDistrictId
=
value
;
notifyListeners
();
}
set
selectedDistrictValue
(
String
?
value
)
{
_selectedDistrictValue
=
value
;
notifyListeners
();
}
set
selectedSubLocationId
(
String
?
value
)
{
_selectedSubLocationId
=
value
;
notifyListeners
();
}
set
selectedSubLocationValue
(
String
?
value
)
{
_selectedSubLocationValue
=
value
;
notifyListeners
();
}
set
selectedContactId
(
String
?
value
)
{
_selectedContactId
=
value
;
notifyListeners
();
}
set
selectedContactValue
(
String
?
value
)
{
_selectedContactValue
=
value
;
notifyListeners
();
}
Future
<
void
>
crmLeadListViewAPIFunction
(
context
,
mode
)
async
{
try
{
var
HomeProv
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmLeadListViewAPI
(
HomeProv
.
empId
,
HomeProv
.
session
,
mode
,
);
if
(
data
!=
null
)
{
print
(
data
.
error
);
if
(
data
.
error
==
"0"
)
{
// print("as");
_leadStatusList
=
[
"all"
,
"Hot"
,
"Warm"
,
"Cold"
,
"Order Gain"
,
"Order Lost"
,
];
_openStatusList
=
[
"open"
,
"Closed"
,
"All"
];
_sourcesList
=
data
.
sources
!;
_teamsList
=
data
.
teams
!;
_statesList
=
data
.
states
!;
_employeesList
=
data
.
employees
!;
checkDropDownValues
();
// print(_leadStatusList);
notifyListeners
();
}
}
}
catch
(
e
,
s
)
{}
}
Future
<
void
>
crmLeadListSourceOnReferenceAPIFunction
(
context
,
mode
,
sourceID
,
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmLeadListSourceOnReferenceAPI
(
prov
.
empId
,
prov
.
session
,
sourceID
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_referencesList
=
data
.
references
!;
notifyListeners
();
}
}
}
catch
(
e
,
s
)
{}
}
Future
<
void
>
crmLeadListSegmentOnTeamAPIFunction
(
context
,
mode
,
teamID
,
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmLeadListSegmentOnTeamAPI
(
prov
.
empId
,
prov
.
session
,
teamID
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_segmentsList
=
data
.
segments
!;
notifyListeners
();
}
}
}
catch
(
e
,
s
)
{}
}
Future
<
void
>
crmLeadListDistrictsOnStateAPIFunction
(
context
,
mode
,
stateID
,
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmDistrictsOnStateAPI
(
prov
.
empId
,
prov
.
session
,
stateID
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_districtsList
=
data
.
districts
!;
notifyListeners
();
}
}
}
catch
(
e
,
s
)
{}
}
Future
<
void
>
crmLeadListSubLocOnDistrictAPIFunction
(
context
,
mode
,
districtID
,
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmSubLocOnDistrictAPI
(
prov
.
empId
,
prov
.
session
,
districtID
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_subLocationsList
=
data
.
subLocations
!;
notifyListeners
();
}
}
}
catch
(
e
,
s
)
{}
}
Future
<
void
>
crmLeadListContactPopUpAPIFunction
(
context
,
mode
,
accountID
,
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmLeadListContactPopUpAPI
(
prov
.
empId
,
prov
.
session
,
accountID
,
);
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_contactsList
=
data
.
contacts
!;
notifyListeners
();
}
}
}
catch
(
e
,
s
)
{}
}
Future
<
void
>
crmLeadListAPIFunction
(
context
,
mode
,
employeeID
,
leadStatus
,
openStatus
,
sourceID
,
referenceID
,
teamID
,
segmentID
,
stateID
,
districtID
,
subLocID
,
)
async
{
try
{
var
HomeProv
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmLeadListFilterSubmitAPI
(
HomeProv
.
empId
,
HomeProv
.
session
,
mode
,
employeeID
,
sLeadIDController
.
text
,
leadStatus
,
openStatus
,
mobileNumberController
.
text
,
companyNameController
.
text
,
sourceID
,
referenceID
,
teamID
,
segmentID
,
stateID
,
districtID
,
subLocID
,
);
if
(
data
!=
null
)
{
_isLoading
=
true
;
notifyListeners
();
if
(
data
.
error
==
"0"
)
{
_crmLeadList
=
data
.
leadList
!;
_isLoading
=
false
;
notifyListeners
();
}
else
{
_isLoading
=
false
;
notifyListeners
();
}
}
else
{
_isLoading
=
false
;
notifyListeners
();
}
}
catch
(
e
,
s
)
{
_isLoading
=
false
;
notifyListeners
();
}
}
onChangedLeadId
(
value
)
{
notifyListeners
();
}
onChangedMobileNum
(
value
)
{
notifyListeners
();
}
onChangedCompanyName
(
value
)
{
notifyListeners
();
}
void
resetForm
()
{
_isLoading
=
false
;
sLeadIDController
.
clear
();
mobileNumberController
.
clear
();
companyNameController
.
clear
();
companyNameController
.
text
=
"a"
;
_selectedEmployees
=
null
;
_selectedSources
=
null
;
_selectedReferences
=
null
;
_selectedSegments
=
null
;
_selectedTeams
=
null
;
_selectedDistricts
=
null
;
_selectedStates
=
null
;
_selectedSubLocations
=
null
;
_selectedLeadStatus
=
null
;
_selectedOpenStatus
=
null
;
_selectedEmployeeId
=
null
;
_selectedSourceId
=
null
;
_selectedReferenceId
=
null
;
_selectedTeamId
=
null
;
_selectedSegmentId
=
null
;
_selectedStateId
=
null
;
_selectedDistrictId
=
null
;
_selectedSubLocationId
=
null
;
_selectedEmployeeValue
=
""
;
_selectedSourceValue
=
""
;
_selectedReferenceValue
=
""
;
_selectedTeamValue
=
""
;
_selectedSegmentValue
=
""
;
_selectedDistrictValue
=
""
;
_selectedStateValue
=
""
;
_selectedSubLocationValue
=
""
;
checkDropDownValues
();
notifyListeners
();
}
void
checkDropDownValues
()
{
if
(!
_employeesList
.
contains
(
_selectedEmployees
)
&&
_selectedEmployees
!=
null
)
{
_selectedEmployeeId
=
null
;
_selectedEmployeeValue
=
""
;
}
if
(!
_sourcesList
.
contains
(
_selectedSources
)
&&
_selectedSources
!=
null
)
{
_selectedSourceId
=
null
;
_selectedEmployeeValue
=
""
;
}
if
(!
_referencesList
.
contains
(
_selectedReferences
)
&&
_selectedReferences
!=
null
)
{
_selectedReferenceId
=
null
;
_selectedSourceValue
=
""
;
}
if
(!
_segmentsList
.
contains
(
_selectedSegments
)
&&
_selectedSegments
!=
null
)
{
_selectedTeamId
=
null
;
_selectedReferenceValue
=
""
;
}
if
(!
_teamsList
.
contains
(
_selectedTeams
)
&&
_selectedTeams
!=
null
)
{
_selectedSegmentId
=
null
;
_selectedTeamValue
=
""
;
}
if
(!
_districtsList
.
contains
(
_selectedDistricts
)
&&
_selectedDistricts
!=
null
)
{
_selectedDistrictId
=
null
;
_selectedSegmentValue
=
""
;
}
if
(!
_statesList
.
contains
(
_selectedStates
)
&&
_selectedStates
!=
null
)
{
_selectedStateId
=
null
;
_selectedDistrictValue
=
""
;
}
if
(!
_subLocationsList
.
contains
(
_selectedSubLocations
)
&&
_selectedSubLocations
!=
null
)
{
_selectedSubLocationId
=
null
;
_selectedStateValue
=
""
;
}
}
}
}
lib/Notifiers/crmProvider/crmDashboardProvider.dart
0 → 100644
View file @
a7dc0d35
import
'package:flutter/foundation.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Models/crmModels/AccessiblePagesResponse.dart'
;
import
'../../services/api_calling.dart'
;
import
'../HomeScreenNotifier.dart'
;
class
Crmdashboardprovider
extends
ChangeNotifier
{
List
<
PagesAccessible
>
_accessPages
=
[];
List
<
PagesAccessible
>
get
accessPages
=>
_accessPages
;
Future
<
void
>
accessPagesAPIFunction
(
context
)
async
{
try
{
var
HomeProv
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmAccessiblePagesAPI
(
HomeProv
.
empId
,
HomeProv
.
session
);
if
(
data
!=
null
){
if
(
data
.
error
==
"0"
){
_accessPages
=
data
.
pagesAccessible
!;
notifyListeners
();
}
}
}
catch
(
e
,
s
){
}
}
}
\ No newline at end of file
lib/Notifiers/crmProvider/crmLeadDetailsProvider.dart
0 → 100644
View file @
a7dc0d35
import
'package:flutter/foundation.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Models/crmModels/LeadDetailsResponse.dart'
;
import
'../../services/api_calling.dart'
;
import
'../HomeScreenNotifier.dart'
;
class
crmLeadDetailsProvider
extends
ChangeNotifier
{
bool
_isLoading
=
false
;
LeadDetails
_leadDetails
=
LeadDetails
();
AccountDetails
_accountDetails
=
AccountDetails
();
List
<
LeadProducts
>
_leadProducts
=
[];
List
<
ContactDetails
>
_contactDetails
=
[];
List
<
FollowupDetails
>
_followupDetails
=
[];
List
<
AppointmentDetails
>
_appointmentDetails
=
[];
List
<
QuotationsDetails
>
_quotationsDetails
=
[];
List
<
String
>
_headings
=
[];
List
<
String
>
_subHeadings
=
[];
bool
get
isLoading
=>
_isLoading
;
LeadDetails
get
leadDetails
=>
_leadDetails
;
AccountDetails
get
accountDetails
=>
_accountDetails
;
List
<
LeadProducts
>
get
leadProducts
=>
_leadProducts
;
List
<
ContactDetails
>
get
contactDetails
=>
_contactDetails
;
List
<
FollowupDetails
>
get
followupDetails
=>
_followupDetails
;
List
<
AppointmentDetails
>
get
appointmentDetails
=>
_appointmentDetails
;
List
<
QuotationsDetails
>
get
quotationsDetails
=>
_quotationsDetails
;
List
<
String
>
get
Headings
=>
_headings
;
List
<
String
>
get
subHeadings
=>
_subHeadings
;
set
isLoading
(
bool
value
){
_isLoading
=
value
;
notifyListeners
();
}
Future
<
void
>
crmLeadDetailsAPI
(
context
,
leadID
,
mode
)
async
{
try
{
var
HomeProv
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
crmLeadDetailsAPI
(
HomeProv
.
empId
,
HomeProv
.
session
,
leadID
,
mode
,
);
_isLoading
=
true
;
notifyListeners
();
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
)
{
_leadDetails
=
data
.
leadDetails
!;
_accountDetails
=
data
.
accountDetails
!;
_leadProducts
=
data
.
leadProducts
!;
_contactDetails
=
data
.
contactDetails
!;
_followupDetails
=
data
.
followupDetails
!;
_appointmentDetails
=
data
.
appointmentDetails
!;
_quotationsDetails
=
data
.
quotationsDetails
!;
_headings
=
[
"Address"
,
"Account Manager Name"
,
"Account Created By"
,
"State"
,
"District"
,
"Sub Locality"
,
"Source"
,
"Reference"
,
"Team"
,
"Segment"
,
"Lead Status"
,
"Lead Age"
,
];
_subHeadings
=
[
data
.
leadDetails
!.
address
??
"-"
,
data
.
accountDetails
!.
accManager
??
"-"
,
data
.
accountDetails
!.
owner
??
"-"
,
data
.
accountDetails
!.
state
??
"-"
,
data
.
accountDetails
!.
district
??
"-"
,
data
.
accountDetails
!.
subLocality
??
"-"
,
data
.
accountDetails
!.
source
??
"-"
,
data
.
accountDetails
!.
reference
??
"-"
,
data
.
accountDetails
!.
team
??
"-"
,
data
.
accountDetails
!.
segment
??
"-"
,
data
.
leadDetails
!.
status
??
"-"
,
data
.
leadDetails
!.
lage
??
"-"
,
];
_isLoading
=
false
;
notifyListeners
();
}
else
{
_isLoading
=
false
;
notifyListeners
();
}
}
else
{
_isLoading
=
false
;
notifyListeners
();
}
}
catch
(
e
,
s
)
{
_isLoading
=
false
;
notifyListeners
();
}
}
void
resetAll
(){
}
}
lib/Notifiers/financeProvider/RequesitionLidtDetailsProvider.dart
View file @
a7dc0d35
...
@@ -13,8 +13,6 @@ import 'package:provider/provider.dart';
...
@@ -13,8 +13,6 @@ import 'package:provider/provider.dart';
import
'approveRejectPaymentRequestResponse.dart'
;
import
'approveRejectPaymentRequestResponse.dart'
;
class
Requesitionlidtdetailsprovider
extends
ChangeNotifier
{
class
Requesitionlidtdetailsprovider
extends
ChangeNotifier
{
TextEditingController
requestedAmount
=
TextEditingController
();
TextEditingController
requestedAmount
=
TextEditingController
();
TextEditingController
proposedPaymentAccount
=
TextEditingController
();
TextEditingController
proposedPaymentAccount
=
TextEditingController
();
TextEditingController
accountName
=
TextEditingController
();
TextEditingController
accountName
=
TextEditingController
();
...
@@ -29,6 +27,8 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -29,6 +27,8 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
TextEditingController
bankAccountNumber
=
TextEditingController
();
TextEditingController
bankAccountNumber
=
TextEditingController
();
TextEditingController
bankIfscCode
=
TextEditingController
();
TextEditingController
bankIfscCode
=
TextEditingController
();
TextEditingController
bankHolderName
=
TextEditingController
();
TextEditingController
bankHolderName
=
TextEditingController
();
TextEditingController
paymentAccountSearchController
=
TextEditingController
();
PaymentDetails
_paymentDetails
=
PaymentDetails
();
PaymentDetails
_paymentDetails
=
PaymentDetails
();
RequestDetails
_requestDetails
=
RequestDetails
();
RequestDetails
_requestDetails
=
RequestDetails
();
...
@@ -54,20 +54,22 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -54,20 +54,22 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
get
image_picked
=>
_image_picked
;
get
image_picked
=>
_image_picked
;
int
get
imagePicked
=>
_image_picked
;
int
get
imagePicked
=>
_image_picked
;
File
?
get
imagePath
=>
_imageName
;
File
?
get
imagePath
=>
_imageName
;
File
?
get
imageFilePath
=>
_image
;
File
?
get
imageFilePath
=>
_image
;
set
imagePicked
(
int
value
){
set
imagePicked
(
int
value
)
{
_image_picked
=
value
;
_image_picked
=
value
;
notifyListeners
();
notifyListeners
();
}
}
set
imagePath
(
File
?
value
){
set
imagePath
(
File
?
value
)
{
_imageName
=
value
;
_imageName
=
value
;
notifyListeners
();
notifyListeners
();
}
}
set
imageFilePath
(
File
?
value
){
set
imageFilePath
(
File
?
value
)
{
_image
=
value
;
_image
=
value
;
notifyListeners
();
notifyListeners
();
}
}
...
@@ -90,7 +92,7 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -90,7 +92,7 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
List
<
String
>
get
subHeadings
=>
_subHeadings
;
List
<
String
>
get
subHeadings
=>
_subHeadings
;
set
subHeadings
(
List
<
String
>
value
){
set
subHeadings
(
List
<
String
>
value
)
{
_subHeadings
=
value
;
_subHeadings
=
value
;
notifyListeners
();
notifyListeners
();
}
}
...
@@ -270,29 +272,27 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -270,29 +272,27 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
preValues
(){
preValues
()
{
print
(
"here 212ssass1"
);
print
(
"here 212ssass1"
);
requestedAmount
.
text
=
_requestDetails
.
requestedAmount
??
"-"
;
requestedAmount
.
text
=
_requestDetails
.
requestedAmount
??
"-"
;
proposedPaymentAccount
.
text
=
_requestDetails
.
proposedAccount
??
"-"
;
proposedPaymentAccount
.
text
=
_requestDetails
.
proposedAccount
??
"-"
;
accountName
.
text
=
_requestDetails
.
accountName
??
"-"
;
accountName
.
text
=
_requestDetails
.
accountName
??
"-"
;
branch
.
text
=
_requestDetails
.
branch
??
"-"
;
branch
.
text
=
_requestDetails
.
branch
??
"-"
;
requestingPurpose
.
text
=
_requestDetails
.
requestingPurpose
??
"-"
;
requestingPurpose
.
text
=
_requestDetails
.
requestingPurpose
??
"-"
;
description
.
text
=
_requestDetails
.
description
??
"-"
;
description
.
text
=
_requestDetails
.
description
??
"-"
;
amount
.
text
=
_requestDetails
.
amount
??
"-"
;
amount
.
text
=
_requestDetails
.
amount
??
"-"
;
paymentMode
.
text
=
_requestDetails
.
requestMode
??
"-"
;
paymentMode
.
text
=
_requestDetails
.
requestMode
??
"-"
;
bankUpiID
.
text
=
_requestDetails
.
bankUpiId
??
"-"
;
bankUpiID
.
text
=
_requestDetails
.
bankUpiId
??
"-"
;
bankName
.
text
=
_requestDetails
.
bankName
??
"-"
;
bankName
.
text
=
_requestDetails
.
bankName
??
"-"
;
bankBranchName
.
text
=
_requestDetails
.
bankBranchname
??
"-"
;
bankBranchName
.
text
=
_requestDetails
.
bankBranchname
??
"-"
;
bankAccountNumber
.
text
=
_requestDetails
.
bankAccountNumber
??
"-"
;
bankAccountNumber
.
text
=
_requestDetails
.
bankAccountNumber
??
"-"
;
bankIfscCode
.
text
=
_requestDetails
.
bankIfscCode
??
"-"
;
bankIfscCode
.
text
=
_requestDetails
.
bankIfscCode
??
"-"
;
bankHolderName
.
text
=
_requestDetails
.
bankAccountHolderName
??
"-"
;
bankHolderName
.
text
=
_requestDetails
.
bankAccountHolderName
??
"-"
;
notifyListeners
();
notifyListeners
();
}
}
Future
<
void
>
approveRejectPaymentRequestAPIFunction
(
Future
<
void
>
approveRejectPaymentRequestAPIFunction
(
context
,
context
,
payment_request_id
,)
async
{
payment_request_id
,
)
async
{
try
{
try
{
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
approveRejectPaymentRequestAPI
(
final
data
=
await
ApiCalling
.
approveRejectPaymentRequestAPI
(
...
@@ -305,19 +305,17 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -305,19 +305,17 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
_paymentModes
=
data
.
paymentModes
!;
_paymentModes
=
data
.
paymentModes
!;
_paymentAccounts
=
data
.
paymentAccounts
!;
_paymentAccounts
=
data
.
paymentAccounts
!;
_paymentRequestDetails
=
data
.
paymentRequestDetails
!;
_paymentRequestDetails
=
data
.
paymentRequestDetails
!;
resetAll
();
notifyListeners
();
notifyListeners
();
}
}
}
}
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
Future
<
void
>
paymentrequisitionRejectSubmitAPIFunction
(
Future
<
void
>
paymentrequisitionRejectSubmitAPIFunction
(
context
,
context
,
mode
,
mode
,
payment_request_id
,
payment_request_id
,
approve_remarks
,
approve_remarks
,)
async
{
)
async
{
try
{
try
{
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
RejectPaymentRequestSubmitAPI
(
final
data
=
await
ApiCalling
.
RejectPaymentRequestSubmitAPI
(
...
@@ -327,8 +325,10 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -327,8 +325,10 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
payment_request_id
,
payment_request_id
,
approve_remarks
,
approve_remarks
,
);
);
if
(
data
!=
null
){
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
){
if
(
data
.
error
==
"0"
)
{
paymentRequesitionDetails
(
context
,
payment_request_id
);
resetAll
();
toast
(
context
,
data
.
message
);
toast
(
context
,
data
.
message
);
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
}
}
...
@@ -336,14 +336,12 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -336,14 +336,12 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
Future
<
void
>
paymentrequisitionApproveSubmitAPIFunction
(
Future
<
void
>
paymentrequisitionApproveSubmitAPIFunction
(
context
,
context
,
mode
,
mode
,
payment_request_id
,
payment_request_id
,
approved_amount
,
approved_amount
,
approve_remarks
,
approve_remarks
,
proposed_payment_account_id
,
proposed_payment_account_id
,)
async
{
)
async
{
try
{
try
{
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
ApprovePaymentRequestSubmitAPI
(
final
data
=
await
ApiCalling
.
ApprovePaymentRequestSubmitAPI
(
...
@@ -355,8 +353,10 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -355,8 +353,10 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
approve_remarks
,
approve_remarks
,
proposed_payment_account_id
,
proposed_payment_account_id
,
);
);
if
(
data
!=
null
){
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
){
if
(
data
.
error
==
"0"
)
{
paymentRequesitionDetails
(
context
,
payment_request_id
);
resetAll
();
toast
(
context
,
data
.
message
);
toast
(
context
,
data
.
message
);
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
}
}
...
@@ -364,14 +364,12 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -364,14 +364,12 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
Future
<
void
>
paymentrequisitionProcessSubmitAPIFunction
(
Future
<
void
>
paymentrequisitionProcessSubmitAPIFunction
(
context
,
context
,
mode
,
mode
,
payment_request_id
,
payment_request_id
,
payment_account_id
,
payment_account_id
,
processing_remarks
,
processing_remarks
,
attachment
,
attachment
,)
async
{
)
async
{
try
{
try
{
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
var
provider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
processApproveRejectPaymentRequestSubmitAPI
(
final
data
=
await
ApiCalling
.
processApproveRejectPaymentRequestSubmitAPI
(
...
@@ -384,12 +382,48 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
...
@@ -384,12 +382,48 @@ class Requesitionlidtdetailsprovider extends ChangeNotifier {
processing_remarks
,
processing_remarks
,
attachment
,
attachment
,
);
);
if
(
data
!=
null
){
if
(
data
!=
null
)
{
if
(
data
.
error
==
"0"
){
if
(
data
.
error
==
"0"
)
{
paymentRequesitionDetails
(
context
,
payment_request_id
);
resetAll
();
toast
(
context
,
data
.
message
);
toast
(
context
,
data
.
message
);
Navigator
.
pop
(
context
);
Navigator
.
pop
(
context
);
}
}
}
}
}
catch
(
e
,
s
)
{}
}
catch
(
e
,
s
)
{}
}
}
resetAll
()
{
requestedAmount
.
clear
();
proposedPaymentAccount
.
clear
();
accountName
.
clear
();
branch
.
clear
();
requestingPurpose
.
clear
();
description
.
clear
();
amount
.
clear
();
paymentMode
.
clear
();
bankUpiID
.
clear
();
bankName
.
clear
();
bankBranchName
.
clear
();
bankAccountNumber
.
clear
();
bankIfscCode
.
clear
();
bankHolderName
.
clear
();
paymentAccountSearchController
.
clear
();
_selectedPaymentAccounts
=
null
;
_selectedValue
=
""
;
_selectedID
=
null
;
checkDropDownReset
();
notifyListeners
();
}
void
checkDropDownReset
()
{
if
(!
_paymentAccounts
.
contains
(
_selectedPaymentAccounts
)
&&
_selectedPaymentAccounts
!=
null
)
{
_selectedPaymentAccounts
=
null
;
_selectedID
=
null
;
_selectedValue
=
""
;
}
notifyListeners
();
}
}
}
lib/Notifiers/financeProvider/RequestionListProvider.dart
View file @
a7dc0d35
...
@@ -39,6 +39,8 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -39,6 +39,8 @@ class Requestionlistprovider extends ChangeNotifier {
TextEditingController
bankUpiController
=
TextEditingController
();
TextEditingController
bankUpiController
=
TextEditingController
();
TextEditingController
paymentReferenceController
=
TextEditingController
();
TextEditingController
paymentReferenceController
=
TextEditingController
();
TextEditingController
dateController
=
TextEditingController
();
TextEditingController
dateController
=
TextEditingController
();
TextEditingController
accountSearchController
=
TextEditingController
();
TextEditingController
paymentAccountSearchController
=
TextEditingController
();
// Date picker state
// Date picker state
DateTime
?
_date
;
DateTime
?
_date
;
...
@@ -839,6 +841,8 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -839,6 +841,8 @@ class Requestionlistprovider extends ChangeNotifier {
void
resetForm
()
{
void
resetForm
()
{
_submitClicked
=
false
;
_submitClicked
=
false
;
accountSearchController
.
clear
();
paymentAccountSearchController
.
clear
();
reqPurposeController
.
clear
();
reqPurposeController
.
clear
();
descController
.
clear
();
descController
.
clear
();
amountController
.
clear
();
amountController
.
clear
();
...
@@ -1006,10 +1010,10 @@ class Requestionlistprovider extends ChangeNotifier {
...
@@ -1006,10 +1010,10 @@ class Requestionlistprovider extends ChangeNotifier {
}
}
}
}
if
(
_image_picked
==
0
)
{
//
if (_image_picked == 0) {
FileError
=
"Please attach a file"
;
//
FileError = "Please attach a file";
isValid
=
false
;
_submitClicked
=
false
;
//
isValid = false;_submitClicked = false;
}
//
}
buttonEnabled
=
isValid
;
buttonEnabled
=
isValid
;
notifyListeners
();
notifyListeners
();
return
isValid
;
return
isValid
;
...
...
lib/Notifiers/financeProvider/paymentReceiptsProvider.dart
View file @
a7dc0d35
...
@@ -52,6 +52,8 @@ class Paymentreceiptsprovider extends ChangeNotifier {
...
@@ -52,6 +52,8 @@ class Paymentreceiptsprovider extends ChangeNotifier {
TextEditingController
bankUpiController
=
TextEditingController
();
TextEditingController
bankUpiController
=
TextEditingController
();
TextEditingController
paymentReferenceController
=
TextEditingController
();
TextEditingController
paymentReferenceController
=
TextEditingController
();
TextEditingController
dateController
=
TextEditingController
();
TextEditingController
dateController
=
TextEditingController
();
TextEditingController
accountSearchController
=
TextEditingController
();
TextEditingController
paymentAccountSearchController
=
TextEditingController
();
// Date picker state
// Date picker state
DateTime
?
_date
;
DateTime
?
_date
;
...
@@ -696,6 +698,8 @@ class Paymentreceiptsprovider extends ChangeNotifier {
...
@@ -696,6 +698,8 @@ class Paymentreceiptsprovider extends ChangeNotifier {
void
resetForm
()
{
void
resetForm
()
{
_submitClicked
=
false
;
_submitClicked
=
false
;
accountSearchController
.
clear
();
paymentAccountSearchController
.
clear
();
reqPurposeController
.
clear
();
reqPurposeController
.
clear
();
descController
.
clear
();
descController
.
clear
();
amountController
.
clear
();
amountController
.
clear
();
...
...
lib/main.dart
View file @
a7dc0d35
...
@@ -202,6 +202,9 @@ class MyApp extends StatelessWidget {
...
@@ -202,6 +202,9 @@ class MyApp extends StatelessWidget {
ChangeNotifierProvider
(
create:
(
_
)
=>
Addpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addorderprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Addorderprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Editpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Editpaymentprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Crmdashboardprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
Leadlistprovider
(),),
ChangeNotifierProvider
(
create:
(
_
)
=>
crmLeadDetailsProvider
(),),
],
],
child:
Builder
(
child:
Builder
(
builder:
(
BuildContext
context
)
{
builder:
(
BuildContext
context
)
{
...
...
lib/screens/HomeScreen.dart
View file @
a7dc0d35
...
@@ -5,7 +5,6 @@ import 'package:flutter/cupertino.dart';
...
@@ -5,7 +5,6 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_svg/flutter_svg.dart'
;
import
'package:flutter_svg/flutter_svg.dart'
;
import
'package:generp/screens/order/orderModuleDashboard.dart'
;
import
'notifierExports.dart'
;
import
'notifierExports.dart'
;
import
'screensExports.dart'
;
import
'screensExports.dart'
;
import
'package:geolocator/geolocator.dart'
;
import
'package:geolocator/geolocator.dart'
;
...
@@ -13,7 +12,6 @@ import 'package:provider/provider.dart';
...
@@ -13,7 +12,6 @@ import 'package:provider/provider.dart';
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:cached_network_image/cached_network_image.dart'
;
import
'package:location/location.dart'
as
loc
;
import
'package:location/location.dart'
as
loc
;
import
'../Utils/app_colors.dart'
;
import
'../Utils/app_colors.dart'
;
import
'AttendanceScreen.dart'
;
import
'inventory/InventoryScreen.dart'
;
import
'inventory/InventoryScreen.dart'
;
class
MyHomePage
extends
StatefulWidget
{
class
MyHomePage
extends
StatefulWidget
{
...
@@ -120,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -120,8 +118,8 @@ class _MyHomePageState extends State<MyHomePage> {
"Whizzdom"
,
"Whizzdom"
,
"Common"
,
"Common"
,
"Finance"
,
"Finance"
,
//
"Orders",
"Orders"
,
//
"CRM",
"CRM"
,
];
];
final
icons
=
[
final
icons
=
[
"assets/svg/home_icons_1.svg"
,
"assets/svg/home_icons_1.svg"
,
...
@@ -133,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -133,8 +131,8 @@ class _MyHomePageState extends State<MyHomePage> {
"assets/svg/home_icons_81.svg"
,
"assets/svg/home_icons_81.svg"
,
"assets/svg/home_icons_9.svg"
,
"assets/svg/home_icons_9.svg"
,
"assets/svg/home_icons_10.svg"
,
"assets/svg/home_icons_10.svg"
,
//
"assets/svg/home_icons_11.svg",
"assets/svg/home_icons_11.svg"
,
//
"assets/svg/home_icons_12.svg",
"assets/svg/home_icons_12.svg"
,
];
];
final
requiredRoles
=
[
final
requiredRoles
=
[
"430"
,
"430"
,
...
@@ -146,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -146,8 +144,8 @@ class _MyHomePageState extends State<MyHomePage> {
"431"
,
"431"
,
"430"
,
"430"
,
"430"
,
"430"
,
//
"430",
"430"
,
//
"430",
"430"
,
];
];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
final
filteredItems
=
<
Map
<
String
,
String
>>[];
...
@@ -478,6 +476,14 @@ class _MyHomePageState extends State<MyHomePage> {
...
@@ -478,6 +476,14 @@ class _MyHomePageState extends State<MyHomePage> {
(
context
)
=>
Ordermoduledashboard
(),
(
context
)
=>
Ordermoduledashboard
(),
),
),
);
);
case
"CRM"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
CrmdashboardScreen
(),
),
);
default
:
default
:
print
(
"111"
);
print
(
"111"
);
break
;
break
;
...
...
lib/screens/crm/LeadDetailsByMode.dart
0 → 100644
View file @
a7dc0d35
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/crmProvider/crmLeadDetailsProvider.dart'
;
import
'package:generp/screens/crm/contactDetails.dart'
;
import
'package:generp/screens/crm/productDetails.dart'
;
import
'package:provider/provider.dart'
;
import
'../../Utils/app_colors.dart'
;
import
'../../Utils/commonWidgets.dart'
;
import
'../finance/FileViewer.dart'
;
class
LeadDetailsByMode
extends
StatefulWidget
{
final
mode
;
final
pageTitleName
;
final
leadId
;
const
LeadDetailsByMode
({
super
.
key
,
this
.
mode
,
this
.
pageTitleName
,
this
.
leadId
,
});
@override
State
<
LeadDetailsByMode
>
createState
()
=>
_LeadDetailsByModeState
();
}
class
_LeadDetailsByModeState
extends
State
<
LeadDetailsByMode
>
{
@override
void
initState
()
{
// TODO: implement initState
super
.
initState
();
WidgetsBinding
.
instance
.
addPostFrameCallback
((
timeStamp
)
{
final
provider
=
Provider
.
of
<
crmLeadDetailsProvider
>(
context
,
listen:
false
,
);
provider
.
crmLeadDetailsAPI
(
context
,
widget
.
leadId
,
widget
.
mode
);
});
}
@override
Widget
build
(
BuildContext
context
)
{
return
Consumer
<
crmLeadDetailsProvider
>(
builder:
(
context
,
provider
,
child
)
{
var
leadDetails
=
provider
.
leadDetails
;
return
WillPopScope
(
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
context
,
widget
.
pageTitleName
,
provider
.
resetAll
,
InkResponse
(
onTap:
()
{
_showOptionsSheet
(
context
);
},
child:
SvgPicture
.
asset
(
"assets/svg/ic_more.svg"
,
height:
30
),
),
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
child:
SingleChildScrollView
(
child:
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
child:
Column
(
children:
[
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/se_block_head.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
leadDetails
.
name
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
)),
...
List
.
generate
(
provider
.
subHeadings
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
provider
.
Headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
child:
provider
.
Headings
[
j
]==
"Lead Age"
?
Tooltip
(
triggerMode:
TooltipTriggerMode
.
tap
,
message:
"
${provider.leadDetails.createdDatetime}
"
,
child:
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
decorationColor:
AppColors
.
grey_semi
,
decoration:
TextDecoration
.
underline
),
),
):
Text
(
provider
.
subHeadings
[
j
]
==
""
?
"-"
:
provider
.
subHeadings
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
),
],
),
);
}),
],
),
),
),
),
),
onWillPop:
()
{
return
onBackPressed
(
context
);
},
);
},
);
}
Future
<
void
>
_showOptionsSheet
(
BuildContext
context
)
{
return
showModalBottomSheet
(
useSafeArea:
true
,
isDismissible:
true
,
isScrollControlled:
true
,
showDragHandle:
true
,
backgroundColor:
Colors
.
white
,
enableDrag:
true
,
context:
context
,
builder:
(
context
)
{
return
StatefulBuilder
(
builder:
(
context
,
setState
)
{
return
SafeArea
(
child:
Consumer
<
crmLeadDetailsProvider
>(
builder:
(
context
,
provider
,
child
)
{
return
Container
(
margin:
EdgeInsets
.
only
(
bottom:
15
,
left:
15
,
right:
15
,
top:
10
,
),
child:
SingleChildScrollView
(
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
SizedBox
(
height:
15
),
...
List
.
generate
(
5
,
(
index
)
{
final
assetnames
=
[
"crm_appoint_details"
,
"crm_cont_details"
,
"crm_follow_up_details"
,
"crm_prod_details"
,
"crm_quotation_details"
,
];
final
Headingnames
=
[
"Product Details"
,
"Contact Details"
,
"Followup Details"
,
"Appointment Details"
,
"Quotation Details"
,
];
return
ListTile
(
onTap:
()
{
switch
(
index
){
case
0
:
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Productdetails
(),));
break
;
case
1
:
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Contactdetails
(),));
break
;
default
:
print
(
"object"
);
}
},
leading:
SvgPicture
.
asset
(
"assets/svg/
${assetnames[index]}
.svg"
,
),
title:
Text
(
Headingnames
[
index
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
),
),
trailing:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
),
);
}),
],
),
),
);
},
),
);
},
);
},
);
}
}
lib/screens/crm/LeadListByMode.dart
0 → 100644
View file @
a7dc0d35
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
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