|
|
|
@ -43,6 +43,7 @@ class ShowSickLeaveScreen extends StatelessWidget {
|
|
|
|
children: model.getAllSIckLeave
|
|
|
|
children: model.getAllSIckLeave
|
|
|
|
.map<Widget>((GetAllSickLeaveResponse item) {
|
|
|
|
.map<Widget>((GetAllSickLeaveResponse item) {
|
|
|
|
return RoundedContainer(
|
|
|
|
return RoundedContainer(
|
|
|
|
|
|
|
|
margin: EdgeInsets.all(10),
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
@ -58,7 +59,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
|
|
|
|
))),
|
|
|
|
))),
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 4,
|
|
|
|
flex: 4,
|
|
|
|
@ -78,13 +80,15 @@ class ShowSickLeaveScreen extends StatelessWidget {
|
|
|
|
context)
|
|
|
|
context)
|
|
|
|
.hold
|
|
|
|
.hold
|
|
|
|
: item.status == 2
|
|
|
|
: item.status == 2
|
|
|
|
? TranslationBase.of(
|
|
|
|
? TranslationBase
|
|
|
|
|
|
|
|
.of(
|
|
|
|
context)
|
|
|
|
context)
|
|
|
|
.active
|
|
|
|
.active
|
|
|
|
: TranslationBase.of(
|
|
|
|
: TranslationBase
|
|
|
|
context)
|
|
|
|
.of(context)
|
|
|
|
.all,
|
|
|
|
.all,
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.bold,
|
|
|
|
color: item.status == 1
|
|
|
|
color: item.status == 1
|
|
|
|
? Colors.yellow[800]
|
|
|
|
? Colors.yellow[800]
|
|
|
|
: item.status == 2
|
|
|
|
: item.status == 2
|
|
|
|
@ -94,19 +98,23 @@ class ShowSickLeaveScreen extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(TranslationBase.of(
|
|
|
|
AppText(
|
|
|
|
|
|
|
|
TranslationBase.of(
|
|
|
|
context)
|
|
|
|
context)
|
|
|
|
.daysSickleave),
|
|
|
|
.daysSickleave),
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
item.noOfDays.toString(),
|
|
|
|
item.noOfDays
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
.toString(),
|
|
|
|
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.bold,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
AppText(
|
|
|
|
AppText(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(
|
|
|
|
|
|
|
|
context)
|
|
|
|
.startDate +
|
|
|
|
.startDate +
|
|
|
|
' ',
|
|
|
|
' ',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -116,7 +124,8 @@ class ShowSickLeaveScreen extends StatelessWidget {
|
|
|
|
.convertStringToDateFormat(
|
|
|
|
.convertStringToDateFormat(
|
|
|
|
item.startDate,
|
|
|
|
item.startDate,
|
|
|
|
'dd-MMM-yyyy'),
|
|
|
|
'dd-MMM-yyyy'),
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
fontWeight:
|
|
|
|
|
|
|
|
FontWeight.bold,
|
|
|
|
))
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
@ -134,13 +143,13 @@ class ShowSickLeaveScreen extends StatelessWidget {
|
|
|
|
'assets/images/edit.png'),
|
|
|
|
'assets/images/edit.png'),
|
|
|
|
|
|
|
|
|
|
|
|
// color: Colors.green, //Colors.black,
|
|
|
|
// color: Colors.green, //Colors.black,
|
|
|
|
onPressed: () => {
|
|
|
|
onPressed: () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
if (item.status ==
|
|
|
|
if (item.status ==
|
|
|
|
1)
|
|
|
|
1)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
DrAppToastMsg.showErrorToast(
|
|
|
|
TranslationBase.of(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
context)
|
|
|
|
|
|
|
|
.sickleaveonhold)
|
|
|
|
.sickleaveonhold)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// else
|
|
|
|
// else
|
|
|
|
|