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
14d01f4d
Commit
14d01f4d
authored
Jul 31, 2025
by
Sai Srinivas
Browse files
31-07-2025 By Sai Srinivas
Finance Module
parent
29665037
Changes
24
Show whitespace changes
Inline
Side-by-side
assets/images/logo_7.png
0 → 100644
View file @
14d01f4d
21.7 KB
assets/svg/finance/credited_filled_ic.svg
0 → 100644
View file @
14d01f4d
<svg
width=
"37"
height=
"37"
viewBox=
"0 0 37 37"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<circle
cx=
"18.21"
cy=
"18.208"
r=
"18.208"
transform=
"rotate(180 18.21 18.208)"
fill=
"#E7FFE5"
/>
<path
d=
"M25.1251 13.3927C25.5156 13.0021 25.5156 12.369 25.1251 11.9784C24.7346 11.5879 24.1014 11.5879 23.7109 11.9784L24.418 12.6855L25.1251 13.3927ZM11.6875 24.4161C11.6875 24.9683 12.1352 25.4161 12.6875 25.4161L21.6875 25.4161C22.2398 25.4161 22.6875 24.9683 22.6875 24.4161C22.6875 23.8638 22.2398 23.4161 21.6875 23.4161L13.6875 23.4161L13.6875 15.4161C13.6875 14.8638 13.2398 14.4161 12.6875 14.4161C12.1352 14.4161 11.6875 14.8638 11.6875 15.4161L11.6875 24.4161ZM24.418 12.6855L23.7109 11.9784L11.9804 23.7089L12.6875 24.4161L13.3946 25.1232L25.1251 13.3927L24.418 12.6855Z"
fill=
"#4CAF50"
/>
</svg>
assets/svg/finance/deb_credit_ic.svg
0 → 100644
View file @
14d01f4d
<svg
width=
"40"
height=
"40"
viewBox=
"0 0 40 40"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<circle
cx=
"20"
cy=
"20"
r=
"20"
fill=
"white"
/>
<path
d=
"M13.2929 26.0234C12.9024 26.4139 12.9024 27.0471 13.2929 27.4376C13.6834 27.8281 14.3166 27.8281 14.7071 27.4376L14 26.7305L13.2929 26.0234ZM26.7305 15C26.7305 14.4477 26.2828 14 25.7305 14L16.7305 14C16.1782 14 15.7305 14.4477 15.7305 15C15.7305 15.5522 16.1782 16 16.7305 16H24.7305V24C24.7305 24.5522 25.1782 25 25.7305 25C26.2828 25 26.7305 24.5522 26.7305 24L26.7305 15ZM14 26.7305L14.7071 27.4376L26.4376 15.7071L25.7305 15L25.0234 14.2929L13.2929 26.0234L14 26.7305Z"
fill=
"#ED3424"
/>
</svg>
assets/svg/finance/debited_filled_ic.svg
0 → 100644
View file @
14d01f4d
<svg
width=
"37"
height=
"37"
viewBox=
"0 0 37 37"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<circle
cx=
"18.208"
cy=
"18.208"
r=
"18.208"
fill=
"#FFEFEF"
/>
<path
d=
"M11.2929 23.0234C10.9024 23.4139 10.9024 24.0471 11.2929 24.4376C11.6834 24.8281 12.3166 24.8281 12.7071 24.4376L12 23.7305L11.2929 23.0234ZM24.7305 12C24.7305 11.4477 24.2828 11 23.7305 11L14.7305 11C14.1782 11 13.7305 11.4477 13.7305 12C13.7305 12.5522 14.1782 13 14.7305 13H22.7305V21C22.7305 21.5522 23.1782 22 23.7305 22C24.2828 22 24.7305 21.5522 24.7305 21L24.7305 12ZM12 23.7305L12.7071 24.4376L24.4376 12.7071L23.7305 12L23.0234 11.2929L11.2929 23.0234L12 23.7305Z"
fill=
"#ED3424"
/>
</svg>
assets/svg/finance/rupee_ic.svg
0 → 100644
View file @
14d01f4d
<svg
xmlns=
"http://www.w3.org/2000/svg"
width=
"11"
height=
"16"
viewBox=
"0 0 11 16"
fill=
"none"
>
<path
d=
"M10.6467 4.40373C10.6467 4.5603 10.5845 4.7105 10.4738 4.8212C10.3631 4.9319 10.2129 4.99413 10.0563 4.99413H7.68735C7.68735 5.09007 7.69473 5.19339 7.69473 5.28933C7.69473 6.46369 7.2282 7.59 6.3978 8.4204C5.5674 9.25079 4.4411 9.71733 3.26673 9.71733H2.13759L7.50285 14.5955C7.56089 14.6473 7.60794 14.7102 7.6413 14.7805C7.67466 14.8507 7.69361 14.927 7.69709 15.0047C7.70052 15.0824 7.68835 15.16 7.66137 15.233C7.63433 15.3059 7.593 15.3727 7.53975 15.4294C7.48443 15.4899 7.41718 15.5381 7.3422 15.5712C7.26728 15.6042 7.18628 15.6213 7.10433 15.6213C6.95709 15.6199 6.81539 15.5648 6.70581 15.4663L0.211411 9.56235C0.123678 9.48199 0.0622587 9.37702 0.0352065 9.26118C0.00814851 9.14535 0.0167269 9.02402 0.0598084 8.91314C0.102884 8.80227 0.178461 8.70698 0.276627 8.63973C0.374793 8.57254 0.490966 8.53659 0.609931 8.53653H3.26673C4.12795 8.53653 4.95386 8.19439 5.56286 7.58545C6.17179 6.97646 6.51393 6.15054 6.51393 5.28933C6.51393 5.19339 6.50655 5.09007 6.49917 4.99413H0.609931C0.453345 4.99413 0.303177 4.9319 0.192453 4.8212C0.0817356 4.7105 0.0195312 4.5603 0.0195312 4.40373C0.0195312 4.24714 0.0817356 4.09697 0.192453 3.98625C0.303177 3.87553 0.453345 3.81333 0.609931 3.81333H6.15969C5.88693 3.28066 5.47258 2.83351 4.96218 2.52103C4.45184 2.20856 3.86516 2.04285 3.26673 2.04213H0.609931C0.453345 2.04213 0.303177 1.97992 0.192453 1.86921C0.0817356 1.75848 0.0195312 1.60831 0.0195312 1.45173C0.0195312 1.29514 0.0817356 1.14497 0.192453 1.03425C0.303177 0.923533 0.453345 0.861328 0.609931 0.861328H10.0563C10.2129 0.861328 10.3631 0.923533 10.4738 1.03425C10.5845 1.14497 10.6467 1.29514 10.6467 1.45173C10.6467 1.60831 10.5845 1.75848 10.4738 1.86921C10.3631 1.97992 10.2129 2.04213 10.0563 2.04213H6.27039C6.79904 2.52894 7.20169 3.13671 7.44381 3.81333H10.0563C10.2129 3.81333 10.3631 3.87553 10.4738 3.98625C10.5845 4.09697 10.6467 4.24714 10.6467 4.40373Z"
fill=
"#2D2D2D"
/>
</svg>
\ No newline at end of file
lib/Models/commonModels/commonAccountdetailsResponse.dart
View file @
14d01f4d
class
commonAccountdetailsResponse
{
AccountDetails
?
accountDetails
;
BalanceDetails
?
balanceDetails
;
List
<
LedgerList
>?
ledgerList
;
String
?
error
;
String
?
message
;
commonAccountdetailsResponse
(
{
this
.
accountDetails
,
this
.
ledgerList
,
this
.
error
,
this
.
message
});
{
this
.
accountDetails
,
this
.
balanceDetails
,
this
.
ledgerList
,
this
.
error
,
this
.
message
});
commonAccountdetailsResponse
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
accountDetails
=
json
[
'account_details'
]
!=
null
?
new
AccountDetails
.
fromJson
(
json
[
'account_details'
])
:
null
;
balanceDetails
=
json
[
'balance_details'
]
!=
null
?
new
BalanceDetails
.
fromJson
(
json
[
'balance_details'
])
:
null
;
if
(
json
[
'ledger_list'
]
!=
null
)
{
ledgerList
=
<
LedgerList
>[];
json
[
'ledger_list'
].
forEach
((
v
)
{
...
...
@@ -26,6 +34,9 @@ class commonAccountdetailsResponse {
if
(
this
.
accountDetails
!=
null
)
{
data
[
'account_details'
]
=
this
.
accountDetails
!.
toJson
();
}
if
(
this
.
balanceDetails
!=
null
)
{
data
[
'balance_details'
]
=
this
.
balanceDetails
!.
toJson
();
}
if
(
this
.
ledgerList
!=
null
)
{
data
[
'ledger_list'
]
=
this
.
ledgerList
!.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
...
...
@@ -108,6 +119,28 @@ class AccountDetails {
}
}
class
BalanceDetails
{
String
?
totalDebit
;
String
?
totalCredit
;
String
?
balance
;
BalanceDetails
({
this
.
totalDebit
,
this
.
totalCredit
,
this
.
balance
});
BalanceDetails
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
totalDebit
=
json
[
'total_debit'
];
totalCredit
=
json
[
'total_credit'
];
balance
=
json
[
'balance'
];
}
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
data
[
'total_debit'
]
=
this
.
totalDebit
;
data
[
'total_credit'
]
=
this
.
totalCredit
;
data
[
'balance'
]
=
this
.
balance
;
return
data
;
}
}
class
LedgerList
{
String
?
id
;
String
?
accountId
;
...
...
lib/Notifiers/AttendanceNotifier.dart
View file @
14d01f4d
...
...
@@ -6,9 +6,11 @@ import 'package:generp/Utils/SharedpreferencesService.dart';
import
'package:generp/screens/LoginScreen.dart'
;
import
'package:generp/services/api_calling.dart'
;
import
'package:intl/intl.dart'
;
import
'package:provider/provider.dart'
;
import
'../Models/AttendanceListResponse.dart'
;
import
'../Utils/commonServices.dart'
;
import
'HomeScreenNotifier.dart'
;
class
AttendanceNotifier
extends
ChangeNotifier
{
List
<
dynamic
>
_attHistory
=
[];
...
...
@@ -93,16 +95,17 @@ class AttendanceNotifier extends ChangeNotifier {
_selectedDate
=
value
;
}
Future
<
void
>
init
(
homeprov
,
context
)
async
{
Future
<
void
>
init
(
context
)
async
{
_month
=
DateTime
.
now
();
_present_month
=
_month
;
await
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
homeprov
,
context
);
await
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
context
);
String
formattedDate
=
DateFormat
(
'yyyy-MM-dd'
).
format
(
DateTime
.
now
());
dateWiseAttendance
(
homeprov
,
formattedDate
,
context
);
dateWiseAttendance
(
formattedDate
,
context
);
}
Future
<
void
>
getAttendanceList
(
homeprov
,
BuildContext
context
)
async
{
Future
<
void
>
getAttendanceList
(
BuildContext
context
)
async
{
try
{
final
homeprov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
AttendanceListApi
(
homeprov
.
empId
,
homeprov
.
session
,
...
...
@@ -111,8 +114,11 @@ class AttendanceNotifier extends ChangeNotifier {
if
(
data
.
sessionExists
==
1
)
{
// _attHistory = data.attHistory!;
_attendanceStatus
=
data
.
attStatus
!;
Future
.
delayed
(
Duration
(
milliseconds:
400
),()
{
_isLoading
=
false
;
notifyListeners
();
},);
notifyListeners
();
}
else
{
_isLoading
=
true
;
// SharedpreferencesService().clearPreferences();
...
...
@@ -130,11 +136,11 @@ class AttendanceNotifier extends ChangeNotifier {
}
Future
<
void
>
dateWiseAttendance
(
homeprov
,
Selecteddate
,
BuildContext
context
,
)
async
{
try
{
final
homeprov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
DateWiseAttendanceApi
(
homeprov
.
empId
,
homeprov
.
session
,
...
...
@@ -156,8 +162,9 @@ class AttendanceNotifier extends ChangeNotifier {
}
}
Future
<
void
>
loadAttendanceDetails
(
homeprov
,
BuildContext
context
)
async
{
Future
<
void
>
loadAttendanceDetails
(
BuildContext
context
)
async
{
try
{
final
homeprov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
data
=
await
ApiCalling
.
LoadAttendanceDetails
(
homeprov
.
empId
,
homeprov
.
session
,
...
...
@@ -202,11 +209,13 @@ class AttendanceNotifier extends ChangeNotifier {
:
0
;
_penalityArrayList
.
add
({
dateKey:
penalty
});
}
print
(
_dateArrayList
);
print
(
_penalityArrayList
);
//
print(_dateArrayList);
//
print(_penalityArrayList);
Future
.
delayed
(
Duration
(
milliseconds:
400
),()
{
_isLoading
=
false
;
notifyListeners
();
},);
notifyListeners
();
}
else
{
toast
(
context
,
"Null response from server."
);
}
...
...
@@ -216,7 +225,7 @@ class AttendanceNotifier extends ChangeNotifier {
}
}
Future
<
void
>
getMonth
(
String
monthName
,
homeprov
,
context
)
async
{
Future
<
void
>
getMonth
(
String
monthName
,
context
)
async
{
switch
(
monthName
)
{
case
"January"
:
_monthNo
=
1
;
...
...
@@ -261,24 +270,24 @@ class AttendanceNotifier extends ChangeNotifier {
_year
=
DateFormat
(
'yyyy'
).
format
(
month
);
notifyListeners
();
await
loadAttendanceDetails
(
homeprov
,
context
);
await
loadAttendanceDetails
(
context
);
}
Future
<
void
>
refresh
(
homeprov
,
context
)
async
{
Future
<
void
>
refresh
(
context
)
async
{
await
Future
.
delayed
(
const
Duration
(
seconds:
2
));
_isLoading
=
true
;
_dateArrayList
=
[];
_penalityArrayList
=
[];
_initialRenderDone
=
true
;
_month
=
DateTime
.
now
();
await
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
homeprov
,
context
);
await
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
context
);
String
formattedDate
=
DateFormat
(
'yyyy-MM-dd'
).
format
(
DateTime
.
now
());
dateWiseAttendance
(
homeprov
,
formattedDate
,
context
);
dateWiseAttendance
(
formattedDate
,
context
);
_present_month
=
month
;
notifyListeners
();
}
void
setPreviousMonth
(
homeprov
,
context
)
{
void
setPreviousMonth
(
context
)
{
_month
=
DateTime
(
month
.
year
,
month
.
month
-
1
);
resetForNewMonth
();
if
(
DateFormat
(
'MMMM'
).
format
(
_present_month
)
==
...
...
@@ -288,10 +297,10 @@ class AttendanceNotifier extends ChangeNotifier {
_initialRenderDone
=
true
;
_month
=
present_month
;
}
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
homeprov
,
context
);
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
context
);
}
void
setNextMonth
(
homeprov
,
context
)
{
void
setNextMonth
(
context
)
{
_month
=
DateTime
(
month
.
year
,
month
.
month
+
1
);
resetForNewMonth
();
if
(
DateFormat
(
'MMMM'
).
format
(
_present_month
)
==
...
...
@@ -301,7 +310,7 @@ class AttendanceNotifier extends ChangeNotifier {
_initialRenderDone
=
true
;
_month
=
present_month
;
}
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
homeprov
,
context
);
getMonth
(
DateFormat
(
'MMMM'
).
format
(
_month
),
context
);
}
void
resetForNewMonth
()
{
...
...
lib/Notifiers/commonProvider/accountDetailsProvider.dart
View file @
14d01f4d
...
...
@@ -6,15 +6,28 @@ import 'package:provider/provider.dart';
import
'../../Models/commonModels/commonAccountdetailsResponse.dart'
;
class
Accountdetailsprovider
extends
ChangeNotifier
{
bool
_showMoreDetails
=
false
;
AccountDetails
_accountDetails
=
AccountDetails
();
BalanceDetails
_balanceDetails
=
BalanceDetails
();
List
<
LedgerList
>
_ledgerList
=
[];
bool
get
showMoreDetails
=>
_showMoreDetails
;
AccountDetails
get
accountDetails
=>
_accountDetails
;
BalanceDetails
get
balanceDetails
=>
_balanceDetails
;
List
<
LedgerList
>
get
ledgerList
=>
_ledgerList
;
double
totalCredit
=
0.0
;
double
totalDebit
=
0.0
;
double
totalRunningBalance
=
0.0
;
List
<
double
>
runningBalances
=
[];
set
showMoreDetails
(
bool
value
){
_showMoreDetails
=
value
;
notifyListeners
();
}
Future
<
void
>
accountdetailsAPIFunction
(
context
,
accountID
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
...
...
@@ -22,6 +35,7 @@ class Accountdetailsprovider extends ChangeNotifier{
if
(
data
!=
null
){
if
(
data
.
error
==
"0"
){
_accountDetails
=
data
.
accountDetails
!;
_balanceDetails
=
data
.
balanceDetails
!;
_ledgerList
=
data
.
ledgerList
!;
for
(
var
item
in
_ledgerList
)
{
double
credit
=
double
.
tryParse
(
item
.
creditAmount
.
toString
())
??
0
;
...
...
lib/Notifiers/commonProvider/accountsListProvider.dart
View file @
14d01f4d
...
...
@@ -571,6 +571,15 @@ class Accountslistprovider extends ChangeNotifier {
notifyListeners
();
}
void
onChangedMobileNum
(
value
){
notifyListeners
();
}
void
onChangedCompanyName
(
value
){
notifyListeners
();
}
Future
<
void
>
commonAccountListAPIFunction
(
context
)
async
{
try
{
var
prov
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
...
...
lib/screens/AttendanceScreen.dart
View file @
14d01f4d
...
...
@@ -20,8 +20,8 @@ class AttendanceScreen extends StatefulWidget {
}
class
_AttendanceScreenState
extends
State
<
AttendanceScreen
>
{
var
att_provider
;
var
homeProvider
;
//
var homeProvider;
Map
_source
=
{
ConnectivityResult
.
mobile
:
true
};
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
...
...
@@ -32,11 +32,11 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
_connectivity
.
myStream
.
listen
((
source
)
{
setState
(()
=>
_source
=
source
);
});
homeProvider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
final
homeProvider
=
Provider
.
of
<
HomescreenNotifier
>(
context
,
listen:
false
);
WidgetsBinding
.
instance
.
addPostFrameCallback
((
_
)
{
att_provider
=
Provider
.
of
<
AttendanceNotifier
>(
context
,
listen:
false
);
att_provider
.
getAttendanceList
(
homeProvider
,
context
);
att_provider
.
init
(
homeProvider
,
context
);
final
att_provider
=
Provider
.
of
<
AttendanceNotifier
>(
context
,
listen:
false
);
att_provider
.
getAttendanceList
(
context
);
att_provider
.
init
(
context
);
});
}
...
...
@@ -101,8 +101,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
String
formattedTime2
=
match2
?.
group
(
1
)
??
"-"
;
String
period2
=
match2
?.
group
(
2
)?.
toUpperCase
()
??
""
;
print
(
attendance
.
attendanceHistory
.
firstOrNull
);
final
dateArrayList
=
attendance
.
dateArrayList
;
final
penalityArrayList
=
attendance
.
penalityArrayList
;
var
selectedIndex
=
attendance
.
selectedIndex
;
...
...
@@ -140,16 +138,15 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
onRefresh:
()
async
{
await
Future
.
delayed
(
const
Duration
(
milliseconds:
600
));
attendance
.
getAttendanceList
(
homeProvider
,
context
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
loadAttendanceDetails
(
homeProvider
,
context
);
attendance
.
getAttendanceList
(
context
);
attendance
.
init
(
context
);
attendance
.
loadAttendanceDetails
(
context
);
},
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
appBar:
appbarNew
(
context
,
"Attendance"
,
0xFFFFFFFF
),
body:
Container
(
child:
SingleChildScrollView
(
body:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
@@ -174,7 +171,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
final
heads
=
[
"Check-in"
,
"Check-out"
];
return
Expanded
(
child:
Text
(
"Check-in"
,
heads
[
j
]
,
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
fontSize:
14
,
...
...
@@ -192,12 +189,12 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
final
times
=
[
formattedTime
,
formattedTime2
];
final
periods
=
[
period
,
period2
];
final
locations
=
[
attendance
attendance
.
attendanceHistory
.
isNotEmpty
?
attendance
.
attendanceHistory
.
first
[
'check_in_location'
].
toString
()??
"-"
,
attendance
.
first
[
'check_in_location'
].
toString
()??
"-"
:
"-"
,
attendance
.
attendanceHistory
.
isNotEmpty
?
attendance
.
attendanceHistory
.
first
[
'check_out_location'
].
toString
()??
"-"
,
.
first
[
'check_out_location'
].
toString
()??
"-"
:
"-"
,
];
return
Expanded
(
child:
Container
(
...
...
@@ -206,7 +203,7 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
vertical:
15
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
horizontal:
5
,
vertical:
5
,
),
decoration:
BoxDecoration
(
...
...
@@ -398,15 +395,18 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
GestureDetector
(
onTap:
()
{
attendance
.
setPreviousMonth
(
homeProvider
,
context
,
);
context
,
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
4.0
),
child:
SvgPicture
.
asset
(
"assets/svg/
arrow
_left.svg"
,
"assets/svg/
crm/calendar
_left.svg"
,
),
),
Text
(
),
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
5.0
),
child:
Text
(
monthLabel
,
style:
TextStyle
(
overflow:
TextOverflow
.
ellipsis
,
...
...
@@ -414,15 +414,18 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
color:
Color
(
0xFF2D2D2D
),
),
),
),
GestureDetector
(
onTap:
()
{
attendance
.
setNextMonth
(
homeProvider
,
context
,
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
4.0
),
child:
SvgPicture
.
asset
(
"assets/svg/arrow_right_new.svg"
,
"assets/svg/crm/calendar_right.svg"
,
),
),
),
],
...
...
@@ -559,7 +562,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
selectedIndex
=
index
;
if
(
penaltyKey
!=
null
)
{
attendance
.
dateWiseAttendance
(
homeProvider
,
penaltyKey
,
context
,
);
...
...
@@ -671,7 +673,6 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
],
),
),
),
bottomNavigationBar:
attendance
.
attendanceStatus
==
0
||
attendance
.
attendanceStatus
==
1
...
...
@@ -695,12 +696,11 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
);
if
(
res
==
true
)
{
attendance
.
getAttendanceList
(
homeProvider
,
context
,
);
attendance
.
init
(
homeProvider
,
context
);
attendance
.
init
(
context
);
attendance
.
loadAttendanceDetails
(
homeProvider
,
context
,
);
}
...
...
lib/screens/HomeScreen.dart
View file @
14d01f4d
...
...
@@ -136,16 +136,16 @@ class _MyHomePageState extends State<MyHomePage> {
return
(
connection
==
'Online'
)
?
Consumer2
<
HomescreenNotifier
,
ProfileNotifer
>(
builder:
(
context
,
homescreen
,
profile
,
child
)
{
final
coreRequiredRoles
=
[
"
430
"
,
"4
3
0"
,
"433"
,
"434"
,
];
final
coreRequiredRoles
=
[
"
12
"
,
"
5
40"
,
"433"
,
"434"
,
];
final
requiredRoles
=
[
"430"
,
"430"
,
"431"
,
"431"
];
final
coreNames
=
[
"CRM"
,
"Orders"
,
"Service"
,
"Gen Tracker"
,
];
final
names
=
[
"Attendance"
,
"Finance"
,
"ERP"
,
"Whizzdom"
];
final
subtitles
=
[
"Check-in,Check-out"
,
"Payment
s, expense tracking
"
,
"Payment
Requests, Transactions
"
,
"Centralized data and reports"
,
"
Training, Assessments
"
,
"
Page guidance, Learn to use
"
,
];
final
coreIcons
=
[
"assets/svg/home/home_crm_ic.svg"
,
...
...
@@ -214,8 +214,14 @@ class _MyHomePageState extends State<MyHomePage> {
children:
[
Expanded
(
flex:
3
,
child:
InkResponse
(
onTap:
()
{
_showProfileBottomSheet
(
context
,
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
//
padding: EdgeInsets.symmetric(vertical: 5),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
vertical
(
...
...
@@ -229,9 +235,9 @@ class _MyHomePageState extends State<MyHomePage> {
right:
15
,
top:
30
,
),
padding:
EdgeInsets
.
only
(
bottom:
1
5
,
right:
10
),
padding:
EdgeInsets
.
only
(
bottom:
1
,
right:
10
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
3
0
),
borderRadius:
BorderRadius
.
circular
(
2
0
),
gradient:
LinearGradient
(
colors:
[
AppColors
.
profile_card
,
...
...
@@ -241,84 +247,23 @@ class _MyHomePageState extends State<MyHomePage> {
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
2
,
flex:
8
,
child:
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
15
,
padding:
EdgeInsets
.
only
(
left:
25
,
top:
15
,
bottom:
15
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
SizedBox
(
width:
60
,
height:
60
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
50
),
child:
CachedNetworkImage
(
cacheKey:
profile
.
profileImage
,
fit:
BoxFit
.
cover
,
imageUrl:
"
${profile.profileImage}
"
,
useOldImageOnUrlChange:
false
,
placeholder:
(
context
,
url
)
=>
CircularProgressIndicator
.
adaptive
(),
errorWidget:
(
context
,
url
,
error
)
=>
Icon
(
Icons
.
error
),
),
),
),
Spacer
(),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Container
(
width:
13
,
height:
13
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
homescreen
.
onlineStatus
==
"Online"
?
Colors
.
green
:
Colors
.
yellow
,
),
),
SizedBox
(
width:
6
),
Text
(
"
${homescreen.onlineStatus}
"
,
style:
TextStyle
(
fontSize:
16
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF2D2D2D
),
),
),
],
),
],
),
),
),
Expanded
(
flex:
3
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
15
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
// Text(
// "${profile.employeeName}",
// maxLines: 1,
...
...
@@ -367,48 +312,77 @@ class _MyHomePageState extends State<MyHomePage> {
fontSize:
14
,
),
),
Spacer
(),
InkResponse
(
onTap:
()
{
_showProfileBottomSheet
(
context
,
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
3.0
,
),
child:
Row
(
SizedBox
(
height:
12
,),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Container
(
width:
12
,
height:
12
,
decoration:
BoxDecoration
(
shape:
BoxShape
.
circle
,
color:
homescreen
.
onlineStatus
==
"Online"
?
AppColors
.
approved_text_color
:
AppColors
.
rejected_text_color
,
),
),
SizedBox
(
width:
6
),
Text
(
"View Profile
"
,
"
${homescreen.onlineStatus}
"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
Color
(
0xFF2D2D2D
),
),
),
SizedBox
(
width:
5
),
SizedBox
(
width:
13
,
height:
13
,
child:
Center
(
child:
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
],
),
],
),
),
),
],
Spacer
(),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
15
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
SizedBox
(
width:
60
,
height:
60
,
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
50
),
child:
CachedNetworkImage
(
cacheKey:
profile
.
profileImage
,
fit:
BoxFit
.
cover
,
imageUrl:
"
${profile.profileImage}
"
,
useOldImageOnUrlChange:
false
,
placeholder:
(
context
,
url
)
=>
CircularProgressIndicator
.
adaptive
(),
errorWidget:
(
context
,
url
,
error
)
=>
Icon
(
Icons
.
error
),
),
),
),
],
),
),
...
...
@@ -418,8 +392,9 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),
),
Expanded
(
flex:
1
0
,
flex:
1
2
,
child:
Container
(
decoration:
BoxDecoration
(
gradient:
LinearGradient
(
...
...
@@ -565,14 +540,21 @@ class _MyHomePageState extends State<MyHomePage> {
// ),
// ],
if
(
homescreen
.
roleStatus
.
contains
(
"432"
,
))
...[
if
(
filteredItems
.
isNotEmpty
)
...[
Container
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
bottom:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
margin:
EdgeInsets
.
only
(
left:
10
,
bottom:
5
,
top:
10
),
child:
Text
(
"Workforce & Operations"
,
...
...
@@ -585,7 +567,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
1
0
,
vertical:
1
5
,
horizontal:
15
,
),
margin:
EdgeInsets
.
symmetric
(
...
...
@@ -733,14 +715,12 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
],
if
(
homescreen
.
roleStatus
.
contains
(
"432"
,
))
...[
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
margin:
EdgeInsets
.
only
(
left:
10
,
bottom:
5
,
top:
10
),
padding:
const
EdgeInsets
.
only
(
top:
10
,
...
...
@@ -830,6 +810,217 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),
]
else
...[
if
(
filteredItems
.
isNotEmpty
)
...[
Container
(
margin:
EdgeInsets
.
only
(
left:
10
,
bottom:
5
,
top:
10
),
padding:
const
EdgeInsets
.
only
(
top:
10
,
bottom:
5
,
),
child:
Text
(
"Workforce & Operations"
,
style:
TextStyle
(
color:
AppColors
.
grey_thick
,
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
),
),
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
5
,
),
child:
GridView
.
builder
(
shrinkWrap:
true
,
itemCount:
filteredItems
.
length
,
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount
(
crossAxisCount:
2
,
childAspectRatio:
2
/
1.1
,
),
itemBuilder:
(
context
,
ci
)
{
return
InkResponse
(
onTap:
()
async
{
var
res
;
switch
(
filteredItems
[
ci
][
'name'
])
{
case
"Attendance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
AttendanceScreen
(),
settings:
RouteSettings
(
arguments:
'AttendanceScreen'
,
),
),
);
break
;
case
"ERP"
:
bool
isGpsEnabled
=
await
Geolocator
.
isLocationServiceEnabled
();
if
(
isGpsEnabled
)
{
if
(
Platform
.
isAndroid
)
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
WebErpScreen
(
erp_url:
homescreen
.
webPageUrl
,
),
),
);
}
else
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
WebERPIOS
(
url:
homescreen
.
webPageUrl
,
),
),
);
}
}
else
{
requestGpsPermission
();
}
break
;
case
"Whizzdom"
:
bool
isGpsEnabled
=
await
Geolocator
.
isLocationServiceEnabled
();
if
(
isGpsEnabled
)
{
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
WebWhizzdomScreen
(
whizzdom_url:
homescreen
.
whizzdomPageUrl
,
),
),
);
}
else
{
requestGpsPermission
();
}
break
;
case
"Finance"
:
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Financedashboard
(),
settings:
RouteSettings
(
arguments:
'Financedashboard'
,
),
),
);
break
;
default
:
print
(
"111"
);
break
;
}
if
(
res
==
true
)
{
homescreen
.
DashboardApiFunction
(
context
,
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
horizontal:
15
,
),
margin:
EdgeInsets
.
symmetric
(
vertical:
7
,
horizontal:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
14
),
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Expanded
(
flex:
2
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
filteredItems
[
ci
][
'name'
]
??
"-"
,
style:
TextStyle
(
fontSize:
14
,
color:
AppColors
.
app_blue
,
fontFamily:
"JakartaMedium"
,
),
),
Text
(
filteredItems
[
ci
][
'subtitle'
]
??
"-"
,
style:
TextStyle
(
fontSize:
12
,
color:
AppColors
.
grey_semi
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
1
,
child:
SvgPicture
.
asset
(
filteredItems
[
ci
][
'icon'
]
??
"-"
,
),
),
],
),
),
);
},
),
),
],
],
// if (filteredItems.isNotEmpty) ...[
...
...
@@ -1042,8 +1233,10 @@ class _MyHomePageState extends State<MyHomePage> {
if
(
coreFilteredItems
.
isNotEmpty
)
...[
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
margin:
EdgeInsets
.
only
(
left:
10
,
bottom:
5
,
top:
10
),
padding:
const
EdgeInsets
.
only
(
top:
10
,
...
...
lib/screens/LoginScreen.dart
View file @
14d01f4d
...
...
@@ -33,6 +33,7 @@ class _LoginScreenState extends State<LoginScreen>
'assets/images/logo_4.png'
,
'assets/images/logo_5.png'
,
'assets/images/logo_6.png'
,
'assets/images/logo_7.png'
,
];
TextEditingController
password
=
TextEditingController
();
TextEditingController
email
=
TextEditingController
();
...
...
@@ -159,7 +160,7 @@ class _LoginScreenState extends State<LoginScreen>
onWillPop:
onBackPressed
,
child:
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
...
...
@@ -479,7 +480,10 @@ class _LoginScreenState extends State<LoginScreen>
],
Container
(
child:
InkWell
(
onTap:
loginProv
.
isLoading
?
null
:
()
{
onTap:
loginProv
.
isLoading
?
null
:
()
{
// LoginApiFunction();
loginProv
.
isLoading
=
true
;
loginProv
.
LoginApiFunction
(
...
...
@@ -487,7 +491,9 @@ class _LoginScreenState extends State<LoginScreen>
email
.
text
,
password
.
text
,
);
var
f
=
FocusScope
.
of
(
context
);
var
f
=
FocusScope
.
of
(
context
,
);
if
(!
f
.
hasPrimaryFocus
)
{
f
.
unfocus
();
...
...
@@ -513,14 +519,25 @@ class _LoginScreenState extends State<LoginScreen>
),
),
child:
Center
(
child:
loginProv
.
isLoading
?
CircularProgressIndicator
.
adaptive
(
padding:
EdgeInsets
.
all
(
5
),
valueColor:
AlwaysStoppedAnimation
(
Colors
.
white
),):
Text
(
child:
loginProv
.
isLoading
?
CircularProgressIndicator
.
adaptive
(
padding:
EdgeInsets
.
all
(
5
,
),
valueColor:
AlwaysStoppedAnimation
(
Colors
.
white
,
),
)
:
Text
(
"Login"
,
textAlign:
TextAlign
.
center
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontFamily:
"JakartaRegular"
,
fontFamily:
"JakartaRegular"
,
),
),
),
...
...
@@ -589,7 +606,9 @@ class _LoginScreenState extends State<LoginScreen>
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
18
),
borderRadius:
BorderRadius
.
circular
(
18
,
),
color:
AppColors
.
text_field_color
,
),
child:
Row
(
...
...
@@ -598,7 +617,9 @@ class _LoginScreenState extends State<LoginScreen>
width:
180
,
height:
45
,
alignment:
Alignment
.
center
,
margin:
EdgeInsets
.
only
(
right:
5.0
),
margin:
EdgeInsets
.
only
(
right:
5.0
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
10.0
),
...
...
@@ -640,13 +661,16 @@ class _LoginScreenState extends State<LoginScreen>
height:
50
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
18
),
borderRadius:
BorderRadius
.
circular
(
18
,
),
),
child:
InkWell
(
onTap:
()
{
// Share.share("${loginProv.deviceId}");
Share
.
share
(
"Your device ID is:
${loginProv.deviceId}
"
);
Share
.
share
(
"Your device ID is:
${loginProv.deviceId}
"
,
);
},
child:
SvgPicture
.
asset
(
"assets/svg/share_ic.svg"
,
...
...
@@ -739,8 +763,17 @@ class LogoWidget extends StatelessWidget {
return
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
/
4.5
,
height:
MediaQuery
.
of
(
context
).
size
.
width
/
4.5
,
padding:
imagePath
==
"assets/images/logo_7.png"
?
EdgeInsets
.
symmetric
(
horizontal:
5
):
null
,
decoration:
BoxDecoration
(
image:
DecorationImage
(
image:
AssetImage
(
imagePath
),
fit:
BoxFit
.
cover
),
color:
imagePath
==
"assets/images/logo_7.png"
?
Colors
.
white
:
Colors
.
transparent
,
borderRadius:
BorderRadius
.
circular
(
25
),
image:
DecorationImage
(
image:
AssetImage
(
imagePath
),
fit:
imagePath
==
"assets/images/logo_7.png"
?
BoxFit
.
scaleDown
:
BoxFit
.
cover
,
),
),
);
}
...
...
lib/screens/commom/accountLedger.dart
View file @
14d01f4d
...
...
@@ -608,6 +608,7 @@ class _AccountledgerState extends State<Accountledger> {
paymentID:
item.refId,
type: item.type,
description: item.description,
),
settings: RouteSettings(
name:
...
...
lib/screens/commom/accountsList.dart
View file @
14d01f4d
...
...
@@ -94,7 +94,7 @@ class _AccountslistState extends State<Accountslist> {
print
(
accountList
.
length
);
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
appBar:
appbar2
New
(
context
,
"Account List"
,
provider
.
resetValues
,
...
...
@@ -103,12 +103,16 @@ class _AccountslistState extends State<Accountslist> {
child:
InkResponse
(
onTap:
()
{
_showFilterSheet
(
context
);
_showFilterSheet
1
(
context
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
8.0
),
child:
SvgPicture
.
asset
(
"assets/svg/filter_ic.svg"
,
height:
18
),
),
),
),
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
provider
.
isLoading
...
...
@@ -155,42 +159,68 @@ class _AccountslistState extends State<Accountslist> {
);
}
return
Container
(
return
InkResponse
(
onTap:
()
async
{
print
(
"length,
${accountList.length}
"
,
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
accountList
[
index
]
.
id
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
horizontal:
5
,
vertical:
5
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
child:
Row
(
children:
[
// Expanded(
// flex: 1,
// child: Container(
// height: 50,
// width: 35,
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Color(0xFFEAF7FF),
// borderRadius:
// BorderRadius.circular(8),
// ),
// child: SvgPicture.asset(
// "assets/svg/common_ac_list_ic.svg",
// ),
// ),
// ),
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFEAF7FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
),
child:
SvgPicture
.
asset
(
"assets/svg/c
ommon_ac
_list_ic.svg"
,
"assets/svg/c
rm/lead_details
_list_ic.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
4
,
flex:
7
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
...
...
@@ -198,9 +228,11 @@ class _AccountslistState extends State<Accountslist> {
children:
[
Text
(
accountList
[
index
].
name
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"Jakarta
Medium
"
,
"Jakarta
Regular
"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
...
...
@@ -208,118 +240,23 @@ class _AccountslistState extends State<Accountslist> {
),
Text
(
accountList
[
index
]
.
contactNam
e
??
.
typ
e
??
"-"
,
maxLines:
1
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Mobile Number"
,
"Email Id"
,
"Address"
,
"Account Type"
,
];
final
subHeadings
=
[
accountList
[
index
].
mob1
??
"-"
,
accountList
[
index
].
email
??
"-"
,
accountList
[
index
].
address
??
"-"
,
accountList
[
index
].
type
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
SizedBox
(
width:
15
),
Expanded
(
child:
Text
(
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
),
"JakartaRegular"
,
fontSize:
12
,
color:
AppColors
.
grey_semi
,
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
print
(
"length,
${accountList.length}
"
,
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountslistdetails
(
accountID:
accountList
[
index
]
.
id
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
);
},
),
...
...
@@ -449,9 +386,321 @@ class _AccountslistState extends State<Accountslist> {
);
}
Future
<
void
>
_showFilterSheet1
(
BuildContext
context
)
{
List
<
bool
>
isSelected
=
List
.
generate
(
2
,
(
index
)
=>
index
==
0
?
true
:
false
,
);
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:
Padding
(
padding:
EdgeInsets
.
only
(
bottom:
MediaQuery
.
of
(
context
).
viewInsets
.
bottom
,
),
child:
Consumer
<
Accountslistprovider
>(
builder:
(
context
,
provider
,
child
)
{
int
selectedIndex
=
isSelected
.
indexWhere
(
(
element
)
=>
element
==
true
,
);
List
<
String
>
headings
=
[
"Account Name"
,
"Mobile Number"
,
];
return
Container
(
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
left:
15
),
child:
Text
(
"Filter"
,
style:
TextStyle
(
color:
AppColors
.
app_blue
,
fontSize:
18
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
const
SizedBox
(
height:
20
),
Expanded
(
flex:
4
,
child:
Container
(
decoration:
BoxDecoration
(
border:
Border
(
top:
BorderSide
(
color:
const
Color
(
0xFFA5DAF9
)),
bottom:
BorderSide
(
color:
const
Color
(
0xFFA5DAF9
),
),
),
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
3
,
child:
Column
(
children:
List
.
generate
(
headings
.
length
,
(
jj
)
{
return
Expanded
(
child:
InkResponse
(
onTap:
()
{
setState
(()
{
// Reset all to false
isSelected
=
List
.
generate
(
headings
.
length
,
(
index
)
=>
false
,
);
// Set the clicked item to true
isSelected
[
jj
]
=
true
;
});
},
child:
Container
(
padding:
const
EdgeInsets
.
symmetric
(
vertical:
7.5
,
horizontal:
10
,
),
decoration:
BoxDecoration
(
border:
Border
(
left:
isSelected
[
jj
]
?
BorderSide
(
color:
AppColors
.
app_blue
,
width:
5.0
,
)
:
const
BorderSide
(
color:
Colors
.
transparent
,
),
bottom:
jj
==
headings
.
length
-
1
?
const
BorderSide
(
color:
Colors
.
transparent
,
)
:
const
BorderSide
(
color:
Color
(
0xFFA5DAF9
,
),
),
),
color:
const
Color
(
0xFFE6F6FF
),
),
child:
Center
(
child:
Text
(
headings
[
jj
],
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
AppColors
.
semi_black
,
),
),
),
),
),
);
}),
),
),
Expanded
(
flex:
5
,
child:
SingleChildScrollView
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
5
,
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
if
(
selectedIndex
==
0
)
...[
SizedBox
(
height:
10
,),
textControllerWidget
(
context
,
provider
.
companyNameController
,
""
,
"Enter Account Name"
,
provider
.
onChangedCompanyName
,
TextInputType
.
text
,
false
,
null
,
),
]
else
if
(
selectedIndex
==
1
)
...[
SizedBox
(
height:
10
,),
textControllerWidget
(
context
,
provider
.
mobileNumberController
,
""
,
"Enter Mobile Number"
,
provider
.
onChangedMobileNum
,
TextInputType
.
number
,
false
,
FilteringTextInputFormatter
.
digitsOnly
,
),
]
],
),
),
),
],
),
),
),
Padding
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
15
,
vertical:
20
,
),
child:
InkResponse
(
onTap:
()
{
provider
.
pageNum
=
1
;
provider
.
commonAccountListAPIFunction
(
context
);
Navigator
.
pop
(
context
);
},
child:
Container
(
height:
45
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
AppColors
.
app_blue
,
borderRadius:
BorderRadius
.
circular
(
15
),
),
child:
const
Text
(
"Search"
,
style:
TextStyle
(
fontSize:
15
,
fontFamily:
"JakartaMedium"
,
color:
Colors
.
white
,
),
),
),
),
),
],
),
);
},
),
),
);
},
);
},
);
}
Future
<
bool
>
_onBackPressed
(
BuildContext
context
)
async
{
Provider
.
of
<
Accountslistprovider
>(
context
,
listen:
false
).
pageNum
=
1
;
Navigator
.
pop
(
context
,
true
);
return
true
;
}
}
// Divider(
// thickness: 0.5,
// color: Color(0xFFD7D7D7),
// ),
// ...List.generate(4, (j) {
// final headings = [
// "Mobile Number",
// "Email Id",
// "Address",
// "Account Type",
// ];
//
// final subHeadings = [
// accountList[index].mob1 ?? "-",
// accountList[index].email ?? "-",
// accountList[index].address ?? "-",
// accountList[index].type ?? "-",
// ];
// return Container(
// padding: EdgeInsets.symmetric(
// vertical: 5,
// ),
// child: Row(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Expanded(
// child: Text(
// headings[j],
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
// ),
// SizedBox(width: 15),
// Expanded(
// child: Text(
// subHeadings[j] ?? "-",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.grey_thick,
// ),
// ),
// ),
// ],
// ),
// );
// }),
// InkResponse(
//
// child: Container(
// padding: EdgeInsets.symmetric(
// vertical: 5,
// ),
// child: Row(
// crossAxisAlignment:
// CrossAxisAlignment.center,
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Text(
// "View Details",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.app_blue,
// ),
// ),
// SizedBox(width: 5),
// SvgPicture.asset(
// "assets/svg/next_button.svg",
// ),
// ],
// ),
// ),
// ),
lib/screens/commom/accountsListDetails.dart
View file @
14d01f4d
import
'dart:io'
;
import
'package:connectivity_plus/connectivity_plus.dart'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Notifiers/commonProvider/accountDetailsProvider.dart'
;
...
...
@@ -91,84 +92,370 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
}
overallBalance
=
totalDebit
-
totalCredit
;
final
headings1
=
[
"Bank Name"
,
"Bank Branch"
,
"Bank IFSC Code"
,
"Account Holder"
,
"Account Number"
,
"Bank UPI ID"
,
];
final
headings2
=
[
"Address"
,
"State"
,
"District"
,
"Sub Locality"
];
final
headings3
=
[
"Created Date"
];
final
subHeadings1
=
[
provider
.
accountDetails
.
bankName
??
"-"
,
provider
.
accountDetails
.
bankBranchName
??
"-"
,
provider
.
accountDetails
.
bankIfscCode
??
"-"
,
provider
.
accountDetails
.
bankAccountHolderName
??
"-"
,
provider
.
accountDetails
.
bankAccountNumber
??
"-"
,
provider
.
accountDetails
.
bankUpiId
??
"-"
,
];
final
subHeadings2
=
[
provider
.
accountDetails
.
address
??
"-"
,
provider
.
accountDetails
.
state
??
"-"
,
provider
.
accountDetails
.
district
??
"-"
,
provider
.
accountDetails
.
subLocality
??
"-"
,
];
final
subHeadings3
=
[
provider
.
accountDetails
.
createdDatetime
??
"-"
];
return
Scaffold
(
appBar:
appbar2
(
appBar:
appbar2
New
(
context
,
"Account Details"
,
provider
.
resetValues
,
SizedBox
.
shrink
(),
0xFFFFFFFF
,
),
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Card
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
bottomLeft:
Radius
.
circular
(
30
),
bottomRight:
Radius
.
circular
(
30
),
),
),
elevation:
2
,
child:
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
5
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFE6F6FF
),
borderRadius:
BorderRadius
.
circular
(
8
),
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
vertical
(
bottom:
Radius
.
circular
(
30
),
),
child:
Row
(
),
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
padding:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
,
),
child:
Column
(
children:
[
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
height:
12
),
SizedBox
(
width:
5
),
Row
(
children:
[
Expanded
(
flex:
1
,
child:
Container
(
height:
50
,
width:
35
,
child:
SvgPicture
.
asset
(
"assets/svg/crm/lead_details_ic.svg"
,
),
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
provider
.
accountDetails
.
name
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
overallBalance
.
toString
()
??
"-"
,
style:
TextStyle
(
fontSize:
12
),
provider
.
accountDetails
.
type
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_semi
,
),
),
],
),
),
),
resizeToAvoidBottomInset:
true
,
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
SizedBox
(
child:
SingleChildScrollView
(
SizedBox
(
width:
10
),
],
),
Visibility
(
visible:
provider
.
showMoreDetails
?
true
:
false
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
Expanded
(
child:
Container
(
flex:
3
,
child:
Text
(
"Bank Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
subHeadings1
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
vertical:
7
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings1
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFEFEF
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
),
Expanded
(
child:
Text
(
subHeadings1
[
j
]
==
""
?
"-"
:
subHeadings1
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
RichText
(
text:
TextSpan
(
Expanded
(
flex:
3
,
child:
Text
(
"Address Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
subHeadings2
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
TextSpan
(
text:
"
${totalCredit}
"
,
Expanded
(
child:
Text
(
headings2
[
j
],
style:
TextStyle
(
color:
Color
(
0xFFED3424
),
fontFamily:
"JakartaRegular"
,
fontSize:
25
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
subHeadings2
[
j
]
==
""
?
"-"
:
subHeadings2
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
4
,
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"More Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
6
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
Text
(
"credit"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
),
),
...
List
.
generate
(
subHeadings3
.
length
,
(
j
)
{
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7
,
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings3
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
subHeadings3
[
j
]
==
""
?
"-"
:
subHeadings3
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
],
),
),
InkResponse
(
onTap:
()
async
{
provider
.
showMoreDetails
=
!
provider
.
showMoreDetails
;
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Text
(
provider
.
showMoreDetails
?
"Hide Details"
:
"View Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
Transform
.
flip
(
flipY:
provider
.
showMoreDetails
?
true
:
false
,
child:
SvgPicture
.
asset
(
"assets/svg/arrow_dropdown.svg"
,
height:
25
,
width:
20
,
color:
AppColors
.
app_blue
,
),
),
],
),
),
),
],
),
),
],
),
),
Container
(
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
...
...
@@ -178,149 +465,128 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
vertical:
15
,
),
decoration:
BoxDecoration
(
color:
Color
(
0xFF
FFEFE
F
),
color:
Color
(
0xFF
EDF7F
F
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
RichText
(
text:
TextSpan
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
TextSpan
(
text:
"
${totalDebit}
"
,
Text
(
provider
.
balanceDetails
.
balance
??
"-
"
,
style:
TextStyle
(
color:
Color
(
0xFFED3424
)
,
fontFamily:
"Jakarta
Regular
"
,
fontSize:
25
,
fontSize:
20
,
fontFamily:
"Jakarta
Medium
"
,
color:
AppColors
.
app_blue
,
),
),
],
),
Container
(
padding:
EdgeInsets
.
only
(
top:
5
),
child:
Text
(
"Total Balance"
,
maxLines:
1
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"debit"
,
style:
TextStyle
(
color:
Color
(
0xFF818181
)),
),
],
),
),
Row
(
children:
[
...
List
.
generate
(
2
,
(
jj
)
{
final
texts
=
[
"Credited"
,
"Debited"
];
final
heads
=
[
provider
.
balanceDetails
.
totalCredit
??
"-"
,
provider
.
balanceDetails
.
totalDebit
??
"-"
,
];
final
svgs
=
[
"assets/svg/finance/cred_debit_ic.svg"
,
"assets/svg/finance/deb_credit_ic.svg"
,
];
return
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
],
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
15
,
),
// Text(
// "Account Details",
// style: TextStyle(
// fontSize: 16,
// color: AppColors.grey_thick,
// fontFamily: "JakartaMedium",
// ),
// ),
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
color:
texts
[
jj
]
==
"Credited"
?
Color
(
0xFFFFEFEF
)
:
Color
(
0xFFE7FFE5
),
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
List
.
generate
(
12
,
(
j
)
{
final
headings
=
[
"Name"
,
"Address"
,
"Date"
,
"Bank Name"
,
"Bank Branch"
,
"Bank IFSC Code"
,
"Account Holder"
,
"Account Number"
,
"Bank UPI ID"
,
"State"
,
"District"
,
"Sub Locality"
,
];
final
subHeadings
=
[
provider
.
accountDetails
.
name
??
"-"
,
provider
.
accountDetails
.
address
??
"-"
,
provider
.
accountDetails
.
createdDatetime
??
"-"
,
provider
.
accountDetails
.
bankName
??
"-"
,
provider
.
accountDetails
.
bankBranchName
??
"-"
,
provider
.
accountDetails
.
bankIfscCode
??
"-"
,
provider
.
accountDetails
.
bankAccountHolderName
??
"-"
,
provider
.
accountDetails
.
bankAccountNumber
??
"-"
,
provider
.
accountDetails
.
bankUpiId
??
"-"
,
provider
.
accountDetails
.
state
??
"-"
,
provider
.
accountDetails
.
district
??
"-"
,
provider
.
accountDetails
.
subLocality
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
Text
(
heads
[
jj
]
??
"-"
,
maxLines:
2
,
style:
TextStyle
(
fontSize:
20
,
color:
texts
[
jj
]
==
"Credited"
?
Color
(
0xFFEF3739
)
:
Color
(
0xFF0D9C00
),
fontFamily:
"JakartaMedium"
,
),
),
Container
(
padding:
EdgeInsets
.
only
(
top:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
3
,
child:
Text
(
headings
[
j
],
texts
[
jj
]
??
"-"
,
maxLines:
1
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
color:
AppColors
.
semi_black
,
),
),
),
SizedBox
(
width:
15
),
Expanded
(
child:
Text
(
subHeadings
[
j
]
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
flex:
1
,
child:
SvgPicture
.
asset
(
svgs
[
jj
]),
),
],
),
),
],
),
),
);
}),
],
),
],
),
),
ListView
.
builder
(
physics:
NeverScrollableScrollPhysics
(),
shrinkWrap:
true
,
itemCount:
g
ro
upedData
.
keys
.
length
,
itemCount:
p
ro
vider
.
ledgerList
.
length
,
itemBuilder:
(
context
,
index
)
{
String
date
=
groupedData
.
keys
.
elementAt
(
index
);
List
<
LedgerList
>
items
=
groupedData
[
date
]!;
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
EdgeInsets
.
only
(
bottom:
5
),
child:
Text
(
date
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaMedium"
,
color:
Color
(
0xFF818181
),
),
),
),
...
items
.
map
((
item
)
{
double
running_balance
=
0
;
int
currentIndex
=
provider
.
ledgerList
.
indexOf
(
item
,
provider
.
ledgerList
[
index
]
,
);
for
(
var
i
=
0
;
i
<=
currentIndex
;
i
++)
{
var
ledgerItem
=
provider
.
ledgerList
[
i
];
...
...
@@ -336,8 +602,22 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
0
;
running_balance
+=
(
debit
-
credit
);
}
return
Container
(
return
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Transactiondetails
(
paymentID:
provider
.
ledgerList
[
index
].
refId
,
type:
provider
.
ledgerList
[
index
].
type
,
description:
provider
.
ledgerList
[
index
].
description
,
),
),
);
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
...
...
@@ -347,25 +627,24 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
16
),
),
child:
Column
(
children:
[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
1
,
child:
SizedBox
(
child:
item
.
type
==
"Credit"
?
Image
.
asset
(
"assets/images/trans_debit.png"
,
provider
.
ledgerList
[
index
].
type
==
"Credit"
?
SvgPicture
.
asset
(
"assets/svg/finance/debited_filled_ic.svg"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
)
:
Imag
e
.
asset
(
"assets/images/trans_credit.pn
g"
,
:
SvgPictur
e
.
asset
(
"assets/svg/finance/credited_filled_ic.sv
g"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
...
...
@@ -374,23 +653,27 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
),
SizedBox
(
width:
10
),
Expanded
(
flex:
5
,
flex:
8
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
item
.
description
??
"-"
,
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Text
(
provider
.
ledgerList
[
index
]
.
description
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
12
,
),
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
),
],
),
),
),
...
...
@@ -406,24 +689,38 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
children:
[
TextSpan
(
text:
item
.
type
==
"Credit"
provider
.
ledgerList
[
index
]
.
type
==
"Credit"
?
"-"
:
"+"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
13
,
color:
provider
.
ledgerList
[
index
]
.
type
==
"Credit"
?
Color
(
0xFFEF3739
)
:
Color
(
0xFF0D9C00
),
fontSize:
14
,
fontFamily:
"JakartaRegular"
,
),
),
TextSpan
(
text:
"₹
${
item.type == "Credit" ? "${item.creditAmount}
"
:
"
${item
.debitAmount}
"
}
",
"₹
${
provider.ledgerList[index].type == "Credit" ? "${provider.ledgerList[index].creditAmount}
"
:
"
${provider.ledgerList[index]
.debitAmount}
"
}
",
style: TextStyle(
color: Color(0xFF2D2D2D),
fontSize: 13,
color: provider
.ledgerList[index]
.type ==
"
Credit
"
? Color(0xFFEF3739)
: Color(0xFF0D9C00),
fontSize: 14,
fontFamily:
"
Jakarta
Medium
",
"
Jakarta
Regular
",
),
),
],
...
...
@@ -433,68 +730,64 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
),
],
),
Divider(
thickness: 0.5,
color: Color(0xFFd7d7d7),
),
SizedBox(height: 7,),
Row(
children: [
Expanded(
flex: 5,
child: SizedBox(
child: Text(
"
Balance
",
provider
.ledgerList[index]
.date ??
"
-
",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 13,
color: Color(0xFF2d2d2d),
fontFamily: "
JakartaRegular
",
color: AppColors.grey_semi,
fontSize: 12,
),
),
),
),
Spacer(),
Expanded(
child: Text(
flex: 3,
child: SizedBox(
child: RichText(
maxLines: 1,
textAlign: TextAlign.right,
"
$
{
running_balance
.
toString
()}
" ??
"
-
",
overflow: TextOverflow.ellipsis,
text: TextSpan(
children: [
TextSpan(
text: "
Bal:
",
style: TextStyle(
color: Color(0xFF818181),
fontSize: 13,
),
color:
AppColors
.semi_black,
fontSize: 12,
fontFamily:
"
JakartaRegular
",
),
),
],
TextSpan(
text: "
₹
$running_balance
",
style: TextStyle(
color:
AppColors.grey_semi,
fontSize: 12,
fontFamily:
"
JakartaMedium
",
),
InkResponse(
onTap: () async {
Navigator.push(
context,
MaterialPageRoute(
builder:
(context) => Transactiondetails(
paymentID: item.refId,
type: item.type,
),
],
),
);
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5,
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
mainAxisAlignment:
MainAxisAlignment.start,
children: [
Text(
"
View
Details
",
style: TextStyle(
fontFamily: "
JakartaMedium
",
fontSize: 14,
color: AppColors.app_blue,
),
),
SizedBox(width: 5),
SvgPicture.asset(
"
assets
/
svg
/
next_button
.
svg
",
],
),
],
),
...
...
@@ -502,9 +795,6 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
),
],
),
);
}).toList(),
],
),
);
},
...
...
@@ -568,3 +858,590 @@ class _AccountslistdetailsState extends State<Accountslistdetails> {
return true;
}
}
///import 'dart:io';
//
// import 'package:connectivity_plus/connectivity_plus.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_svg/svg.dart';
// import 'package:generp/Notifiers/commonProvider/accountDetailsProvider.dart';
// import 'package:generp/Utils/app_colors.dart';
// import 'package:generp/Utils/commonServices.dart';
// import 'package:generp/Utils/commonWidgets.dart';
// import 'package:generp/screens/commom/transactionDetails.dart';
// import 'package:generp/screens/finance/submitPaymentRequestionListsByMode.dart';
// import 'package:provider/provider.dart';
//
// import '../../Models/commonModels/commonAccountdetailsResponse.dart';
//
// class Accountslistdetails extends StatefulWidget {
// final accountID;
//
// const Accountslistdetails({super.key, required this.accountID});
//
// @override
// State<Accountslistdetails> createState() => _AccountslistdetailsState();
// }
//
// class _AccountslistdetailsState extends State<Accountslistdetails> {
// Map _source = {ConnectivityResult.mobile: true};
// final MyConnectivity _connectivity = MyConnectivity.instance;
//
// @override
// void initState() {
// // TODO: implement initState
// super.initState();
// _connectivity.initialise();
// _connectivity.myStream.listen((source) {
// setState(() => _source = source);
// });
// WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
// var prov = Provider.of<Accountdetailsprovider>(context, listen: false);
// prov.accountdetailsAPIFunction(context, widget.accountID);
// });
// }
//
// @override
// void dispose() {
// // TODO: implement dispose
// super.dispose();
// _connectivity.disposeStream();
// }
//
// @override
// Widget build(BuildContext context) {
// switch (_source.keys.toList()[0]) {
// case ConnectivityResult.mobile:
// connection = 'Online';
// break;
// case ConnectivityResult.wifi:
// connection = 'Online';
// break;
// case ConnectivityResult.none:
// default:
// connection = 'Offline';
// }
// return (connection == "
Online
")
// ? Platform.isAndroid
// ? WillPopScope(
// onWillPop: () => onBackPressed(context),
// child: SafeArea(
// top: false,
// bottom: true,
// child: _scaffold(context),
// ),
// )
// : _scaffold(context)
// : NoNetwork(context);
// }
//
// Widget _scaffold(BuildContext context) {
// return Consumer<Accountdetailsprovider>(
// builder: (context, provider, child) {
// final groupedData = provider.groupByDate(provider.ledgerList);
// // Calculate total credit, debit, and balance
// double totalCredit = 0;
// double totalDebit = 0;
// double overallBalance = 0;
//
// for (var item in provider.ledgerList) {
// double credit = double.tryParse(item.creditAmount.toString()) ?? 0;
// double debit = double.tryParse(item.debitAmount.toString()) ?? 0;
// totalCredit += credit;
// totalDebit += debit;
// }
// overallBalance = totalDebit - totalCredit;
//
// return Scaffold(
// appBar: appbar2New(
// context,
// "
Account
Details
",
// provider.resetValues,
// SizedBox.shrink(),
// 0xFFFFFFFF
// ),
// resizeToAvoidBottomInset: true,
// backgroundColor: AppColors.scaffold_bg_color,
// body: SizedBox(
// child: SingleChildScrollView(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
//
// Container(
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(16),
// ),
// child: Column(
// children: [
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// margin: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// decoration: BoxDecoration(
// color: Color(0xFFEDF7FF),
// borderRadius: BorderRadius.circular(16),
// ),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.center,
// children: [
// Text(
// overallBalance.toString() ?? "
-
",
// style: TextStyle(fontSize: 20,
// fontFamily: "
JakartaMedium
",
// color: AppColors.app_blue
// ),
// ),
// ],
// ),
// ),
// Row(
// children: [
// Expanded(
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// margin: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// decoration: BoxDecoration(
// color: Color(0xFFFFEFEF),
// borderRadius: BorderRadius.circular(16),
// ),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// RichText(
// text: TextSpan(
// children: [
// TextSpan(
// text: "
$
{
totalCredit
}
",
// style: TextStyle(
// color: Color(0xFFED3424),
// fontFamily: "
JakartaRegular
",
// fontSize: 25,
// ),
// ),
// ],
// ),
// ),
// Text(
// "
credit
",
// style: TextStyle(color: Color(0xFF818181)),
// ),
// ],
// ),
// ),
// ),
// Expanded(
// child: Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// margin: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 15,
// ),
// decoration: BoxDecoration(
// color: Color(0xFFFFEFEF),
// borderRadius: BorderRadius.circular(16),
// ),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// RichText(
// text: TextSpan(
// children: [
// TextSpan(
// text: "
$
{
totalDebit
}
",
// style: TextStyle(
// color: Color(0xFFED3424),
// fontFamily: "
JakartaRegular
",
// fontSize: 25,
// ),
// ),
// ],
// ),
// ),
// Text(
// "
debit
",
// style: TextStyle(color: Color(0xFF818181)),
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// ],
// ),
// ),
// // Text(
// // "
Account
Details
",
// // style: TextStyle(
// // fontSize: 16,
// // color: AppColors.grey_thick,
// // fontFamily: "
JakartaMedium
",
// // ),
// // ),
// Container(
// padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
// margin: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(16),
// ),
// child: Column(
// children: [
// ...List.generate(12, (j) {
// final headings = [
// "
Name
",
// "
Address
",
// "
Date
",
// "
Bank
Name
",
// "
Bank
Branch
",
// "
Bank
IFSC
Code
",
// "
Account
Holder
",
// "
Account
Number
",
// "
Bank
UPI
ID
",
// "
State
",
// "
District
",
// "
Sub
Locality
",
// ];
//
// final subHeadings = [
// provider.accountDetails.name ?? "
-
",
// provider.accountDetails.address ?? "
-
",
// provider.accountDetails.createdDatetime ?? "
-
",
// provider.accountDetails.bankName ?? "
-
",
// provider.accountDetails.bankBranchName ?? "
-
",
// provider.accountDetails.bankIfscCode ?? "
-
",
// provider.accountDetails.bankAccountHolderName ??
// "
-
",
// provider.accountDetails.bankAccountNumber ?? "
-
",
// provider.accountDetails.bankUpiId ?? "
-
",
// provider.accountDetails.state ?? "
-
",
// provider.accountDetails.district ?? "
-
",
// provider.accountDetails.subLocality ?? "
-
",
// ];
// return Container(
// padding: EdgeInsets.symmetric(vertical: 5),
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Expanded(
// child: Text(
// headings[j],
// style: TextStyle(
// fontFamily: "
JakartaMedium
",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
// ),
// SizedBox(width: 15),
// Expanded(
// child: Text(
// subHeadings[j] == ""
// ? "
-
"
// : subHeadings[j] ?? "
-
",
// style: TextStyle(
// fontFamily: "
JakartaMedium
",
// fontSize: 14,
// color: AppColors.grey_thick,
// ),
// ),
// ),
// ],
// ),
// );
// }),
// ],
// ),
// ),
// ListView.builder(
// physics: NeverScrollableScrollPhysics(),
// shrinkWrap: true,
// itemCount: groupedData.keys.length,
// itemBuilder: (context, index) {
// String date = groupedData.keys.elementAt(index);
// List<LedgerList> items = groupedData[date]!;
//
// return Container(
// padding: EdgeInsets.symmetric(vertical: 5),
// margin: EdgeInsets.symmetric(horizontal: 10),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// padding: EdgeInsets.only(bottom: 5),
// child: Text(
// date,
// style: TextStyle(
// fontSize: 14,
// fontFamily: "
JakartaMedium
",
// color: Color(0xFF818181),
// ),
// ),
// ),
// ...items.map((item) {
// double running_balance = 0;
// int currentIndex = provider.ledgerList.indexOf(
// item,
// );
// for (var i = 0; i <= currentIndex; i++) {
// var ledgerItem = provider.ledgerList[i];
// double credit =
// double.tryParse(
// ledgerItem.creditAmount.toString(),
// ) ??
// 0;
// double debit =
// double.tryParse(
// ledgerItem.debitAmount.toString(),
// ) ??
// 0;
// running_balance += (debit - credit);
// }
//
// return Container(
// padding: EdgeInsets.symmetric(
// horizontal: 10,
// vertical: 10,
// ),
// margin: EdgeInsets.symmetric(vertical: 5),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(16),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Expanded(
// flex: 1,
// child: SizedBox(
// child:
// item.type == "
Credit
"
// ? Image.asset(
// "
assets
/
images
/
trans_debit
.
png
",
// height: 45,
// width: 45,
// fit: BoxFit.contain,
// )
// : Image.asset(
// "
assets
/
images
/
trans_credit
.
png
",
// height: 45,
// width: 45,
// fit: BoxFit.contain,
// ),
// ),
// ),
// SizedBox(width: 10),
// Expanded(
// flex: 5,
// child: SizedBox(
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Text(
// item.description ?? "
-
",
// maxLines: 2,
// overflow:
// TextOverflow.ellipsis,
// style: TextStyle(
// fontFamily: "
JakartaMedium
",
// fontSize: 12,
// ),
// ),
// ],
// ),
// ),
// ),
// Spacer(),
// Expanded(
// flex: 3,
// child: SizedBox(
// child: RichText(
// maxLines: 1,
// textAlign: TextAlign.right,
// overflow: TextOverflow.ellipsis,
// text: TextSpan(
// children: [
// TextSpan(
// text:
// item.type == "
Credit
"
// ? "
-
"
// : "
+
",
// style: TextStyle(
// color: Color(0xFF2D2D2D),
// fontSize: 13,
// fontFamily:
// "
JakartaRegular
",
// ),
// ),
// TextSpan(
// text:
// "
₹$
{
item
.
type
==
"Credit"
?
"
${item.creditAmount}
"
:
"
${item.debitAmount}
"
}
",
// style: TextStyle(
// color: Color(0xFF2D2D2D),
// fontSize: 13,
// fontFamily:
// "
JakartaMedium
",
// ),
// ),
// ],
// ),
// ),
// ),
// ),
// ],
// ),
// Divider(
// thickness: 0.5,
// color: Color(0xFFd7d7d7),
// ),
// Row(
// children: [
// Expanded(
// child: Text(
// "
Balance
",
// style: TextStyle(
// fontSize: 13,
// color: Color(0xFF2d2d2d),
// ),
// ),
// ),
// Expanded(
// child: Text(
// textAlign: TextAlign.right,
// "
$
{
running_balance
.
toString
()}
" ??
// "
-
",
// style: TextStyle(
// color: Color(0xFF818181),
// fontSize: 13,
// ),
// ),
// ),
// ],
// ),
// InkResponse(
// onTap: () async {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) => Transactiondetails(
// paymentID: item.refId,
// type: item.type,
// ),
// ),
// );
// },
// child: Container(
// padding: EdgeInsets.symmetric(
// vertical: 5,
// ),
// child: Row(
// crossAxisAlignment:
// CrossAxisAlignment.center,
// mainAxisAlignment:
// MainAxisAlignment.start,
// children: [
// Text(
// "
View
Details
",
// style: TextStyle(
// fontFamily: "
JakartaMedium
",
// fontSize: 14,
// color: AppColors.app_blue,
// ),
// ),
// SizedBox(width: 5),
// SvgPicture.asset(
// "
assets
/
svg
/
next_button
.
svg
",
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// );
// }).toList(),
// ],
// ),
// );
// },
// ),
// if ([
// "
Vendor
",
// "
Customer
",
// ].contains(provider.accountDetails.type)) ...[
// InkWell(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) => Submitpaymentrequestionlistsbymode(
// mode: "
other
",
// pageTitleName: "
Add
Payment
Request
(
Other
)
",
// accountId: provider.accountDetails.id!,
// ),
// ),
// );
// },
// child: Container(
// alignment: Alignment.center,
// height: 45,
// margin: EdgeInsets.only(
// left: 5.0,
// right: 5.0,
// top: 5.0,
// bottom: 5.0,
// ),
// decoration: BoxDecoration(
// color: AppColors.app_blue, //1487C9
// borderRadius: BorderRadius.circular(15.0),
// ),
// child: Center(
// child: Text(
// "
Add
Payment
Request
(
Other
)
",
// textAlign: TextAlign.center,
// style: TextStyle(
// color: Colors.white,
// fontFamily: "
JakartaMedium
",
// fontSize: 15,
// ),
// ),
// ),
// ),
// ),
// ],
// ],
// ),
// ),
// ),
// );
// },
// );
// }
//
// Future<bool> _onBackPressed(BuildContext context) async {
// Navigator.pop(context, true);
// return true;
// }
// }
lib/screens/commom/transactionDetails.dart
View file @
14d01f4d
import
'dart:io'
;
import
'package:dotted_line/dotted_line.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_svg/svg.dart'
;
import
'package:generp/Utils/app_colors.dart'
;
import
'package:generp/Utils/commonWidgets.dart'
;
import
'package:generp/screens/finance/FileViewer.dart'
;
...
...
@@ -11,8 +13,14 @@ import '../../Notifiers/financeProvider/paymentRequisitionPaymentsListProvider.d
class
Transactiondetails
extends
StatefulWidget
{
final
paymentID
;
final
type
;
final
description
;
const
Transactiondetails
({
super
.
key
,
this
.
paymentID
,
this
.
type
});
const
Transactiondetails
({
super
.
key
,
this
.
paymentID
,
this
.
type
,
this
.
description
,
});
@override
State
<
Transactiondetails
>
createState
()
=>
_TransactiondetailsState
();
...
...
@@ -39,10 +47,10 @@ class _TransactiondetailsState extends State<Transactiondetails> {
var
details
=
provider
.
paymentDetails
;
return
SafeArea
(
top:
false
,
bottom:
Platform
.
isIOS
?
false
:
true
,
bottom:
Platform
.
isIOS
?
false
:
true
,
child:
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar
(
context
,
"Details"
),
appBar:
appbar
New
(
context
,
"Details"
,
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
Container
(
margin:
EdgeInsets
.
symmetric
(
vertical:
10
,
horizontal:
10
),
...
...
@@ -64,14 +72,14 @@ class _TransactiondetailsState extends State<Transactiondetails> {
child:
SizedBox
(
child:
widget
.
type
==
"Credit"
?
Imag
e
.
asset
(
"assets/images/trans_debit.pn
g"
,
?
SvgPictur
e
.
asset
(
"assets/svg/finance/debited_filled_ic.sv
g"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
)
:
Imag
e
.
asset
(
"assets/images/trans_credit.pn
g"
,
:
SvgPictur
e
.
asset
(
"assets/svg/finance/credited_filled_ic.sv
g"
,
height:
45
,
width:
45
,
fit:
BoxFit
.
contain
,
...
...
@@ -82,129 +90,300 @@ class _TransactiondetailsState extends State<Transactiondetails> {
Expanded
(
flex:
5
,
child:
SizedBox
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Text
(
widget
.
type
==
"Credit"
?
"Debited Amount"
:
"Credited Amount"
,
child:
Text
(
details
.
description
==
""
?
widget
.
description
:
details
.
description
??
"-"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"Jakarta
Medium
"
,
fontSize:
1
2
,
fontFamily:
"Jakarta
Regular
"
,
fontSize:
1
4
,
),
),
RichText
(
textAlign:
TextAlign
.
right
,
maxLines:
1
,
),
),
SizedBox
(
width:
10
),
Expanded
(
flex:
3
,
child:
Container
(
height:
45
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
10
),
color:
widget
.
type
==
"Credit"
?
Color
(
0xFFFFEFEF
)
:
Color
(
0xFFE7FFE5
),
),
child:
Center
(
child:
Text
(
"₹
${details.amount ?? "-"}
"
,
maxLines:
2
,
overflow:
TextOverflow
.
ellipsis
,
text:
TextSpan
(
children:
[
TextSpan
(
text:
widget
.
type
==
"Credit"
?
"-"
:
"+"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
13
,
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
widget
.
type
==
"Credited"
?
Color
(
0xFFEF3739
)
:
Color
(
0xFF0D9C00
),
),
),
),
TextSpan
(
text:
"₹
${details.amount}
"
,
style:
TextStyle
(
color:
Color
(
0xFF2D2D2D
),
fontSize:
13
,
fontFamily:
"JakartaMedium"
,
),
),
],
),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Payment Summary"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
],
),
Expanded
(
flex:
5
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFd7d7d7
)
),
),
...
List
.
generate
(
6
,
(
j
)
{
final
head
ing
s
=
[
"
ID
"
,
"
Dat
e"
,
"
Account
"
,
"
Ref Typ
e"
,
"Payment
Remarks
"
,
"
Attachment"
final
heads
=
[
"
Payment Account
"
,
"
Payment Employe
e"
,
"
Payment ID
"
,
"
Payment Referenc
e"
,
"Payment
Mode
"
,
"
Payment Date"
,
];
final
subHeadings
=
[
final
subHeads
=
[
details
.
paymentAccountName
??
"-"
,
details
.
paymentEmployeeName
??
"-"
,
details
.
id
??
"-"
,
details
.
createdDatetime
??
"-"
,
details
.
paymentReferenceNumber
??
"-"
,
details
.
mode
??
"-"
,
details
.
paymentDate
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
"
${heads[j]=="Payment ID"?"#":""}${subHeads[j]}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF818181
),
),
),
),
],
),
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"Receivers Details"
,
style:
TextStyle
(
fontSize:
14
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
5
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
7
,
(
j
)
{
final
heads
=
[
"Account Name"
,
"Account Holder"
,
"Account Number"
,
"Bank Name"
,
"Bank Branch Name"
,
"Bank IFSC"
,
"UPI ID"
,
];
final
subHeads
=
[
details
.
accountName
??
"-"
,
details
.
refType
??
"-"
,
details
.
paymentRemarks
??
"-"
,
"View"
,
details
.
bankAccountHolderName
??
"-"
,
details
.
bankAccountNumber
??
"-"
,
details
.
bankName
??
"-"
,
details
.
bankBranchName
??
"-"
,
details
.
bankIfscCode
??
"-"
,
details
.
bankUpiId
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"Jakarta
Medium
"
,
fontFamily:
"Jakarta
Regular
"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
SizedBox
(
width:
15
),
if
(
subHeadings
[
j
]
==
"View"
)...[
Expanded
(
child:
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
details
.
attachmentViewFileName
??
""
,
fileUrl:
details
.
attachmentDirFilePath
??
""
)
,));
},
child:
Text
(
"
${subHeadings[j]}
"
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
decorationColor:
AppColors
.
app_blue
,
decoration:
TextDecoration
.
underline
color:
Color
(
0xFF818181
),
),
),
),
],
),
]
else
...[
);
}),
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
7.5
),
child:
Row
(
children:
[
Expanded
(
flex:
3
,
child:
Text
(
"
${subHeadings[j]}
"
==
""
?
"-"
:
subHeadings
[
j
]
??
"-"
,
"Other Details"
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
grey_thick
,
fontFamily:
"JakartaSemiBold"
,
),
),
),
Expanded
(
flex:
5
,
child:
DottedLine
(
dashGapLength:
4
,
dashGapColor:
Colors
.
white
,
dashColor:
AppColors
.
grey_semi
,
dashLength:
2
,
lineThickness:
0.5
,
),
),
],
),
),
...
List
.
generate
(
3
,
(
j
)
{
final
heads
=
[
"Payment Attachment"
,
"Description"
,
"Remarks"
,
];
final
subHeads
=
[
"View"
,
details
.
description
??
"-"
,
details
.
paymentRemarks
??
"-"
,
];
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
3
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
textAlign:
TextAlign
.
left
,
heads
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaRegular"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
]
Expanded
(
child:
InkResponse
(
onTap:
()
async
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Fileviewer
(
fileName:
details
.
attachmentViewFileName
??
""
,
fileUrl:
details
.
attachmentDirFilePath
??
""
,
),
),
);
},
child:
Padding
(
padding:
const
EdgeInsets
.
all
(
3.0
),
child:
Text
(
textAlign:
TextAlign
.
right
,
subHeads
[
j
]
==
""
?
"-"
:
subHeads
[
j
],
style:
TextStyle
(
fontSize:
14
,
color:
subHeads
[
j
]
==
"View"
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
subHeads
[
j
]
==
"View"
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
AppColors
.
app_blue
,
),
),
),
),
),
],
),
);
...
...
@@ -220,3 +399,183 @@ class _TransactiondetailsState extends State<Transactiondetails> {
);
}
}
///Container(
// margin: EdgeInsets.symmetric(vertical: 10, horizontal: 10),
// child: SingleChildScrollView(
// child: Container(
// padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
// margin: EdgeInsets.symmetric(vertical: 5),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(16),
// ),
// child: Column(
// children: [
// Row(
// mainAxisAlignment: MainAxisAlignment.start,
// children: [
// Expanded(
// flex: 1,
// child: SizedBox(
// child:
// widget.type == "Credit"
// ? SvgPicture.asset(
// "assets/svg/finance/debited_filled_ic.svg",
// height: 45,
// width: 45,
// fit: BoxFit.contain,
// )
// : SvgPicture.asset(
// "assets/svg/finance/credited_filled_ic.svg",
// height: 45,
// width: 45,
// fit: BoxFit.contain,
// ),
// ),
// ),
// SizedBox(width: 10),
// Expanded(
// flex: 5,
// child: SizedBox(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Text(
// widget.type == "Credit"
// ? "Debited Amount"
// : "Credited Amount",
// maxLines: 2,
// overflow: TextOverflow.ellipsis,
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 12,
// ),
// ),
// RichText(
// textAlign: TextAlign.right,
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// text: TextSpan(
// children: [
// TextSpan(
// text:
// widget.type == "Credit"
// ? "-"
// : "+",
// style: TextStyle(
// color: Color(0xFF2D2D2D),
// fontSize: 13,
// fontFamily: "JakartaRegular",
// ),
// ),
// TextSpan(
// text: "₹${details.description}",
// style: TextStyle(
// color: Color(0xFF2D2D2D),
// fontSize: 13,
// fontFamily: "JakartaMedium",
// ),
// ),
// ],
// ),
// ),
// ],
// ),
// ),
// ),
// ],
// ),
// Divider(thickness: 0.5, color: Color(0xFFd7d7d7)),
// ...List.generate(6, (j) {
// final headings = [
// "ID",
// "Date",
// "Account",
// "Ref Type",
// "Payment Remarks",
// "Attachment",
// ];
//
// final subHeadings = [
// details.id ?? "-",
// details.createdDatetime ?? "-",
// details.accountName ?? "-",
// details.refType ?? "-",
// details.paymentRemarks ?? "-",
// "View",
// ];
// return Container(
// padding: EdgeInsets.symmetric(vertical: 5),
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Expanded(
// child: Text(
// headings[j],
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.semi_black,
// ),
// ),
// ),
// SizedBox(width: 15),
// if (subHeadings[j] == "View") ...[
// Expanded(
// child: InkResponse(
// onTap: () async {
// Navigator.push(
// context,
// MaterialPageRoute(
// builder:
// (context) => Fileviewer(
// fileName:
// details
// .attachmentViewFileName ??
// "",
// fileUrl:
// details
// .attachmentDirFilePath ??
// "",
// ),
// ),
// );
// },
// child: Text(
// "${subHeadings[j]}" == ""
// ? "-"
// : subHeadings[j] ?? "-",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.app_blue,
// decorationColor: AppColors.app_blue,
// decoration: TextDecoration.underline,
// ),
// ),
// ),
// ),
// ] else ...[
// Expanded(
// child: Text(
// "${subHeadings[j]}" == ""
// ? "-"
// : subHeadings[j] ?? "-",
// style: TextStyle(
// fontFamily: "JakartaMedium",
// fontSize: 14,
// color: AppColors.grey_thick,
// ),
// ),
// ),
// ],
// ],
// ),
// );
// }),
// ],
// ),
// ),
// ),
// ),
lib/screens/crm/crmDashboard.dart
View file @
14d01f4d
...
...
@@ -157,7 +157,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
alignment:
Alignment
.
centerLeft
,
child:
Text
(
"Search"
,
"Search
By Name/Mobile
"
,
style:
TextStyle
(
height:
1
,
color:
AppColors
.
grey_thick
,
...
...
@@ -1108,7 +1108,10 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
floatingActionButtonLocation:
FloatingActionButtonLocation
.
centerFloat
,
floatingActionButton:
InkResponse
(
floatingActionButton:
(
provider
.
accessPages
.
where
((
page
)
=>
[
8
,
9
].
contains
(
page
.
id
))
.
toList
()
.
contains
([
8
,
9
]))?
InkResponse
(
onTap:
()
async
{
// if (provider.accessPages
// .where((page) => [8, 9].contains(page.id))
...
...
@@ -1141,7 +1144,7 @@ class _CrmdashboardScreenState extends State<CrmdashboardScreen> {
),
),
),
),
):
SizedBox
.
shrink
(
),
);
},
);
...
...
lib/screens/crm/universalSearchScreen.dart
View file @
14d01f4d
...
...
@@ -141,7 +141,7 @@ class _UniversalsearchscreenState extends State<Universalsearchscreen> {
),
),
counterText:
""
,
hintText:
"Search"
,
hintText:
"Search
By Name/Mobile
"
,
hintStyle:
TextStyle
(
fontWeight:
FontWeight
.
w400
,
color:
Color
(
0xFFB4BEC0
),
...
...
lib/screens/finance/AllPaymentRequesitionListsByModes.dart
View file @
14d01f4d
...
...
@@ -37,6 +37,7 @@ class _AllpaymentrequesitionlistsbymodesState
final
MyConnectivity
_connectivity
=
MyConnectivity
.
instance
;
late
Commondaterangefilter
cf
;
@override
void
initState
()
{
// TODO: implement initState
...
...
@@ -62,6 +63,80 @@ class _AllpaymentrequesitionlistsbymodesState
});
}
//'Requested',
// 'Level 1 Approved',
// 'Level 2 Approved',
// 'Level 1 Rejected',
// 'Level 2 Rejected',
// 'Processed',
// 'Payment Rejected'
Color
getDecorationColor
(
value
)
{
var
color
=
AppColors
.
approved_bg_color
;
switch
(
value
){
case
'Requested'
:
return
AppColors
.
requested_bg_color
;
case
'Level 1 Approved'
:
return
AppColors
.
approved_bg_color
;
case
'Level 1 Rejected'
:
return
AppColors
.
rejected_bg_color
;
case
'Level 2 Approved'
:
return
AppColors
.
approved_bg_color
;
case
'Level 2 Rejected'
:
return
AppColors
.
rejected_bg_color
;
case
'Processed'
:
return
AppColors
.
processed_bg_color
;
case
'Payment Rejected'
:
return
AppColors
.
rejected_bg_color
;
}
return
color
;
}
Color
getTextColor
(
value
)
{
var
color
=
AppColors
.
approved_text_color
;
switch
(
value
){
case
'Requested'
:
return
AppColors
.
requested_text_color
;
case
'Level 1 Approved'
:
return
AppColors
.
approved_text_color
;
case
'Level 1 Rejected'
:
return
AppColors
.
rejected_text_color
;
case
'Level 2 Approved'
:
return
AppColors
.
approved_text_color
;
case
'Level 2 Rejected'
:
return
AppColors
.
rejected_text_color
;
case
'Processed'
:
return
AppColors
.
processed_text_color
;
case
'Payment Rejected'
:
return
AppColors
.
rejected_text_color
;
}
return
color
;
}
getText
(
value
){
var
text
=
"A"
;
switch
(
value
){
case
'Requested'
:
return
"R"
;
case
'Level 1 Approved'
:
return
"A"
;
case
'Level 1 Rejected'
:
return
"R"
;
case
'Level 2 Approved'
:
return
"A"
;
case
'Level 2 Rejected'
:
return
"R"
;
case
'Processed'
:
return
"P"
;
case
'Payment Rejected'
:
return
"R"
;
}
return
text
;
}
@override
void
dispose
()
{
// TODO: implement dispose
...
...
@@ -104,7 +179,7 @@ class _AllpaymentrequesitionlistsbymodesState
final
requestLists
=
provider
.
requisitionList
;
return
Scaffold
(
resizeToAvoidBottomInset:
true
,
appBar:
appbar2
(
appBar:
appbar2
New
(
context
,
widget
.
pageTitleName
,
provider
.
resetForm
,
...
...
@@ -154,6 +229,7 @@ class _AllpaymentrequesitionlistsbymodesState
),
],
),
0xFFFFFFFF
),
backgroundColor:
AppColors
.
scaffold_bg_color
,
body:
...
...
@@ -179,14 +255,42 @@ class _AllpaymentrequesitionlistsbymodesState
child:
Center
(
child:
Text
(
"No Data Available"
)),
);
}
return
Container
(
return
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentrequestionlistdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentrequestionlistdetails"
)
{
print
(
"croos refresh"
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
),
margin:
EdgeInsets
.
symmetric
(
horizontal:
10
,
vertical:
10
,
vertical:
5
,
),
decoration:
BoxDecoration
(
color:
Colors
.
white
,
...
...
@@ -200,16 +304,21 @@ class _AllpaymentrequesitionlistsbymodesState
flex:
1
,
child:
Container
(
height:
50
,
width:
3
5
,
width:
5
0
,
padding:
EdgeInsets
.
all
(
8.0
),
decoration:
BoxDecoration
(
color:
Color
(
0xFFFFF3CE
),
borderRadius:
BorderRadius
.
circular
(
8
,
color:
getDecorationColor
(
requestLists
[
index
].
status
),
shape:
BoxShape
.
circle
),
child:
Center
(
child:
Text
(
getText
(
requestLists
[
index
].
status
),
style:
TextStyle
(
color:
getTextColor
(
requestLists
[
index
].
status
),
fontSize:
18
,
fontFamily:
"JakartaBold"
),
),
child:
SvgPicture
.
asset
(
"assets/svg/fin_ic.svg"
,
),
),
),
...
...
@@ -222,18 +331,20 @@ class _AllpaymentrequesitionlistsbymodesState
CrossAxisAlignment
.
start
,
children:
[
Text
(
requestLists
[
index
].
accountName
!,
requestLists
[
index
]
.
accountName
!,
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,
style:
TextStyle
(
fontFamily:
"Jakarta
Medium
"
,
fontFamily:
"Jakarta
Regular
"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
Text
(
"₹"
"
${requestLists[index].amount}
"
,
"
${requestLists[index].date}
"
,
style:
TextStyle
(
fontFamily:
"Jakarta
Medium
"
,
fontFamily:
"Jakarta
Regular
"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
...
...
@@ -243,202 +354,23 @@ class _AllpaymentrequesitionlistsbymodesState
),
),
Expanded
(
flex:
2
,
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
5
,
vertical:
10
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
,
),
color:
Color
(
0xFFE3FFE0
),
),
child:
Center
(
child:
Text
(
requestLists
[
index
].
status
!,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
Color
(
0xFF0D9C00
),
),
),
),
),
),
],
),
Divider
(
thickness:
0.5
,
color:
Color
(
0xFFD7D7D7
),
),
...
List
.
generate
(
4
,
(
j
)
{
final
headings
=
[
"Requesting Propose"
,
"Attachment"
,
"Requested Date"
,
"Note"
,
];
final
subHeadings
=
[
requestLists
[
index
].
requestingPurpose
,
"View"
,
// requestLists[index].attachmentDirFilePath
requestLists
[
index
].
date
,
requestLists
[
index
].
description
,
];
if
(
j
==
1
&&
requestLists
[
index
]
.
attachmentViewFileName
==
""
)
{
return
SizedBox
.
shrink
();
}
return
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Expanded
(
child:
Text
(
headings
[
j
],
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
semi_black
,
),
),
),
Expanded
(
child:
InkResponse
(
onTap:
j
!=
1
?
null
:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
,
)
=>
Fileviewer
(
fileName:
requestLists
[
index
]
.
attachmentViewFileName
!,
fileUrl:
requestLists
[
index
]
.
attachmentDirFilePath
!,
),
),
);
},
flex:
3
,
child:
Text
(
subHeadings
[
j
]!,
style:
TextStyle
(
fontSize:
14
,
color:
j
==
1
?
AppColors
.
app_blue
:
Color
(
0xFF818181
),
decoration:
j
==
1
?
TextDecoration
.
underline
:
TextDecoration
.
none
,
decorationColor:
j
==
1
?
AppColors
.
app_blue
:
AppColors
.
white
,
),
),
),
),
],
),
);
}),
InkResponse
(
onTap:
()
async
{
var
res
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentrequestionlistdetails
(
pageName:
widget
.
pageTitleName
,
mode:
widget
.
mode
,
paymentRequestId:
requestLists
[
index
].
id
,
),
settings:
RouteSettings
(
name:
"Paymentrequestionlistdetails"
,
),
),
);
if
(
routeSettingName
==
"Paymentrequestionlistdetails"
)
{
print
(
"croos refresh"
);
provider
.
paymentRequestionListsAPIFunction
(
context
,
widget
.
mode
,
""
,
""
,
);
}
// if (res == true) {
// print("android refresh");
// provider
// .paymentRequestionListsAPIFunction(
// context,
// widget.mode,
// "",
// "",
// );
// }
// if (Platform.isIOS) {
// print("IOS Refresh");
// if (didPushed == "true" ||
// didPopped == "true") {
// provider
// .paymentRequestionListsAPIFunction(
// context,
// widget.mode,
// "",
// "",
// );
// }
// }
},
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
vertical:
5
),
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Text
(
"View Details"
,
maxLines:
1
,
"₹
${requestLists[index].amount!}
"
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
fontFamily:
"JakartaMedium"
,
fontSize:
14
,
color:
AppColors
.
app_blue
,
),
),
SizedBox
(
width:
5
),
SvgPicture
.
asset
(
"assets/svg/next_button.svg"
,
),
],
),
),
),
],
),
),
);
},
),
...
...
lib/screens/finance/financeDashboard.dart
View file @
14d01f4d
...
...
@@ -94,31 +94,33 @@ class _FinancedashboardState extends State<Financedashboard> {
"assets/svg/finance/fin_accounts_ic.svg"
,
//"
];
final
paymentInitiationNames
=
[
"Self"
,
"Account List"
];
final
paymentInitiationSubtitles
=
[
"Payment Requ
isition"
,
"
"
];
final
paymentInitiationSubtitles
=
[
"Payment Requ
ests"
,
"Transactions Details
"
];
final
paymentInitiationRoles
=
[
668
,
293
];
final
paymentAdministrationIcons
=
[
"assets/svg/finance/fin_process_ic.svg"
,
"assets/svg/finance/fin_admin_ic.svg"
,
"assets/svg/finance/fin_receipts_ic.svg"
,
"assets/svg/finance/fin_ac_ledger_ic.svg"
,
//
"assets/svg/finance/fin_ac_ledger_ic.svg",
"assets/svg/finance/fin_payments_ic.svg"
,
];
final
paymentAdministrationNames
=
[
"Process"
,
//process
"Admin"
,
//admin
"Receipts List"
,
"Account Ledger"
,
//
"Account Ledger",
"Payment List"
,
];
final
paymentAdministrationSubtitles
=
[
"Payment Requ
isition
"
,
"Payment Requ
isition
"
,
"Payment Requ
isition
"
,
"Ledgers, transactions, finance"
,
"Payment Requ
isition
"
,
"Payment Requ
ests
"
,
"Payment Requ
ests
"
,
"Payment Requ
ests
"
,
//
"Ledgers, transactions, finance",
"Payment Requ
ests
"
,
];
final
paymentAdministrationRoles
=
[
666
,
678
,
673
,
675
,
667
];
final
paymentAdministrationRoles
=
[
666
,
678
,
673
,
// 675,
667
];
// Extract role IDs from accessible pages
final
roles
=
provider
.
accessiblePagesList
.
map
((
e
)
=>
e
.
id
).
toList
();
...
...
@@ -444,14 +446,16 @@ class _FinancedashboardState extends State<Financedashboard> {
),
),
);
}
else
if
(
ad
==
3
)
{
navigate
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Accountledger
(),
),
);
}
else
{
}
// else if (ad == 3) {
// navigate = await Navigator.push(
// context,
// MaterialPageRoute(
// builder: (context) => Accountledger(),
// ),
// );
// }
else
{
navigate
=
await
Navigator
.
push
(
context
,
MaterialPageRoute
(
...
...
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