step 13 : fix ui based figma, fix isSelfie button di presensi screen & presensi selfie screen
This commit is contained in:
@@ -153,11 +153,11 @@ class HomeScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
if (varCurrentDistanceProvider?.selfie == "TRUE") {
|
if (varCurrentDistanceProvider?.selfie == "TRUE") {
|
||||||
ref.read(currentPageProvider.notifier).update((state) => -1);
|
ref.read(currentPageProvider.notifier).update((state) => -1);
|
||||||
Navigator.pushNamed(context, presensiSelfieRoute);
|
Navigator.of(context).pushNamed(presensiSelfieRoute);
|
||||||
} else {
|
} else {
|
||||||
if (varCurrentDistanceProvider?.selfie == "FALSE") {
|
if (varCurrentDistanceProvider?.selfie == "FALSE") {
|
||||||
ref.read(currentPageProvider.notifier).update((state) => -1);
|
ref.read(currentPageProvider.notifier).update((state) => -1);
|
||||||
Navigator.pushNamed(context, presensiRoute);
|
Navigator.of(context).pushNamed(presensiRoute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -381,7 +381,8 @@ class PresensiSelfieScreen extends HookConsumerWidget {
|
|||||||
T_TransactionCurrentLongitude,
|
T_TransactionCurrentLongitude,
|
||||||
"T_TransactionCurrentDistance":
|
"T_TransactionCurrentDistance":
|
||||||
T_TransactionCurrentDistance,
|
T_TransactionCurrentDistance,
|
||||||
"T_TransactionSelfiePhoto": "data:image/jpeg;base64,$T_TransactionSelfiePhoto",
|
"T_TransactionSelfiePhoto":
|
||||||
|
"data:image/jpeg;base64,$T_TransactionSelfiePhoto",
|
||||||
"token": token,
|
"token": token,
|
||||||
"isSelfie": "TRUE"
|
"isSelfie": "TRUE"
|
||||||
};
|
};
|
||||||
@@ -672,7 +673,8 @@ class PresensiSelfieScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
// upload file
|
// upload file
|
||||||
if (varCurrentCheckJamProvider?.isAbsenClockIn == "TRUE" &&
|
if (varCurrentCheckJamProvider?.isAbsenClockIn == "TRUE" &&
|
||||||
varCurrentCheckJamProvider?.isAbsenClockOut == "TRUE") ...[
|
varCurrentCheckJamProvider?.isAbsenClockOut ==
|
||||||
|
"TRUE") ...[
|
||||||
SizedBox.shrink()
|
SizedBox.shrink()
|
||||||
] else ...[
|
] else ...[
|
||||||
if (varCurrentCheckJamProvider?.isAbsenClockIn == "FALSE" &&
|
if (varCurrentCheckJamProvider?.isAbsenClockIn == "FALSE" &&
|
||||||
@@ -715,15 +717,28 @@ class PresensiSelfieScreen extends HookConsumerWidget {
|
|||||||
|
|
||||||
// button clock in dan clock out
|
// button clock in dan clock out
|
||||||
if (varCurrentCheckJamProvider?.isAbsenClockIn == "TRUE" &&
|
if (varCurrentCheckJamProvider?.isAbsenClockIn == "TRUE" &&
|
||||||
varCurrentCheckJamProvider?.isAbsenClockOut == "TRUE") ...[
|
varCurrentCheckJamProvider?.isAbsenClockOut ==
|
||||||
|
"TRUE") ...[
|
||||||
SizedBox.shrink()
|
SizedBox.shrink()
|
||||||
] else ...[
|
] else ...[
|
||||||
if (varCurrentCheckJamProvider?.isAbsenClockIn == "FALSE" &&
|
if (varCurrentCheckJamProvider?.isAbsenClockIn == "FALSE" &&
|
||||||
varCurrentCheckJamProvider?.jamClockIn == "") ...[
|
varCurrentCheckJamProvider?.jamClockIn == "") ...[
|
||||||
// gambar icon presensi clock in
|
// gambar icon presensi clock in
|
||||||
(isLoadingAddressUserLocation.value)
|
(isLoadingAddressUserLocation.value)
|
||||||
? Center(
|
? Padding(
|
||||||
child: CircularProgressIndicator(),
|
padding: EdgeInsets.only(
|
||||||
|
left: Constant.getActualXPhone(
|
||||||
|
context: context, x: 20),
|
||||||
|
right: Constant.getActualXPhone(
|
||||||
|
context: context, x: 20),
|
||||||
|
top: Constant.getActualYPhone(
|
||||||
|
context: context, y: 24),
|
||||||
|
bottom: Constant.getActualYPhone(
|
||||||
|
context: context, y: 24),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
: Padding(
|
: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
@@ -831,10 +846,7 @@ class PresensiSelfieScreen extends HookConsumerWidget {
|
|||||||
"TRUE" &&
|
"TRUE" &&
|
||||||
varCurrentCheckJamProvider?.jamClockIn != "") ...[
|
varCurrentCheckJamProvider?.jamClockIn != "") ...[
|
||||||
(isLoadingAddressUserLocation.value)
|
(isLoadingAddressUserLocation.value)
|
||||||
? Center(
|
? Padding(
|
||||||
child: CircularProgressIndicator(),
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: Constant.getActualXPhone(
|
left: Constant.getActualXPhone(
|
||||||
context: context, x: 20),
|
context: context, x: 20),
|
||||||
@@ -845,6 +857,21 @@ class PresensiSelfieScreen extends HookConsumerWidget {
|
|||||||
bottom: Constant.getActualYPhone(
|
bottom: Constant.getActualYPhone(
|
||||||
context: context, y: 24),
|
context: context, y: 24),
|
||||||
),
|
),
|
||||||
|
child: Center(
|
||||||
|
child: CircularProgressIndicator(),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: Constant.getActualXPhone(
|
||||||
|
context: context, x: 20),
|
||||||
|
right: Constant.getActualXPhone(
|
||||||
|
context: context, x: 20),
|
||||||
|
top: Constant.getActualYPhone(
|
||||||
|
context: context, y: 24),
|
||||||
|
// bottom: Constant.getActualYPhone(
|
||||||
|
// context: context, y: 24),
|
||||||
|
),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: Constant.getActualXPhone(
|
width: Constant.getActualXPhone(
|
||||||
context: context, x: 390),
|
context: context, x: 390),
|
||||||
|
|||||||
@@ -102,7 +102,10 @@ class PresensiSelfieUploadAreaWidget extends StatelessWidget {
|
|||||||
width: Constant.getActualXPhone(context: context, x: 390),
|
width: Constant.getActualXPhone(context: context, x: 390),
|
||||||
height: Constant.getActualYPhone(
|
height: Constant.getActualYPhone(
|
||||||
context: context, y: isImage.value ? 200 : 83),
|
context: context, y: isImage.value ? 200 : 83),
|
||||||
decoration: BoxDecoration(color: Constant.bgUploadFile),
|
decoration: BoxDecoration(
|
||||||
|
color: Constant.bgUploadFile,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
child: Builder(builder: (context) {
|
child: Builder(builder: (context) {
|
||||||
final String? mime = lookupMimeType(fileData.value?.path ?? "");
|
final String? mime = lookupMimeType(fileData.value?.path ?? "");
|
||||||
return Semantics(
|
return Semantics(
|
||||||
@@ -151,9 +154,23 @@ class PresensiSelfieUploadAreaWidget extends StatelessWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
// Icon(
|
||||||
Icons.upload_outlined,
|
// Icons.upload_outlined,
|
||||||
color: Constant.textOrange,
|
// color: Constant.textOrange,
|
||||||
|
// ),
|
||||||
|
|
||||||
|
Image.asset(
|
||||||
|
'images/camera_selfie.png', // Path gambar untuk "Check In"
|
||||||
|
width: Constant.getActualXPhone(
|
||||||
|
context: context, x: 24),
|
||||||
|
height: Constant.getActualYPhone(
|
||||||
|
context: context, y: 24),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: Constant.getActualYPhone(
|
||||||
|
context: context,
|
||||||
|
y: 4,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'Upload File',
|
'Upload File',
|
||||||
|
|||||||
Reference in New Issue
Block a user