Commit 642da22c authored by Sai Srinivas's avatar Sai Srinivas Committed by Sai Srinivas
Browse files

gen erp 08-10

parent d2c9404a
...@@ -61,7 +61,6 @@ ...@@ -61,7 +61,6 @@
</intent-filter> </intent-filter>
<intent-filter android:autoVerify="true"> <intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" /> <category android:name="android.intent.category.BROWSABLE" />
...@@ -70,6 +69,11 @@ ...@@ -70,6 +69,11 @@
<data android:host="whizzdom.gengroup.in" /> <data android:host="whizzdom.gengroup.in" />
<data android:pathPrefix="" /> <data android:pathPrefix="" />
</intent-filter> </intent-filter>
<intent-filter>
<action android:name="FLUTTER_NOTIFICATION_CLICK" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity> </activity>
<meta-data <meta-data
android:name="flutter_deeplinking_enabled" android:name="flutter_deeplinking_enabled"
......
storePassword=generp
keyPassword=generp
keyAlias=generp_alias
storeFile=generp.jks
\ No newline at end of file
<svg width="21" height="22" viewBox="0 0 21 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1_1917)">
<path d="M20.1475 11.0416C20.1475 16.6068 15.6361 21.1182 10.0709 21.1182C4.50558 21.1182 -0.00585938 16.6068 -0.00585938 11.0416C-0.00585938 5.47629 4.50558 0.964844 10.0709 0.964844C15.6361 0.964844 20.1475 5.47629 20.1475 11.0416Z" fill="#FFC107"/>
<path d="M12.1329 15.621C11.9992 15.621 11.8654 15.5826 11.7464 15.5019L6.70795 12.0667C6.4597 11.8964 6.34984 11.5849 6.43874 11.2963C6.52747 11.0077 6.79417 10.8117 7.09543 10.8117H9.15657C10.0407 10.8117 10.7598 10.0926 10.7598 9.2086C10.7598 8.32463 10.0407 7.60554 9.15657 7.60554H7.09543C6.71617 7.60554 6.40838 7.29775 6.40838 6.91849C6.40838 6.53924 6.71617 6.23145 7.09543 6.23145H9.15657C10.7982 6.23145 12.1339 7.56696 12.1339 9.2086C12.1339 10.7961 10.8843 12.0979 9.31693 12.1821L12.5214 14.367C12.8347 14.5804 12.9152 15.0083 12.7019 15.3214C12.569 15.5157 12.3528 15.621 12.1329 15.621Z" fill="#FAFAFA"/>
<path d="M13.0497 7.60554H7.09525C6.716 7.60554 6.4082 7.29775 6.4082 6.91849C6.4082 6.53924 6.716 6.23145 7.09525 6.23145H13.0497C13.429 6.23145 13.7368 6.53924 13.7368 6.91849C13.7368 7.29775 13.429 7.60554 13.0497 7.60554Z" fill="#FAFAFA"/>
<path d="M13.0497 10.1241H7.09525C6.716 10.1241 6.4082 9.8163 6.4082 9.43705C6.4082 9.0578 6.716 8.75 7.09525 8.75H13.0497C13.429 8.75 13.7368 9.0578 13.7368 9.43705C13.7368 9.8163 13.429 10.1241 13.0497 10.1241Z" fill="#FAFAFA"/>
</g>
<defs>
<clipPath id="clip0_1_1917">
<rect width="20.1534" height="20.1534" fill="white" transform="translate(-0.00585938 0.964844)"/>
</clipPath>
</defs>
</svg>
<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M19.17 19.3281C18.2386 19.5383 11.9178 19.7886 10.9836 19.7368C10.9836 19.7368 10.1202 19.7335 9.09516 19.6516C8.48121 19.6026 7.99342 19.5604 7.42326 19.4692C6.44126 19.3112 6.01897 18.897 6.01897 18.8978C7.31357 19.7669 8.53907 18.864 8.73957 17.6281C8.80004 17.203 8.83867 16.775 8.85529 16.3459C12.996 16.3861 17.1364 16.3096 21.2766 16.1165C21.2312 16.6196 21.0878 17.3046 21.0648 17.4023C20.8736 18.23 20.3239 19.1614 19.17 19.3281ZM3.54226 2.83374C3.55271 2.51592 3.51253 2.20492 3.33051 1.99277C3.22323 1.85053 2.6603 1.42262 2.00818 1.54436C1.58347 1.62392 1.23873 1.92889 1.07158 2.32587C0.999978 2.4966 0.943901 2.67344 0.904026 2.85424C0.881927 2.95308 0.743305 3.59476 0.703125 4.09781C1.62406 4.05522 2.54485 4.01812 3.46551 3.98651C3.50047 3.51118 3.53141 3.07563 3.54226 2.83374ZM17.8926 10.1208C17.9139 11.0852 17.7785 13.7981 17.6222 15.4648C15.4091 15.5295 13.1891 15.5636 10.9893 15.5636C10.2833 15.5636 9.56728 15.56 8.85971 15.5532H8.85207C8.64495 15.5532 8.44606 15.6343 8.29792 15.7791C8.14978 15.9238 8.06414 16.1208 8.05932 16.3279C8.04398 16.7213 8.00858 17.1137 7.95324 17.5035C7.86485 18.0432 7.47791 18.4498 7.0524 18.4498C6.3396 18.4731 5.93981 18.2489 5.51712 17.9419C4.62793 17.2954 4.40573 16.1631 4.3997 16.1382C4.22653 14.6612 4.02964 11.2306 4.06018 10.1208C4.05094 9.41365 4.1088 7.76908 4.21206 6.28482C4.22412 5.71949 4.4202 3.45413 4.45314 2.73048C4.48328 1.87826 4.05134 0.909514 2.78968 0.962552C3.30399 0.777321 10.0454 0.453067 10.978 0.505703C12.2638 0.505703 14.229 0.688121 14.9297 0.859691C16.0797 1.15421 17.1879 2.33551 17.4611 3.51158C17.6463 4.23201 17.9288 8.80492 17.8926 10.1208ZM13.1891 9.22963C13.1891 9.02716 13.1087 8.83298 12.9655 8.68981C12.8224 8.54664 12.6282 8.46621 12.4257 8.46621H7.36741C7.16494 8.46621 6.97076 8.54664 6.82759 8.68981C6.68442 8.83298 6.60399 9.02716 6.60399 9.22963C6.60399 9.4321 6.68442 9.62628 6.82759 9.76945C6.97076 9.91262 7.16494 9.99305 7.36741 9.99305H12.4257C12.6282 9.99305 12.8224 9.91262 12.9655 9.76945C13.1087 9.62628 13.1891 9.4321 13.1891 9.22963ZM15.3749 6.01963C15.3749 5.81716 15.2945 5.62298 15.1513 5.47981C15.0082 5.33664 14.814 5.25621 14.6115 5.25621H7.36741C7.26716 5.25621 7.16789 5.27595 7.07526 5.31432C6.98264 5.35269 6.89848 5.40892 6.82759 5.47981C6.7567 5.5507 6.70047 5.63486 6.6621 5.72748C6.62374 5.82011 6.60399 5.91938 6.60399 6.01963C6.60399 6.11989 6.62374 6.21916 6.6621 6.31178C6.70047 6.40441 6.7567 6.48856 6.82759 6.55945C6.89848 6.63035 6.98264 6.68658 7.07526 6.72494C7.16789 6.76331 7.26716 6.78306 7.36741 6.78306H14.6111C14.7114 6.78311 14.8107 6.7634 14.9034 6.72506C14.996 6.68672 15.0803 6.63049 15.1512 6.5596C15.2221 6.4887 15.2784 6.40452 15.3168 6.31187C15.3552 6.21923 15.3749 6.11992 15.3749 6.01963Z" fill="url(#paint0_linear_1_12857)"/>
<defs>
<linearGradient id="paint0_linear_1_12857" x1="18.9215" y1="27.2575" x2="-3.66815" y2="-12.5131" gradientUnits="userSpaceOnUse">
<stop stop-color="#0893B1"/>
<stop offset="1" stop-color="#68D0E6"/>
</linearGradient>
</defs>
</svg>
<svg width="27" height="22" viewBox="0 0 27 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M23.3415 21.8945H3.36816C1.86653 21.8945 0.644531 20.6725 0.644531 19.1709C0.644531 18.6371 0.791607 18.1377 1.07123 17.7201L11.0361 1.41281C11.5064 0.612065 12.3979 0.105469 13.3548 0.105469C14.3117 0.105469 15.2033 0.612064 15.6808 1.42734L25.6584 17.7546C25.918 18.1377 26.0651 18.6371 26.0651 19.1709C26.0651 20.6725 24.8431 21.8945 23.3415 21.8945Z" fill="#DA0002"/>
<path d="M13.3542 14.6315C12.853 14.6315 12.4463 14.2248 12.4463 13.7236V6.46061C12.4463 5.95946 12.853 5.55273 13.3542 5.55273C13.8553 5.55273 14.262 5.95946 14.262 6.46061V13.7236C14.262 14.2248 13.8553 14.6315 13.3542 14.6315Z" fill="white"/>
<path d="M13.3542 18.263C13.8556 18.263 14.262 17.8566 14.262 17.3551C14.262 16.8537 13.8556 16.4473 13.3542 16.4473C12.8528 16.4473 12.4463 16.8537 12.4463 17.3551C12.4463 17.8566 12.8528 18.263 13.3542 18.263Z" fill="white"/>
</svg>
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg height="800px" width="800px" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 512 512" xml:space="preserve">
<path style="fill:#20A83E;" d="M437.019,74.98C388.668,26.628,324.38,0,256,0S123.333,26.628,74.98,74.98S0,187.62,0,256
c0,51.485,15.154,100.938,43.874,143.34L0.69,500.106c-1.343,3.134-0.607,6.966,1.798,9.381c2.495,2.506,6.519,3.206,9.714,1.684
l96.358-45.885C151.858,495.866,202.721,512,256,512c68.38,0,132.668-26.628,181.019-74.98C485.371,388.667,512,324.38,512,256
S485.371,123.333,437.019,74.98z"/>
<circle style="fill:#E5E5E5;" cx="256" cy="256" r="213.333"/>
<circle style="fill:#FFFFFF;" cx="256" cy="256" r="187.733"/>
<path style="fill:#20A83E;" d="M392.391,342.641l-7.673-41.561c-0.635-3.432-3.295-6.133-6.718-6.818l-60.339-12.067
c-2.802-0.559-5.691,0.317-7.709,2.334l-24.514,24.514c-41.302-18.507-64.226-41.478-84.396-84.555l24.435-24.436
c2.018-2.017,2.893-4.91,2.334-7.708l-12.068-60.34c-0.685-3.423-3.386-6.084-6.819-6.718l-41.561-7.673
c-1.138-0.21-2.31-0.187-3.44,0.07c-10.974,2.494-20.987,8.023-28.956,15.994c-13.801,13.801-19.075,33.938-15.252,58.237
c6.418,40.801,26.409,97.583,63.289,134.61l0.502,0.5c37.001,36.855,93.782,56.846,134.583,63.265
c5.14,0.809,10.092,1.21,14.838,1.21c17.694,0,32.517-5.581,43.4-16.462c7.97-7.971,13.5-17.984,15.993-28.957
C392.578,344.951,392.602,343.78,392.391,342.641z"/>
<path style="fill:#189433;" d="M349.996,376.428c-4.747,0-9.698-0.401-14.838-1.21c-40.801-6.419-97.583-26.41-134.583-63.265
l-0.502-0.5c-36.88-37.027-56.87-93.809-63.289-134.61c-3.323-21.118,0.236-39.088,10.283-52.492
c-4.388,2.565-8.458,5.689-12.097,9.328c-13.801,13.801-19.075,33.938-15.252,58.237c6.418,40.801,26.409,97.583,63.289,134.61
l0.502,0.5c37.001,36.855,93.782,56.846,134.583,63.265c5.14,0.809,10.092,1.21,14.838,1.21c17.694,0,32.517-5.581,43.4-16.462
c1.974-1.974,3.797-4.075,5.463-6.284C372.747,373.836,362.037,376.428,349.996,376.428z"/>
</svg>
\ No newline at end of file
class MissedCheckoutStripResponse {
String? error;
String? visibleText;
String? message;
int? sessionExists;
MissedCheckoutStripResponse(
{this.error, this.visibleText, this.message, this.sessionExists});
MissedCheckoutStripResponse.fromJson(Map<String, dynamic> json) {
error = json['error'];
visibleText = json['visible_text'];
message = json['message'];
sessionExists = json['session_exists'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['error'] = this.error;
data['visible_text'] = this.visibleText;
data['message'] = this.message;
data['session_exists'] = this.sessionExists;
return data;
}
}
...@@ -141,6 +141,8 @@ class AccountDetails { ...@@ -141,6 +141,8 @@ class AccountDetails {
String? state; String? state;
String? district; String? district;
String? subLocality; String? subLocality;
String? pincode;
String? date;
AccountDetails({ AccountDetails({
this.id, this.id,
...@@ -158,6 +160,8 @@ class AccountDetails { ...@@ -158,6 +160,8 @@ class AccountDetails {
this.state, this.state,
this.district, this.district,
this.subLocality, this.subLocality,
this.pincode,
this.date,
}); });
AccountDetails.fromJson(Map<String, dynamic> json) { AccountDetails.fromJson(Map<String, dynamic> json) {
...@@ -176,8 +180,12 @@ class AccountDetails { ...@@ -176,8 +180,12 @@ class AccountDetails {
state = json['state']; state = json['state'];
district = json['district']; district = json['district'];
subLocality = json['sub_locality']; subLocality = json['sub_locality'];
pincode = json['pincode'];
date = json['date'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = Map<String, dynamic>(); final Map<String, dynamic> data = Map<String, dynamic>();
data['id'] = id; data['id'] = id;
...@@ -195,6 +203,8 @@ class AccountDetails { ...@@ -195,6 +203,8 @@ class AccountDetails {
data['state'] = state; data['state'] = state;
data['district'] = district; data['district'] = district;
data['sub_locality'] = subLocality; data['sub_locality'] = subLocality;
data['pincode'] = pincode;
data['date'] = date;
return data; return data;
} }
} }
...@@ -341,6 +341,7 @@ class LeadProducts { ...@@ -341,6 +341,7 @@ class LeadProducts {
String? createdDatetime; String? createdDatetime;
String? updatedDatetime; String? updatedDatetime;
String? productName; String? productName;
String? remarks;
LeadProducts({ LeadProducts({
this.id, this.id,
...@@ -355,6 +356,7 @@ class LeadProducts { ...@@ -355,6 +356,7 @@ class LeadProducts {
this.createdDatetime, this.createdDatetime,
this.updatedDatetime, this.updatedDatetime,
this.productName, this.productName,
this.remarks
}); });
LeadProducts.fromJson(Map<String, dynamic> json) { LeadProducts.fromJson(Map<String, dynamic> json) {
...@@ -370,6 +372,7 @@ class LeadProducts { ...@@ -370,6 +372,7 @@ class LeadProducts {
createdDatetime = json['created_datetime']; createdDatetime = json['created_datetime'];
updatedDatetime = json['updated_datetime']; updatedDatetime = json['updated_datetime'];
productName = json['product_name']; productName = json['product_name'];
remarks = json['remarks'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
...@@ -386,6 +389,7 @@ class LeadProducts { ...@@ -386,6 +389,7 @@ class LeadProducts {
data['created_datetime'] = createdDatetime; data['created_datetime'] = createdDatetime;
data['updated_datetime'] = updatedDatetime; data['updated_datetime'] = updatedDatetime;
data['product_name'] = productName; data['product_name'] = productName;
data['remarks'] = remarks;
return data; return data;
} }
} }
......
...@@ -77,6 +77,7 @@ class LeadProducts { ...@@ -77,6 +77,7 @@ class LeadProducts {
String? createdDatetime; String? createdDatetime;
String? updatedDatetime; String? updatedDatetime;
String? productName; String? productName;
String? remarks;
LeadProducts({ LeadProducts({
this.id, this.id,
...@@ -90,6 +91,7 @@ class LeadProducts { ...@@ -90,6 +91,7 @@ class LeadProducts {
this.createdDatetime, this.createdDatetime,
this.updatedDatetime, this.updatedDatetime,
this.productName, this.productName,
this.remarks
}); });
LeadProducts.fromJson(Map<String, dynamic> json) { LeadProducts.fromJson(Map<String, dynamic> json) {
...@@ -104,6 +106,7 @@ class LeadProducts { ...@@ -104,6 +106,7 @@ class LeadProducts {
createdDatetime = json['created_datetime']; createdDatetime = json['created_datetime'];
updatedDatetime = json['updated_datetime']; updatedDatetime = json['updated_datetime'];
productName = json['product_name']; productName = json['product_name'];
remarks = json["remarks"];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
...@@ -119,6 +122,7 @@ class LeadProducts { ...@@ -119,6 +122,7 @@ class LeadProducts {
data['created_datetime'] = createdDatetime; data['created_datetime'] = createdDatetime;
data['updated_datetime'] = updatedDatetime; data['updated_datetime'] = updatedDatetime;
data['product_name'] = productName; data['product_name'] = productName;
data['remarks'] = remarks;
return data; return data;
} }
} }
...@@ -87,17 +87,20 @@ class Employees { ...@@ -87,17 +87,20 @@ class Employees {
String? id; String? id;
String? name; String? name;
Employees({this.id, this.name}); Employees({this.id, this.name});
Employees.fromJson(Map<String, dynamic> json) { Employees.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
name = json['name']; name = json['name'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{}; final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id; data['id'] = id;
data['name'] = name; data['name'] = name;
return data; return data;
} }
} }
...@@ -162,18 +165,21 @@ class States { ...@@ -162,18 +165,21 @@ class States {
class Products { class Products {
String? id; String? id;
String? name; String? name;
String? remarks;
Products({this.id, this.name}); Products({this.id, this.name});
Products.fromJson(Map<String, dynamic> json) { Products.fromJson(Map<String, dynamic> json) {
id = json['id']; id = json['id'];
name = json['name']; name = json['name'];
remarks = json['remarks'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{}; final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id; data['id'] = id;
data['name'] = name; data['name'] = name;
data['remarks'];
return data; return data;
} }
} }
...@@ -43,6 +43,7 @@ class ProductsData { ...@@ -43,6 +43,7 @@ class ProductsData {
String? isExists; String? isExists;
String? createdDatetime; String? createdDatetime;
String? updatedDatetime; String? updatedDatetime;
String? remarks;
ProductsData({ ProductsData({
this.id, this.id,
...@@ -60,6 +61,7 @@ class ProductsData { ...@@ -60,6 +61,7 @@ class ProductsData {
this.isExists, this.isExists,
this.createdDatetime, this.createdDatetime,
this.updatedDatetime, this.updatedDatetime,
this.remarks,
}); });
ProductsData.fromJson(Map<String, dynamic> json) { ProductsData.fromJson(Map<String, dynamic> json) {
...@@ -78,6 +80,7 @@ class ProductsData { ...@@ -78,6 +80,7 @@ class ProductsData {
isExists = json['is_exists']; isExists = json['is_exists'];
createdDatetime = json['created_datetime']; createdDatetime = json['created_datetime'];
updatedDatetime = json['updated_datetime']; updatedDatetime = json['updated_datetime'];
remarks = json['remarks'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
...@@ -97,6 +100,7 @@ class ProductsData { ...@@ -97,6 +100,7 @@ class ProductsData {
data['is_exists'] = isExists; data['is_exists'] = isExists;
data['created_datetime'] = createdDatetime; data['created_datetime'] = createdDatetime;
data['updated_datetime'] = updatedDatetime; data['updated_datetime'] = updatedDatetime;
data['remarks'] = remarks;
return data; return data;
} }
} }
class AdvanceListResponse {
List<AdvanceList>? advanceList;
String? error;
String? message;
int? sessionExists;
AdvanceListResponse(
{this.advanceList, this.error, this.message, this.sessionExists});
AdvanceListResponse.fromJson(Map<String, dynamic> json) {
if (json['advance_list'] != null) {
advanceList = <AdvanceList>[];
json['advance_list'].forEach((v) {
advanceList!.add(new AdvanceList.fromJson(v));
});
}
error = json['error'];
message = json['message'];
sessionExists = json['session_exists'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.advanceList != null) {
data['advance_list'] = this.advanceList!.map((v) => v.toJson()).toList();
}
data['error'] = this.error;
data['message'] = this.message;
data['session_exists'] = this.sessionExists;
return data;
}
}
class AdvanceList {
String? id;
String? createdDatetime;
String? narration;
String? issuedAmount;
String? deductedAmount;
String? type;
AdvanceList(
{this.id,
this.createdDatetime,
this.narration,
this.issuedAmount,
this.deductedAmount,
this.type
});
AdvanceList.fromJson(Map<String, dynamic> json) {
id = json['id'];
createdDatetime = json['created_datetime'];
narration = json['narration'];
issuedAmount = json['issued_amount'];
deductedAmount = json['deducted_amount'];
type = json['type'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['created_datetime'] = this.createdDatetime;
data['narration'] = this.narration;
data['issued_amount'] = this.issuedAmount;
data['deducted_amount'] = this.deductedAmount;
data['type'] = this.type;
return data;
}
}
class CasualLeaveHistoryResponse {
List<CasualLeaveHistory>? casualLeaveHistory;
String? error;
String? message;
int? sessionExists;
CasualLeaveHistoryResponse(
{this.casualLeaveHistory, this.error, this.message, this.sessionExists});
CasualLeaveHistoryResponse.fromJson(Map<String, dynamic> json) {
if (json['casual_leave_history'] != null) {
casualLeaveHistory = <CasualLeaveHistory>[];
json['casual_leave_history'].forEach((v) {
casualLeaveHistory!.add(new CasualLeaveHistory.fromJson(v));
});
}
error = json['error'];
message = json['message'];
sessionExists = json['session_exists'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
if (this.casualLeaveHistory != null) {
data['casual_leave_history'] =
this.casualLeaveHistory!.map((v) => v.toJson()).toList();
}
data['error'] = this.error;
data['message'] = this.message;
data['session_exists'] = this.sessionExists;
return data;
}
}
class CasualLeaveHistory {
String? des;
String? type;
String? cnt;
String? year;
CasualLeaveHistory({this.des, this.type, this.cnt, this.year});
CasualLeaveHistory.fromJson(Map<String, dynamic> json) {
des = json['des'];
type = json['type'];
cnt = json['cnt'];
year = json['year'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['des'] = this.des;
data['type'] = this.type;
data['cnt'] = this.cnt;
data['year'] = this.year;
return data;
}
}
import '../commonModels/commonAccountLedgerResponse.dart';
class AddOrderViewResponse { class AddOrderViewResponse {
List<Employees>? employees; List<Employees>? employees;
List<States>? states; List<States>? states;
...@@ -8,6 +10,15 @@ class AddOrderViewResponse { ...@@ -8,6 +10,15 @@ class AddOrderViewResponse {
String? error; String? error;
String? message; String? message;
// 🔹 New fields
AccountDetails? accountDetails;
List<Product>? productList;
String? feedback;
String? followupType;
String? inTime;
String? loc;
int? sessionExists;
AddOrderViewResponse({ AddOrderViewResponse({
this.employees, this.employees,
this.states, this.states,
...@@ -19,6 +30,7 @@ class AddOrderViewResponse { ...@@ -19,6 +30,7 @@ class AddOrderViewResponse {
this.message, this.message,
}); });
AddOrderViewResponse.fromJson(Map<String, dynamic> json) { AddOrderViewResponse.fromJson(Map<String, dynamic> json) {
if (json['employees'] != null) { if (json['employees'] != null) {
employees = <Employees>[]; employees = <Employees>[];
...@@ -38,9 +50,18 @@ class AddOrderViewResponse { ...@@ -38,9 +50,18 @@ class AddOrderViewResponse {
saleProducts!.add(SaleProducts.fromJson(v)); saleProducts!.add(SaleProducts.fromJson(v));
}); });
} }
unloadingScope = json['unloading_scope'].cast<String>(); // 🔹 add this
freightScope = json['freight_scope'].cast<String>(); accountDetails = json['account_details'] != null
erectionScope = json['erection_scope'].cast<String>(); ? AccountDetails.fromJson(json['account_details']) // from addOrderAccontDetailsResponse.dart
: null;
unloadingScope =
(json['unloading_scope'] as List?)?.map((e) => e.toString()).toList();
freightScope =
(json['freight_scope'] as List?)?.map((e) => e.toString()).toList();
erectionScope =
(json['erection_scope'] as List?)?.map((e) => e.toString()).toList();
error = json['error']; error = json['error'];
message = json['message']; message = json['message'];
} }
...@@ -84,6 +105,25 @@ class Employees { ...@@ -84,6 +105,25 @@ class Employees {
} }
} }
class States {
String? id;
String? name;
States({this.id, this.name});
States.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['name'] = name;
return data;
}
}
class SaleProducts { class SaleProducts {
String? id; String? id;
String? productCode; String? productCode;
...@@ -105,6 +145,7 @@ class SaleProducts { ...@@ -105,6 +145,7 @@ class SaleProducts {
String? refId; String? refId;
String? price; String? price;
String? type; String? type;
String? status; // ✅ Added field
String? productionProcessId; String? productionProcessId;
String? createdBy; String? createdBy;
String? datetime; String? datetime;
...@@ -132,6 +173,7 @@ class SaleProducts { ...@@ -132,6 +173,7 @@ class SaleProducts {
this.refId, this.refId,
this.price, this.price,
this.type, this.type,
this.status,
this.productionProcessId, this.productionProcessId,
this.createdBy, this.createdBy,
this.datetime, this.datetime,
...@@ -160,6 +202,7 @@ class SaleProducts { ...@@ -160,6 +202,7 @@ class SaleProducts {
refId = json['ref_id']; refId = json['ref_id'];
price = json['price']; price = json['price'];
type = json['type']; type = json['type'];
status = json['status']; // ✅ Added
productionProcessId = json['production_process_id']; productionProcessId = json['production_process_id'];
createdBy = json['created_by']; createdBy = json['created_by'];
datetime = json['datetime']; datetime = json['datetime'];
...@@ -189,6 +232,7 @@ class SaleProducts { ...@@ -189,6 +232,7 @@ class SaleProducts {
data['ref_id'] = refId; data['ref_id'] = refId;
data['price'] = price; data['price'] = price;
data['type'] = type; data['type'] = type;
data['status'] = status; // ✅ Added
data['production_process_id'] = productionProcessId; data['production_process_id'] = productionProcessId;
data['created_by'] = createdBy; data['created_by'] = createdBy;
data['datetime'] = datetime; data['datetime'] = datetime;
...@@ -198,21 +242,25 @@ class SaleProducts { ...@@ -198,21 +242,25 @@ class SaleProducts {
} }
} }
class States {
String? id; class Product {
String? productId;
String? name; String? name;
String? price;
States({this.id, this.name}); Product({this.productId, this.name, this.price});
States.fromJson(Map<String, dynamic> json) { Product.fromJson(Map<String, dynamic> json) {
id = json['id']; productId = json['product_id'];
name = json['name']; name = json['name'];
price = json['price'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{}; final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id; data['product_id'] = productId;
data['name'] = name; data['name'] = name;
data['price'] = price;
return data; return data;
} }
} }
...@@ -7,6 +7,7 @@ import 'package:generp/screens/LoginScreen.dart'; ...@@ -7,6 +7,7 @@ import 'package:generp/screens/LoginScreen.dart';
import 'package:generp/services/api_calling.dart'; import 'package:generp/services/api_calling.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../Models/MissedCheckoutStripResponse.dart';
import '../Models/hrmModels/jobDescriptionResponse.dart'; import '../Models/hrmModels/jobDescriptionResponse.dart';
class ProfileNotifer extends ChangeNotifier { class ProfileNotifer extends ChangeNotifier {
...@@ -99,6 +100,27 @@ class ProfileNotifer extends ChangeNotifier { ...@@ -99,6 +100,27 @@ class ProfileNotifer extends ChangeNotifier {
} }
} }
MissedCheckoutStripResponse? _missedCheckoutData;
MissedCheckoutStripResponse? get missedCheckoutData => _missedCheckoutData;
/// Missed checkout Strip provider
Future<void> fetchMissedCheckoutStrip(String empId, String session) async {
try {
final data = await ApiCalling.missedCheckoutStripApi(empId, session);
debugPrint("No data received from API ");
if (data != null) {
_missedCheckoutData = data;
notifyListeners(); // Notify UI to rebuild with new data
} else {
debugPrint("No data received from API");
}
} catch (e) {
debugPrint("Error in fetchMissedCheckoutStrip: $e");
}
}
String? _errorMessage; String? _errorMessage;
jobDescriptionResponse? _response; jobDescriptionResponse? _response;
......
...@@ -1235,20 +1235,27 @@ class Leadlistprovider extends ChangeNotifier { ...@@ -1235,20 +1235,27 @@ class Leadlistprovider extends ChangeNotifier {
'empId: ${HomeProv.empId}, session: ${HomeProv.session}, pageNumber: $_currentPage', 'empId: ${HomeProv.empId}, session: ${HomeProv.session}, pageNumber: $_currentPage',
); );
if (data != null && data.error == "0") { if(data != null){
if ( data.error == "0") {
print("Lead List Length ${data.leadList!.length}");
if (append) { if (append) {
_crmLeadList.addAll(data.leadList ?? []); _crmLeadList.addAll(data.leadList ?? []);
} else { } else {
_crmLeadList = data.leadList ?? []; _crmLeadList = data.leadList ?? [];
} }
if (data.leadList == null || data.leadList!.length < 10) { if (data.leadList!.length < 15) {
_hasMoreData = false; // no more pages _hasMoreData = false; // no more pages
} }
} else { } else if(data.error=="1") {
if (!append) _errorMessage = "No leads found!"; if (!append) _errorMessage = "No leads found!";
_hasMoreData = false; _hasMoreData = false;
} }
}else{
_hasMoreData = false;
}
} catch (e) { } catch (e) {
_errorMessage = "Error: $e"; _errorMessage = "Error: $e";
} }
......
...@@ -41,6 +41,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -41,6 +41,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
TextEditingController addProductPriceController = TextEditingController(); TextEditingController addProductPriceController = TextEditingController();
TextEditingController addQuantityController = TextEditingController(); TextEditingController addQuantityController = TextEditingController();
TextEditingController addTotalAmountController = TextEditingController(); TextEditingController addTotalAmountController = TextEditingController();
TextEditingController remarkController = TextEditingController();
TextEditingController companyNameController = TextEditingController(); TextEditingController companyNameController = TextEditingController();
TextEditingController contactPersonNameController = TextEditingController(); TextEditingController contactPersonNameController = TextEditingController();
...@@ -58,6 +59,8 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -58,6 +59,8 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
List<Map<String, dynamic>> _productRows = []; // For backend List<Map<String, dynamic>> _productRows = []; // For backend
List<Map<String, dynamic>> get productRows => _productRows; List<Map<String, dynamic>> get productRows => _productRows;
ProductsData? _selectedProductsDeatilsData; ProductsData? _selectedProductsDeatilsData;
List<Employees> _employeesList = []; List<Employees> _employeesList = [];
List<Sources> _sourcesList = []; List<Sources> _sourcesList = [];
...@@ -84,6 +87,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -84,6 +87,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
String? _selectedStatesId; String? _selectedStatesId;
String? _selectedStatesValue; String? _selectedStatesValue;
Products? _selectedProducts; Products? _selectedProducts;
String? _selectedProductsRemarks;
String? _selectedProductsId; String? _selectedProductsId;
String? _selectedProductsValue; String? _selectedProductsValue;
String? _selectedSalutation; String? _selectedSalutation;
...@@ -143,6 +147,8 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -143,6 +147,8 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
Products? get selectedProducts => _selectedProducts; Products? get selectedProducts => _selectedProducts;
String? get selectedProductsRemarks => _selectedProductsRemarks;
String? get selectedProductsId => _selectedProductsId; String? get selectedProductsId => _selectedProductsId;
String? get selectedProductsValue => _selectedProductsValue; String? get selectedProductsValue => _selectedProductsValue;
...@@ -263,6 +269,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -263,6 +269,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
if (value != null) { if (value != null) {
_selectedProductsId = value.id; _selectedProductsId = value.id;
_selectedProductsValue = value.name; _selectedProductsValue = value.name;
_selectedProductsRemarks = value.remarks;
} }
notifyListeners(); notifyListeners();
...@@ -278,6 +285,11 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -278,6 +285,11 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
set selectedProductsRemark(String? value) {
_selectedProductsRemarks = value;
notifyListeners();
}
set selectedSalutation(String? value) { set selectedSalutation(String? value) {
_selectedSalutation = value; _selectedSalutation = value;
salutationError = null; salutationError = null;
...@@ -430,6 +442,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -430,6 +442,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
addProductPriceController.text = product['price'] ?? ''; addProductPriceController.text = product['price'] ?? '';
addQuantityController.text = product['qty'] ?? ''; addQuantityController.text = product['qty'] ?? '';
addTotalAmountController.text = product['net_price'] ?? ''; addTotalAmountController.text = product['net_price'] ?? '';
remarkController.text = product['remarks'] ?? '';
notifyListeners(); notifyListeners();
} }
...@@ -443,6 +456,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -443,6 +456,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
void addInitializeForm(BuildContext context) { void addInitializeForm(BuildContext context) {
addProductPriceController.clear(); addProductPriceController.clear();
addQuantityController.clear(); addQuantityController.clear();
remarkController.clear();
addTotalAmountController.clear(); addTotalAmountController.clear();
notifyListeners(); notifyListeners();
...@@ -477,6 +491,44 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -477,6 +491,44 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
} catch (e) {} } catch (e) {}
} }
/// check phone number and name existence on server
Future<bool> checkAccountFieldExistence(
BuildContext context, {
required String type, // e.g. "mob1", "mob2", "name"
required String typeValue,
}) async {
try {
final prov = Provider.of<HomescreenNotifier>(context, listen: false);
final res = await ApiCalling.crmCheckAccountFieldsApi(
prov.empId,
prov.session,
typeValue,
type,
);
if (res != null) {
if (res.error == "0") {
// ✅ No error -> field available
debugPrint("✅ $type is available: $typeValue");
return true;
} else {
// ❌ Field already exists
debugPrint("⚠️ $type already exists: $typeValue");
return false;
}
} else {
debugPrint("❌ Null Response while checking $type");
return false;
}
} catch (e, s) {
debugPrint("❌ Error in checkAccountFieldExistence: $e \n$s");
return false;
}
}
Future<void> crmLeadListDistrictsOnStateAPIFunction( Future<void> crmLeadListDistrictsOnStateAPIFunction(
context, context,
mode, mode,
...@@ -645,6 +697,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -645,6 +697,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
if (data != null && data.error == "0") { if (data != null && data.error == "0") {
_selectedProductsDeatilsData = data.productsData!; _selectedProductsDeatilsData = data.productsData!;
addProductPriceController.text = data.productsData!.price!; addProductPriceController.text = data.productsData!.price!;
remarkController.text = data.productsData!.remarks!;
notifyListeners(); notifyListeners();
} }
} catch (e, s) { } catch (e, s) {
...@@ -662,10 +715,8 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -662,10 +715,8 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
onChangeContactPersonName(value) {
nameError = "";
notifyListeners();
}
onChangeAlternatemobile(value) { onChangeAlternatemobile(value) {
AlternatemobileError = ""; AlternatemobileError = "";
...@@ -677,11 +728,51 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -677,11 +728,51 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
notifyListeners(); notifyListeners();
} }
onChangemobile(value) { Future<void> onChangeContactPersonName(BuildContext context, String value) async {
nameError = "";
if (value.isEmpty) {
nameError = "Name cannot be empty";
} else if (value.length < 3) {
nameError = "Name must be at least 3 characters";
} else {
final exists = await checkAccountFieldExistence(
context,
type: "name",
typeValue: value,
);
if (!exists) {
nameError = "Name already exists";
} else {
nameError = null;
}
}
notifyListeners();
}
Future<void> onChangemobile(BuildContext context, String value) async {
mobileError = ""; mobileError = "";
if (value.isEmpty) {
mobileError = "Mobile number cannot be empty";
} else if (value.length != 10) {
mobileError = "Mobile number must be 10 digits";
} else {
// ✅ Call API to check existence
final exists = await checkAccountFieldExistence(
context,
type: "mob1", // or "mob2" depending on which mobile field you are validating
typeValue: value,
);
if (!exists) {
mobileError = "Mobile number already exists";
} else {
mobileError = null;
}
}
notifyListeners(); notifyListeners();
} }
onChangeaddress(value) { onChangeaddress(value) {
addressError = ""; addressError = "";
notifyListeners(); notifyListeners();
...@@ -715,6 +806,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -715,6 +806,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
void resetForm() { void resetForm() {
checkDropdownReset(); checkDropdownReset();
_productRows.clear(); _productRows.clear();
remarkController.clear();
sourceSearchController.clear(); sourceSearchController.clear();
referenceSearchController.clear(); referenceSearchController.clear();
teamSearchController.clear(); teamSearchController.clear();
...@@ -752,6 +844,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -752,6 +844,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
_selectedStatesId = null; _selectedStatesId = null;
_selectedStatesValue = null; _selectedStatesValue = null;
_selectedProducts = null; _selectedProducts = null;
_selectedProductsRemarks = null;
_selectedProductsId = null; _selectedProductsId = null;
_selectedProductsValue = null; _selectedProductsValue = null;
_selectedSalutation = null; _selectedSalutation = null;
...@@ -798,6 +891,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier { ...@@ -798,6 +891,7 @@ class Addnewleadsandprospectsprovider extends ChangeNotifier {
_selectedProducts != null) { _selectedProducts != null) {
_selectedProductsId = null; _selectedProductsId = null;
_selectedProductsValue = null; _selectedProductsValue = null;
_selectedProductsRemarks = null;
} }
if (!_employeesList.contains(_selectedEmployees) && if (!_employeesList.contains(_selectedEmployees) &&
_selectedEmployees != null) { _selectedEmployees != null) {
......
...@@ -23,11 +23,12 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -23,11 +23,12 @@ class Addprospectleadsprovider extends ChangeNotifier {
Products? _selectedProducts; Products? _selectedProducts;
String? _selectedProductsID; String? _selectedProductsID;
String? _selectedProductsName; String? _selectedProductsName;
String? _selectedProductsRemark;
ProductsData? _selectedProductsDeatilsData; ProductsData? _selectedProductsDeatilsData;
TextEditingController addLeadProductPriceController = TextEditingController(); TextEditingController addLeadProductPriceController = TextEditingController();
TextEditingController addLeadProductQtyController = TextEditingController(); TextEditingController addLeadProductQtyController = TextEditingController();
TextEditingController addLeadProductTotalPriceController = TextEditingController addLeadProductTotalPriceController = TextEditingController();
TextEditingController(); TextEditingController addLeadProductRemarksController = TextEditingController();
String? qtyError; String? qtyError;
String? priceError; String? priceError;
...@@ -36,8 +37,11 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -36,8 +37,11 @@ class Addprospectleadsprovider extends ChangeNotifier {
List<TextEditingController> editProductPriceControllers = []; List<TextEditingController> editProductPriceControllers = [];
List<TextEditingController> editQuantityControllers = []; List<TextEditingController> editQuantityControllers = [];
List<TextEditingController> editTotalAmountControllers = []; List<TextEditingController> editTotalAmountControllers = [];
List<TextEditingController> editRemarkControllers = [];
final List<String?> _selectedProductIds = []; final List<String?> _selectedProductIds = [];
final List<String?> _selectedValues = []; final List<String?> _selectedValues = [];
bool _submitLoading = false; bool _submitLoading = false;
ProductsData? get selectedProductsDetailsData => _selectedProductsDeatilsData; ProductsData? get selectedProductsDetailsData => _selectedProductsDeatilsData;
...@@ -49,6 +53,8 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -49,6 +53,8 @@ class Addprospectleadsprovider extends ChangeNotifier {
String? get selectedProductsName => _selectedProductsName; String? get selectedProductsName => _selectedProductsName;
String? get selectedProductsRemark => _selectedProductsRemark;
List<String?> get selectedProductIds => _selectedProductIds; List<String?> get selectedProductIds => _selectedProductIds;
List<String?> get selectedValues => _selectedValues; List<String?> get selectedValues => _selectedValues;
...@@ -193,6 +199,7 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -193,6 +199,7 @@ class Addprospectleadsprovider extends ChangeNotifier {
"price": editProductPriceControllers[i].text, "price": editProductPriceControllers[i].text,
"qty": editQuantityControllers[i].text, "qty": editQuantityControllers[i].text,
"net_price": editTotalAmountControllers[i].text, "net_price": editTotalAmountControllers[i].text,
"remarks": editRemarkControllers[i].text,
}; };
insertData.add(rowData); insertData.add(rowData);
} }
...@@ -282,6 +289,7 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -282,6 +289,7 @@ class Addprospectleadsprovider extends ChangeNotifier {
addLeadProductQtyController.text, addLeadProductQtyController.text,
addLeadProductPriceController.text, addLeadProductPriceController.text,
leadStatus, leadStatus,
addLeadProductRemarksController.text,
); );
if (data != null) { if (data != null) {
if (data.error == "0") { if (data.error == "0") {
...@@ -364,6 +372,7 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -364,6 +372,7 @@ class Addprospectleadsprovider extends ChangeNotifier {
statusError = null; statusError = null;
searchController.clear(); searchController.clear();
editProductPriceControllers.clear(); editProductPriceControllers.clear();
addLeadProductRemarksController.clear();
editQuantityControllers.clear(); editQuantityControllers.clear();
editTotalAmountControllers.clear(); editTotalAmountControllers.clear();
_selectedProductIds.clear(); _selectedProductIds.clear();
...@@ -375,6 +384,7 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -375,6 +384,7 @@ class Addprospectleadsprovider extends ChangeNotifier {
_selectedEmployeeValue = null; _selectedEmployeeValue = null;
_selectedProductsID = null; _selectedProductsID = null;
_selectedProductsName = null; _selectedProductsName = null;
_selectedProductsRemark = null;
addLeadProductPriceController.clear(); addLeadProductPriceController.clear();
addLeadProductQtyController.clear(); addLeadProductQtyController.clear();
addLeadProductTotalPriceController.clear(); addLeadProductTotalPriceController.clear();
...@@ -393,6 +403,8 @@ class Addprospectleadsprovider extends ChangeNotifier { ...@@ -393,6 +403,8 @@ class Addprospectleadsprovider extends ChangeNotifier {
_selectedProducts != null) { _selectedProducts != null) {
_selectedProductsID = null; _selectedProductsID = null;
_selectedProductsName = null; _selectedProductsName = null;
_selectedProductsRemark = null;
} }
notifyListeners(); notifyListeners();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment