From 937c30736e68effaa5787b516cfcf6e42d66ee4d Mon Sep 17 00:00:00 2001 From: zaid_daoud Date: Thu, 19 Oct 2023 10:47:47 +0300 Subject: [PATCH] test --- assets/translations/ar.json | 4 +- assets/translations/en.json | 4 +- lib/models/enums/translation_keys.dart | 1 + lib/views/widgets/equipment/pick_asset.dart | 62 +-------------------- 4 files changed, 8 insertions(+), 63 deletions(-) diff --git a/assets/translations/ar.json b/assets/translations/ar.json index 4a88decb..b444f4ca 100644 --- a/assets/translations/ar.json +++ b/assets/translations/ar.json @@ -42,5 +42,7 @@ "assetNo" : "رقم الجهاز", "manufacture" : "صناعة", "model" : "الطراز", - "serialNumber" : "الرقم التسلسلي" + "serialNumber" : "الرقم التسلسلي", + "device" : "الجهاز", + "pickAsset" : "إختر جهاز" } \ No newline at end of file diff --git a/assets/translations/en.json b/assets/translations/en.json index 72cdd60f..49c1ed56 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -42,5 +42,7 @@ "assetNo" : "Asset No.", "manufacture" : "Manufacture", "model" : "Model", - "serialNumber" : "Serial Number" + "serialNumber" : "Serial Number", + "device" : "Device", + "pickAsset" : "Pick Asset" } \ No newline at end of file diff --git a/lib/models/enums/translation_keys.dart b/lib/models/enums/translation_keys.dart index c6f25896..12108d51 100644 --- a/lib/models/enums/translation_keys.dart +++ b/lib/models/enums/translation_keys.dart @@ -44,4 +44,5 @@ enum TranslationKeys { model, serialNumber, device, + pickAsset, } diff --git a/lib/views/widgets/equipment/pick_asset.dart b/lib/views/widgets/equipment/pick_asset.dart index 95e6f943..862fd1be 100644 --- a/lib/views/widgets/equipment/pick_asset.dart +++ b/lib/views/widgets/equipment/pick_asset.dart @@ -22,7 +22,7 @@ class PickAsset extends StatelessWidget { AppTextFormField( enable: false, labelText: TranslationKeys.device, - initialValue: context.translate(TranslationKeys.site), + initialValue: context.translate(TranslationKeys.pickAsset), suffixIcon: "qr".toSvgAsset(height: 24, fit: BoxFit.fitHeight).paddingOnly(end: 16), ).onPress(() async { Device device = await Navigator.of(context).pushNamed(SingleDevicePicker.id) as Device; @@ -48,65 +48,5 @@ class PickAsset extends StatelessWidget { ), ], ); - // return ElevatedButton( - // style: ElevatedButton.styleFrom( - // elevation: 0, - // padding: EdgeInsets.symmetric(horizontal: 16, vertical: device == null ? 12 : 8), - // shape: RoundedRectangleBorder( - // borderRadius: BorderRadius.circular(AppStyle.borderRadius * AppStyle.getScaleFactor(context)), - // ), - // foregroundColor: AColors.primaryColor, - // backgroundColor: AColors.inputFieldBackgroundColor, - // ), - // child: Row( - // children: [ - // Expanded( - // child: ListTile( - // contentPadding: const EdgeInsets.all(0), - // title: Text( - // "${"context"} : ${device.serialNumber}", - // style: Theme.of(context).textTheme.subtitle1, - // ), - // subtitle: Column( - // crossAxisAlignment: CrossAxisAlignment.start, - // children: [ - // Divider( - // color: Theme.of(context).textTheme.subtitle1.color, - // ), - // Text( - // "${_subtitle.assetNumber} : ${device.number}", - // style: Theme.of(context).textTheme.subtitle2, - // ), - // Divider( - // color: Theme.of(context).textTheme.subtitle1.color, - // ), - // Text( - // "${_subtitle.assetName} : ${device.modelDefinition.assetName}", - // style: Theme.of(context).textTheme.subtitle2, - // ), - // Divider( - // color: Theme.of(context).textTheme.subtitle1.color, - // ), - // Text( - // "${_subtitle.brand} : ${device.modelDefinition.manufacturerName}", - // style: Theme.of(context).textTheme.subtitle2, - // ), - // Divider( - // color: Theme.of(context).textTheme.subtitle1.color, - // ), - // Text( - // "${_subtitle.model} : ${device.modelDefinition.modelName}", - // style: Theme.of(context).textTheme.subtitle2, - // ), - // ], - // ), - // )), - // const Icon(Icons.keyboard_arrow_down, size: 28, color: AColors.grey3A), - // ], - // ), - // onPressed: () async { - // Device _device = await Navigator.of(context).pushNamed(SingleDevicePicker.id) as Device; - // onDevicePick(_device); - // }); } }