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 {
onTap: onTap,
child: Container(
width: double.infinity,
height: 45,
height: 55,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: (colorButton == null) ? ColorManager.primary : colorButton,
......
......@@ -53,7 +53,7 @@ class AbsentCameraView extends StatefulWidget {
required this.shiftEndTime,
});
final int actionType; // 1 = Absent, 2 = Break
final int actionType; // 1 = ClockIn/Out, 2 = BreakStart/End
final bool isIn;
final BranchModel branchModel;
final ShiftModel? shiftModel;
......@@ -750,7 +750,7 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
profil: widget.profile,
nik: widget.nik,
actionType: widget.actionType,
isIn: false,
isIn: widget.isIn,
shiftName: widget.shiftNameSelected,
shiftEnd: widget.shiftEndTime,
shiftStart: widget.shiftStartTime),
......@@ -791,7 +791,7 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
profil: widget.profile,
nik: widget.nik,
actionType: widget.actionType,
isIn: false,
isIn: widget.isIn,
shiftName: widget.shiftNameSelected,
shiftEnd: widget.shiftEndTime,
shiftStart: widget.shiftStartTime),
......
......@@ -12,12 +12,14 @@ import 'package:ravintola_attendance/resource/style.dart';
import 'package:flutter/material.dart';
String getAbsentText(bool isIn, int actionType) {
var msg = "";
if (actionType == 1) {
return isIn ? "Absen Masuk" : "Absen Keluar";
msg = isIn ? "Absen Masuk" : "Absen Keluar";
} 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 {
......
......@@ -371,47 +371,20 @@ class _BodyWidgetState extends State<BodyWidget> {
),
),
),
SizedBox(
height: AppMargin.m20,
),
Container(
padding: EdgeInsets.symmetric(horizontal: AppPadding.p20),
margin: EdgeInsets.only(
top: AppMargin.m16,
bottom: AppMargin.m20,
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(
width: AppMargin.m4,
),
/** Break Start */
Expanded(
child: CustomButton(
colorButton: Colors.primaries[4],
text: "Break Start",
onTap: () async {
if (nikController.text.isEmpty) {
......@@ -479,12 +452,12 @@ class _BodyWidgetState extends State<BodyWidget> {
),
),
SizedBox(
width: AppMargin.m4,
width: AppMargin.m10,
),
/** Break End */
Expanded(
child: CustomButton(
colorButton: Colors.primaries[4],
text: "Break End",
onTap: () async {
if (nikController.text.isEmpty) {
......@@ -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(
width: AppMargin.m4,
width: AppMargin.m10,
),
/** Clock Out */
Expanded(
child: CustomButton(
......
......@@ -117,10 +117,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.19.0"
version: "1.18.0"
convert:
dependency: transitive
description:
......@@ -376,30 +376,6 @@ packages:
url: "https://pub.dev"
source: hosted
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:
dependency: transitive
description:
......@@ -412,34 +388,34 @@ packages:
dependency: transitive
description:
name: matcher
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.16+1"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.11.1"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.15.0"
version: "1.10.0"
path:
dependency: transitive
description:
name: path
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
url: "https://pub.dev"
source: hosted
version: "1.9.0"
version: "1.8.3"
path_provider_linux:
dependency: transitive
description:
......@@ -572,7 +548,7 @@ packages:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
version: "0.0.99"
source_span:
dependency: transitive
description:
......@@ -585,10 +561,10 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377"
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.12.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
......@@ -609,10 +585,10 @@ packages:
dependency: transitive
description:
name: string_scanner
sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3"
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
url: "https://pub.dev"
source: hosted
version: "1.3.0"
version: "1.2.0"
term_glyph:
dependency: transitive
description:
......@@ -625,10 +601,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.7.3"
version: "0.6.1"
typed_data:
dependency: transitive
description:
......@@ -661,14 +637,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
vm_service:
web:
dependency: transitive
description:
name: vm_service
sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "14.3.0"
version: "0.3.0"
win32:
dependency: transitive
description:
......@@ -710,5 +686,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.4.0 <4.0.0"
flutter: ">=3.18.0-18.0.pre.54"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.3.0"
......@@ -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
# 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.
version: 1.0.1+2
version: 1.0.2+3
environment:
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