first commit
This commit is contained in:
@ -43,54 +43,58 @@ class PenyewaLogView extends StatelessWidget {
|
||||
),
|
||||
child: model.logHistorySewaanList == null
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15, vertical: 10),
|
||||
itemCount: model.logHistorySewaanList!.length,
|
||||
itemBuilder: (context, index) {
|
||||
// model.log
|
||||
// .i(model.logHistorySewaanList![index].date);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
// model.log.i('clicked on index $index');
|
||||
model.checkKet(
|
||||
model.logHistorySewaanList![index],
|
||||
: model.logHistorySewaanList!.isEmpty
|
||||
? const Center(child: Text('Belum ada log'))
|
||||
: ListView.builder(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 15, vertical: 10),
|
||||
itemCount: model.logHistorySewaanList!.length,
|
||||
itemBuilder: (context, index) {
|
||||
// model.log
|
||||
// .i(model.logHistorySewaanList![index].date);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
// model.log.i('clicked on index $index');
|
||||
model.checkKet(
|
||||
model.logHistorySewaanList![index],
|
||||
);
|
||||
},
|
||||
child: Card(
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
model.logHistorySewaanList![index]
|
||||
.jenis!,
|
||||
style: boldTextStyle.copyWith(
|
||||
fontSize: 15),
|
||||
),
|
||||
subtitle: const Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Text(
|
||||
// 'Tempat : ${model.logHistorySewaanList![index].}',
|
||||
// style: regularTextStyle,
|
||||
// ),
|
||||
// Text(
|
||||
// model.logHistorySewaanList![index]
|
||||
// .jenis!,
|
||||
// style: italicTextStyle,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
// dummy date and time
|
||||
trailing: Text(
|
||||
model.otherFunction.formatDateString(
|
||||
model.logHistorySewaanList![index]
|
||||
.date!),
|
||||
style: regularTextStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Card(
|
||||
child: ListTile(
|
||||
title: Text(
|
||||
model.logHistorySewaanList![index].jenis!,
|
||||
style:
|
||||
boldTextStyle.copyWith(fontSize: 15),
|
||||
),
|
||||
subtitle: const Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
// Text(
|
||||
// 'Tempat : ${model.logHistorySewaanList![index].}',
|
||||
// style: regularTextStyle,
|
||||
// ),
|
||||
// Text(
|
||||
// model.logHistorySewaanList![index]
|
||||
// .jenis!,
|
||||
// style: italicTextStyle,
|
||||
// ),
|
||||
],
|
||||
),
|
||||
// dummy date and time
|
||||
trailing: Text(
|
||||
model.otherFunction.formatDateString(model
|
||||
.logHistorySewaanList![index].date!),
|
||||
style: regularTextStyle,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
|
||||
@ -33,36 +33,38 @@ class PulsaDetailView extends StatelessWidget {
|
||||
),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
_RowChildren(
|
||||
title: 'NIK',
|
||||
value: model.detailPenyewaModel!.nik ?? '...',
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
_RowChildren(
|
||||
title: 'Nama',
|
||||
value: model.detailPenyewaModel!.nama ?? '...',
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
_RowChildren(
|
||||
title: 'Pulsa',
|
||||
value:
|
||||
'Rp. ${model.otherFunction.commaFormat(model.detailPenyewaModel!.saldo ?? 0)}',
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
_RowChildren(
|
||||
title: 'Card ID',
|
||||
value: model.detailPenyewaModel!.rfid ?? '...',
|
||||
),
|
||||
],
|
||||
),
|
||||
child: model.detailPenyewaModel == null
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
_RowChildren(
|
||||
title: 'NIK',
|
||||
value: model.detailPenyewaModel!.nik ?? '...',
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
_RowChildren(
|
||||
title: 'Nama',
|
||||
value: model.detailPenyewaModel!.nama ?? '...',
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
_RowChildren(
|
||||
title: 'Pulsa',
|
||||
value:
|
||||
'Rp. ${model.otherFunction.commaFormat(model.detailPenyewaModel!.saldo ?? 0)}',
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
_RowChildren(
|
||||
title: 'Card ID',
|
||||
value: model.detailPenyewaModel!.rfid ?? '...',
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
MyButton(text: 'Ganti Password')
|
||||
const MyButton(text: 'Ganti Password')
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user