Some changes on work orders model attributes & change File Base Url (Still under testing)

main_design2.0
zaid_daoud 2 years ago
parent 383c634c50
commit bd299e2a6d

@ -12,8 +12,8 @@ class URLs {
set host(String value) => _host = value; set host(String value) => _host = value;
// static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_host/Files/DownloadFile?fileName=$file"); static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_host/Files/DownloadFile?fileName=$file");
static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_host/attachment/$file"); // static String getFileUrl(String file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_host/attachment/$file");
// API Routes // API Routes
static get login => "$_baseUrl/MobileAuth/LoginIntegration"; // post static get login => "$_baseUrl/MobileAuth/LoginIntegration"; // post

@ -1,3 +1,5 @@
import 'package:test_sa/models/lookup.dart';
class CallRequestForWorkOrder { class CallRequestForWorkOrder {
int id; int id;
String callNo; String callNo;
@ -71,11 +73,11 @@ class Asset {
String ipAddress; String ipAddress;
String macAddress; String macAddress;
String portNumber; String portNumber;
String assetReplace; Lookup assetReplace;
String oldAsset; String oldAsset;
bool isParent; Lookup isParent;
String parentAsset; String parentAsset;
int assetType; Lookup assetType;
Site site; Site site;
Building building; Building building;
String floor; String floor;
@ -171,11 +173,11 @@ class Asset {
ipAddress = json['ipAddress']; ipAddress = json['ipAddress'];
macAddress = json['macAddress']; macAddress = json['macAddress'];
portNumber = json['portNumber']; portNumber = json['portNumber'];
assetReplace = json['assetReplace']; assetReplace = json['assetReplace'] != null ? Lookup.fromJson(json['assetReplace']) : null;
oldAsset = json['oldAsset']; oldAsset = json['oldAsset'];
isParent = json['isParent']; isParent = json['isParent'] != null ? Lookup.fromJson(json['isParent']) : null;
parentAsset = json['parentAsset']; parentAsset = json['parentAsset'];
assetType = json['assetType']; assetType = json['assetType'] != null ? Lookup.fromJson(json['assetType']) : null;
site = json['site'] != null ? new Site.fromJson(json['site']) : null; site = json['site'] != null ? new Site.fromJson(json['site']) : null;
building = json['building']; building = json['building'];
floor = json['floor']; floor = json['floor'];

@ -416,7 +416,7 @@ class _EditServiceReportState extends State<EditServiceReport> with TickerProvid
), ),
], ],
), ),
if (_serviceReport.callLastSituation.value == 2) if (_serviceReport?.callLastSituation?.value == 2)
Column( Column(
children: [ children: [
const SizedBox( const SizedBox(
@ -1056,7 +1056,6 @@ class _EditServiceReportState extends State<EditServiceReport> with TickerProvid
return; return;
} }
_validate = true; _validate = true;
print("jere1245");
// if (!_formKey.currentState.validate()) { // if (!_formKey.currentState.validate()) {
// setState(() {}); // setState(() {});
// return; // return;

Loading…
Cancel
Save