Commit da7b798f authored by Dio Maulana's avatar Dio Maulana

pin dihapus

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