Commit fb2d9dc5 authored by William Goszal's avatar William Goszal 🚴

patch tombol break start & end

parent c71dbe0b
...@@ -22,7 +22,7 @@ class CustomButton extends StatelessWidget { ...@@ -22,7 +22,7 @@ class CustomButton extends StatelessWidget {
onTap: onTap, onTap: onTap,
child: Container( child: Container(
width: double.infinity, width: double.infinity,
height: 45, height: 55,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), borderRadius: BorderRadius.circular(8),
color: (colorButton == null) ? ColorManager.primary : colorButton, color: (colorButton == null) ? ColorManager.primary : colorButton,
......
...@@ -53,7 +53,7 @@ class AbsentCameraView extends StatefulWidget { ...@@ -53,7 +53,7 @@ class AbsentCameraView extends StatefulWidget {
required this.shiftEndTime, required this.shiftEndTime,
}); });
final int actionType; // 1 = Absent, 2 = Break final int actionType; // 1 = ClockIn/Out, 2 = BreakStart/End
final bool isIn; final bool isIn;
final BranchModel branchModel; final BranchModel branchModel;
final ShiftModel? shiftModel; final ShiftModel? shiftModel;
...@@ -750,7 +750,7 @@ class _AbsentCameraViewState extends State<AbsentCameraView> { ...@@ -750,7 +750,7 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
profil: widget.profile, profil: widget.profile,
nik: widget.nik, nik: widget.nik,
actionType: widget.actionType, actionType: widget.actionType,
isIn: false, isIn: widget.isIn,
shiftName: widget.shiftNameSelected, shiftName: widget.shiftNameSelected,
shiftEnd: widget.shiftEndTime, shiftEnd: widget.shiftEndTime,
shiftStart: widget.shiftStartTime), shiftStart: widget.shiftStartTime),
...@@ -791,7 +791,7 @@ class _AbsentCameraViewState extends State<AbsentCameraView> { ...@@ -791,7 +791,7 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
profil: widget.profile, profil: widget.profile,
nik: widget.nik, nik: widget.nik,
actionType: widget.actionType, actionType: widget.actionType,
isIn: false, isIn: widget.isIn,
shiftName: widget.shiftNameSelected, shiftName: widget.shiftNameSelected,
shiftEnd: widget.shiftEndTime, shiftEnd: widget.shiftEndTime,
shiftStart: widget.shiftStartTime), shiftStart: widget.shiftStartTime),
......
...@@ -12,12 +12,14 @@ import 'package:ravintola_attendance/resource/style.dart'; ...@@ -12,12 +12,14 @@ import 'package:ravintola_attendance/resource/style.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
String getAbsentText(bool isIn, int actionType) { String getAbsentText(bool isIn, int actionType) {
var msg = "";
if (actionType == 1) { if (actionType == 1) {
return isIn ? "Absen Masuk" : "Absen Keluar"; msg = isIn ? "Absen Masuk" : "Absen Keluar";
} else if (actionType == 2) { } else if (actionType == 2) {
return isIn ? "Break Start" : "Break End"; msg = isIn ? "Break Start" : "Break End";
} }
return "Unknown"; // msg += " isIn: $isIn, actionType: $actionType";
return msg;
} }
class AbsentSuccessView extends StatelessWidget { class AbsentSuccessView extends StatelessWidget {
......
...@@ -371,47 +371,20 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -371,47 +371,20 @@ class _BodyWidgetState extends State<BodyWidget> {
), ),
), ),
), ),
SizedBox(
height: AppMargin.m20,
),
Container( Container(
padding: EdgeInsets.symmetric(horizontal: AppPadding.p20), padding: EdgeInsets.symmetric(horizontal: AppPadding.p20),
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: AppMargin.m16, bottom: AppMargin.m10,
bottom: AppMargin.m20,
), ),
child: Row( child: Row(
children: [ children: [
/** Clock In */
Expanded(
child: CustomButton(
text: "Masuk",
onTap: () {
if (nikController.text.isEmpty) {
EasyLoading.showToast(
"Silakan isi NIK terlebih dahulu",
);
} else {
showModalBottomSheet(
backgroundColor: ColorManager.backgroundColor,
isScrollControlled: true,
context: context,
builder: (c) {
return WidgetSelectShift(
shiftList: widget.shiftList,
branchModel: widget.nearestBranch[selectedOutlet],
nik: nikController.text,
);
},
);
}
},
),
),
SizedBox(
width: AppMargin.m4,
),
/** Break Start */ /** Break Start */
Expanded( Expanded(
child: CustomButton( child: CustomButton(
colorButton: Colors.primaries[4],
text: "Break Start", text: "Break Start",
onTap: () async { onTap: () async {
if (nikController.text.isEmpty) { if (nikController.text.isEmpty) {
...@@ -479,12 +452,12 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -479,12 +452,12 @@ class _BodyWidgetState extends State<BodyWidget> {
), ),
), ),
SizedBox( SizedBox(
width: AppMargin.m4, width: AppMargin.m10,
), ),
/** Break End */ /** Break End */
Expanded( Expanded(
child: CustomButton( child: CustomButton(
colorButton: Colors.primaries[4],
text: "Break End", text: "Break End",
onTap: () async { onTap: () async {
if (nikController.text.isEmpty) { if (nikController.text.isEmpty) {
...@@ -548,10 +521,45 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -548,10 +521,45 @@ class _BodyWidgetState extends State<BodyWidget> {
}, },
), ),
), ),
],
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: AppPadding.p20),
margin: EdgeInsets.only(
bottom: AppMargin.m10,
),
child: Row(
children: [
/** Clock In */
Expanded(
child: CustomButton(
text: "Masuk",
onTap: () {
if (nikController.text.isEmpty) {
EasyLoading.showToast(
"Silakan isi NIK terlebih dahulu",
);
} else {
showModalBottomSheet(
backgroundColor: ColorManager.backgroundColor,
isScrollControlled: true,
context: context,
builder: (c) {
return WidgetSelectShift(
shiftList: widget.shiftList,
branchModel: widget.nearestBranch[selectedOutlet],
nik: nikController.text,
);
},
);
}
},
),
),
SizedBox( SizedBox(
width: AppMargin.m4, width: AppMargin.m10,
), ),
/** Clock Out */ /** Clock Out */
Expanded( Expanded(
child: CustomButton( child: CustomButton(
......
...@@ -117,10 +117,10 @@ packages: ...@@ -117,10 +117,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: collection name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.19.0" version: "1.18.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
...@@ -376,30 +376,6 @@ packages: ...@@ -376,30 +376,6 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "4.8.1" version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06"
url: "https://pub.dev"
source: hosted
version: "10.0.7"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
url: "https://pub.dev"
source: hosted
version: "3.0.1"
lints: lints:
dependency: transitive dependency: transitive
description: description:
...@@ -412,34 +388,34 @@ packages: ...@@ -412,34 +388,34 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: matcher name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.12.16+1" version: "0.12.16"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.11.1" version: "0.5.0"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.15.0" version: "1.10.0"
path: path:
dependency: transitive dependency: transitive
description: description:
name: path name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.9.0" version: "1.8.3"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
...@@ -572,7 +548,7 @@ packages: ...@@ -572,7 +548,7 @@ packages:
dependency: transitive dependency: transitive
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.99"
source_span: source_span:
dependency: transitive dependency: transitive
description: description:
...@@ -585,10 +561,10 @@ packages: ...@@ -585,10 +561,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: stack_trace name: stack_trace
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.12.0" version: "1.11.1"
stream_channel: stream_channel:
dependency: transitive dependency: transitive
description: description:
...@@ -609,10 +585,10 @@ packages: ...@@ -609,10 +585,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: string_scanner name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.3.0" version: "1.2.0"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
...@@ -625,10 +601,10 @@ packages: ...@@ -625,10 +601,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "0.7.3" version: "0.6.1"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
...@@ -661,14 +637,14 @@ packages: ...@@ -661,14 +637,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.4" version: "2.1.4"
vm_service: web:
dependency: transitive dependency: transitive
description: description:
name: vm_service name: web
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "14.3.0" version: "0.3.0"
win32: win32:
dependency: transitive dependency: transitive
description: description:
...@@ -710,5 +686,5 @@ packages: ...@@ -710,5 +686,5 @@ packages:
source: hosted source: hosted
version: "3.1.2" version: "3.1.2"
sdks: sdks:
dart: ">=3.4.0 <4.0.0" dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.18.0-18.0.pre.54" flutter: ">=3.3.0"
...@@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev ...@@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts # In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix. # of the product and file versions while build-number is used as the build suffix.
version: 1.0.1+2 version: 1.0.2+3
environment: environment:
sdk: ">=3.0.0 <4.0.0" sdk: ">=3.0.0 <4.0.0"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment