Commit da7b798f authored by Dio Maulana's avatar Dio Maulana

pin dihapus

parent efc9fbab
......@@ -109,7 +109,9 @@ class Api {
}
static Future<ApiResponse> getUserProfile(
String branchId, String nik, String pin) async {
String branchId,
String nik,
) async {
String apiUrl = "$baseUrl${endPoint}profile_user";
try {
......@@ -117,7 +119,6 @@ class Api {
"branch_id": branchId,
"nik": nik,
"brand_code": brandCode,
"pin": pin,
};
String bodies = jsonEncode(data);
dynamic jsonObject =
......
......@@ -220,12 +220,12 @@ class _BodyWidgetState extends State<BodyWidget> {
// inputType: TextInputType.number,
// ),
PasswordInput(
passwordController: pinController,
labelText: "PIN",
borderSideActive: true,
textInputType: TextInputType.number,
),
// PasswordInput(
// passwordController: pinController,
// labelText: "PIN",
// borderSideActive: true,
// textInputType: TextInputType.number,
// ),
// Autocomplete(
// optionsBuilder: (TextEditingValue textEditingValue) {
// if (textEditingValue.text.isEmpty) {
......@@ -400,7 +400,6 @@ class _BodyWidgetState extends State<BodyWidget> {
branchModel:
widget.nearestBranch[selectedOutlet],
nik: nikController.text,
pin: pinController.text,
);
},
);
......@@ -415,10 +414,9 @@ class _BodyWidgetState extends State<BodyWidget> {
child: CustomButton(
text: "Keluar",
onTap: () async {
if (nikController.text.isEmpty ||
pinController.text.isEmpty) {
if (nikController.text.isEmpty) {
EasyLoading.showToast(
"NIK dan PIN harus diisi",
"NIK harus diisi",
);
} else {
await EasyLoading.show(
......@@ -427,9 +425,8 @@ class _BodyWidgetState extends State<BodyWidget> {
);
Api.getUserProfile(
widget.nearestBranch[selectedOutlet].id,
nikController.text,
pinController.text,
).then((apiResponse) {
nikController.text)
.then((apiResponse) {
EasyLoading.dismiss();
if (apiResponse.error) {
modalDialogGlobal(
......@@ -981,13 +978,11 @@ class WidgetSelectShift extends StatefulWidget {
required this.shiftList,
required this.branchModel,
required this.nik,
required this.pin,
}) : super(key: key);
final List<ShiftModel> shiftList;
final BranchModel branchModel;
final String nik;
final String pin;
@override
State<WidgetSelectShift> createState() => _WidgetSelectShiftState();
......@@ -1115,7 +1110,6 @@ class _WidgetSelectShiftState extends State<WidgetSelectShift> {
Api.getUserProfile(
widget.branchModel.id,
widget.nik,
widget.pin,
).then((apiResponse) {
EasyLoading.dismiss();
if (apiResponse.error) {
......
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