|
|
|
|
@ -8,6 +8,8 @@ class SearchAllRequestsModel {
|
|
|
|
|
SearchByManufactureModel? manufacture; // Now nullable
|
|
|
|
|
SearchBySNModel? sn; // Now nullable
|
|
|
|
|
SearchByRequestModel? model; // Now nullable
|
|
|
|
|
SearchByExternalPO? externalPo; // Now nullable
|
|
|
|
|
SearchByInternalPO? internalPo; // Now nullable
|
|
|
|
|
SearchAllRequestsBaseModel? searchBySelectedValue; // Now nullable
|
|
|
|
|
List<int>? statuses; // Now nullable
|
|
|
|
|
List<int>? typeTransaction; // Now nullable
|
|
|
|
|
@ -21,6 +23,8 @@ class SearchAllRequestsModel {
|
|
|
|
|
this.assetNo,
|
|
|
|
|
this.manufacture,
|
|
|
|
|
this.sn,
|
|
|
|
|
this.externalPo,
|
|
|
|
|
this.internalPo,
|
|
|
|
|
this.model,
|
|
|
|
|
this.statuses,
|
|
|
|
|
this.typeTransaction,
|
|
|
|
|
@ -70,6 +74,16 @@ class SearchAllRequestsModel {
|
|
|
|
|
sn?.value = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (field != 'externalPo') {
|
|
|
|
|
externalPo?.controller?.text = "";
|
|
|
|
|
externalPo?.value = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (field != 'internalPo') {
|
|
|
|
|
internalPo?.controller?.text = "";
|
|
|
|
|
internalPo?.value = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (field != 'model') {
|
|
|
|
|
model?.controller?.text = "";
|
|
|
|
|
model?.value = null;
|
|
|
|
|
@ -128,6 +142,14 @@ class SearchAllRequestsModel {
|
|
|
|
|
json["assetSerialNo"] = sn!.value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (externalPo?.value?.isNotEmpty ?? false) {
|
|
|
|
|
json["externalPo"] = externalPo!.value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (internalPo?.value?.isNotEmpty ?? false) {
|
|
|
|
|
json["internalPo"] = internalPo!.value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (model?.value?.isNotEmpty ?? false) {
|
|
|
|
|
json["model"] = model!.value;
|
|
|
|
|
}
|
|
|
|
|
@ -187,3 +209,13 @@ class SearchByRequestModel extends SearchAllRequestsBaseModel {
|
|
|
|
|
SearchByRequestModel(BuildContext context, {TextEditingController? controller, String? value}) // Parameters now nullable
|
|
|
|
|
: super(context, controller: controller, label: context.translation.model, value: value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SearchByExternalPO extends SearchAllRequestsBaseModel {
|
|
|
|
|
SearchByExternalPO(BuildContext context, {TextEditingController? controller, String? value}) // Parameters now nullable
|
|
|
|
|
: super(context, controller: controller, label: "External PO", value: value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class SearchByInternalPO extends SearchAllRequestsBaseModel {
|
|
|
|
|
SearchByInternalPO(BuildContext context, {TextEditingController? controller, String? value}) // Parameters now nullable
|
|
|
|
|
: super(context, controller: controller, label: "Internal PO", value: value);
|
|
|
|
|
}
|
|
|
|
|
|