You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudsolutions-atoms/lib/controllers/api_routes/urls.dart

176 lines
12 KiB
Dart

3 years ago
class URLs {
3 years ago
URLs._();
2 years ago
1 year ago
// static const host1 = "https://atomsm.hmg.com"; // production url
static const host1 = "https://atomsmdev.hmg.com"; // local UAT url
3 years ago
// static String _baseUrl = "$_host/mobile";
static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis
3 years ago
2 years ago
static String _host = host1;
3 years ago
set host(String value) => _host = value;
static String? getFileUrl(String? file) => (file == null || file.isEmpty) ? null : (file.contains("/") ? file : "$_baseUrl/Files/DownloadFile?fileName=$file");
2 years ago
// static String getFileUrl(String file) => (file == null || file.isEmpty) ? null :1 (file.contains("/") ? file : "$_host/attachment/$file");
3 years ago
// API Routes
2 years ago
static get login => "$_baseUrl/MobileAuth/Login"; // web login
static get checkLoginValidation => "$_baseUrl/Account/Authenticate"; // web login
2 years ago
// static get login => "$_baseUrl/MobileAuth/LoginIntegration"; // mobile login
3 years ago
static get register => "$_baseUrl/handle/create/user"; // post
static get updateProfile => "$_baseUrl/update/user/profile"; // post
static get updateProfileImage => "$_baseUrl/Account/ChangeImageEmployee"; // post
static get getSites => "$_baseUrl/Customer/GetCustomers"; // get
static get getSitesAutoComplete => "$_baseUrl/Customer/GetCustomersAutoComplete"; // get
static get getSiteAutoCompleteWithoutConditionSites => "$_baseUrl/Customer/GetCustomersAutoCompleteWithoutConditionSites"; // get
static get getDepartments => "$_baseUrl/Customer/GetDepartmentLookup"; // get
static get getAssets => "$_baseUrl/Asset/GetAssets"; // get
1 year ago
static get getFaultDescription => "$_baseUrl/Asset/GetDefectForModelDefinition"; // get
static get getAssetById => "$_baseUrl/Asset/GetAssetById?assetId="; // get
static get getModels => "$_baseUrl/ModelDefinition/GetModelDefinitionAsset"; // get ?client=2
static get getAllRequestsAndCount => "$_baseUrl/CallRequest/GetAllRequestsAndCount"; // get
//service request new flow urls.
static get nurseDashboardCountUrl=> '$_baseUrl/ServiceRequest/GetDashboardNurseCount';
static get nurseDashboardDetailsUrl=> '$_baseUrl/ServiceRequest/GetDashboardNurseDetails';
1 year ago
static get nurseRejectUrl=> '$_baseUrl/ServiceRequest/NurseReject';
static get engineerStopTimer=> '$_baseUrl/ServiceRequest/EngineerStopTimer';
static get nurseConfirmEngineerArrivedUrl=> '$_baseUrl/ServiceRequest/NurseConfirm';
1 year ago
static get nurseConfirmUrl=> '$_baseUrl/ServiceRequest/NurseConfirm';
static get nurseRejectEngineerArrivedUrl=> '$_baseUrl/ServiceRequest/NurseNotArrive';
static get nurseConfirmEngineerArrivalUrl=> '$_baseUrl/ServiceRequest/NurseAccept';
static get engineerDashboardCountUrl=> '$_baseUrl/ServiceRequest/GetDashboardEngineerCount';
static get engineerDashboardDetailsUrl=> '$_baseUrl/ServiceRequest/GetDashboardEngineerDetails';
static get engineerDashboardNotAssignDetails=> '$_baseUrl/ServiceRequest/GetDashboardEngineerNotAssignDetails';
static get engineerAcceptUrl=> '$_baseUrl/ServiceRequest/EngineerAccept';
static get engineerAssignHimSelfUrl=> '$_baseUrl/ServiceRequest/AssignEngineerToHimself';
static get engineerRejectUrl=> '$_baseUrl/ServiceRequest/EngineerReject';
static get engineerFixRemotlyUrl=> '$_baseUrl/ServiceRequest/EngineerFixRemotly';
static get engineerNeedVisitUrl=> '$_baseUrl/ServiceRequest/EngineerNeedVisit';
1 year ago
static get engineerUpdateNeedVisitUrl=> '$_baseUrl/ServiceRequest/EngineerUpdateNeedVisit';
1 year ago
static get engineerMarkAsFixUrl=> '$_baseUrl/ServiceRequest/EngineerMarkAsFix';
static get reOrderActivity=> '$_baseUrl/ServiceRequest/ReOrderActivity';
1 year ago
static get engineerConfirmArriveUrl=> '$_baseUrl/ServiceRequest/EngineerConfirmArrive';
static get engineerUpdateWorkOrderUrl=> '$_baseUrl/ServiceRequest/EngineerUpdateWorkOrder';
static get getWorkOrderByIdUrl=> '$_baseUrl/ServiceRequest/GetWorkOrderById';
static get getQrCodeUrl=> '$_baseUrl/ServiceRequest/GetQRCode';
1 year ago
static get deleteActivitySparePartUrl=> '$_baseUrl/ServiceRequest/DeleteActivitySparePart';
static get deleteActivityMaintenanceUrl=> '$_baseUrl/ServiceRequest/DeleteActivityMaintenance';
1 year ago
static get createActivitySparePartUrl=> '$_baseUrl/ServiceRequest/CreateActivitySparePart';
static get createActivityMaintenanceUrl=> '$_baseUrl/ServiceRequest/CreateActivityMaintenance';
1 year ago
static get createActivityAssetToBeRetiredUrl=> '$_baseUrl/ServiceRequest/CreateActivityAssetToBeRetired';
1 year ago
static get createWorkOrderUrl=> '$_baseUrl/ServiceRequest/CreateWorkOrder';
1 year ago
static get updateActivitySparePartUrl=> '$_baseUrl/ServiceRequest/UpdateActivitySparePart';
static get updateActivityMaintenanceUrl=> '$_baseUrl/ServiceRequest/UpdateActivityMaintenance';
static get assignEngineerToWorkOrderUrl=> '$_baseUrl/ServiceRequest/AssignEngineerToWorkOrder';
static get getArrivalVerificationTypeUrl=> '$_baseUrl/ArrivalVerificationType/GetArrivalVerificationType';
static get sendOtpUrl=> '$_baseUrl/SmsNotification/SendOTP/';
static get verifyOtpUrl=> '$_baseUrl/SmsNotification/VerifyOTP/';
3 years ago
// 08051
static get getServiceRequests => "$_baseUrl/CallRequest/GetCallRequests"; // get
static get getServiceRequestById => "$_baseUrl/CallRequest/GetCallRequestById"; // get
3 years ago
static get getServiceRequestThrough => "$_baseUrl/Lookups/GetLookup?lookupEnum=603"; // get
static get getServiceLoanAvailability => "$_baseUrl/Lookups/GetLookup?lookupEnum=4"; // get
static get getServiceFirstAction => "$_baseUrl/Lookups/GetLookup?lookupEnum=700"; // get
3 years ago
static get getServiceRequestTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=604"; // get
static get getServiceRequestStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=503";
2 years ago
static get getRepairLocation => "$_baseUrl/Lookups/GetLookup?lookupEnum=504";
2 years ago
static get equipmentStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=601";
static get commissioningStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=601";
2 years ago
static get getDateOperators => "$_baseUrl/Lookups/GetLookup?lookupEnum=200";
2 years ago
static get getMaintenanceSituation => "$_baseUrl/Lookups/GetLookup?lookupEnum=502";
3 years ago
3 years ago
static get getPreventiveMaintenanceVisits => "$_baseUrl/return/user/calibrations"; // get
static get updatePreventiveMaintenanceVisits => "$_baseUrl/Visit/UpdateVisits"; // get
3 years ago
3 years ago
static get getRegularVisits => "$_baseUrl/Visit/GetVisits"; // get
static get updateRegularVisits => "$_baseUrl/Visit/UpdateVisits"; // get
3 years ago
3 years ago
static get getSingleServiceRequest => "$_baseUrl/return/call/information"; // get
static get getSuppliersAutoComplete => "$_baseUrl/Supplier/GetSuppliersAutoComplete";
static get addSupplierEngineer => "$_baseUrl/Supplier/AddSupplierEngineer";
2 years ago
static get getSystemNotifications => "$_baseUrl/SystemNotification/GetSystemNotifications"; // get
3 years ago
static get getRecentNotifications => "$_baseUrl/return/user/recent/notification"; // get
static get createRequest => "$_baseUrl/CallRequest/AddCallRequest"; // get
static get CheckIfAssetHasAnotherServiceRequest => "$_baseUrl/CallRequest/CheckIfAssetHasAnotherServiceRequest"; // get
3 years ago
static get createReport => "$_baseUrl/handle/create/report/issue"; // get
3 years ago
static get updateRequestDate => "$_baseUrl/CallRequest/UpdateCallRequest"; // get
3 years ago
// service report
3 years ago
static get createServiceReport => "$_baseUrl/WorkOrder/AddWorkOrder"; // get
static get updateServiceReport => "$_baseUrl/WorkOrder/UpdateWorkOrder"; // get
3 years ago
static get getServiceReport => "$_baseUrl/WorkOrder/GetWorkOrderById"; // get
static get createDuplicatedReport => "$_baseUrl/handle/duplicate/request"; // get
static get searchWorkOrders => "$_baseUrl/WorkOrder/SearchWorkOrders";
2 years ago
static get getSubWorkerInfoAccordingToPreviousStep => "$_baseUrl/WorkOrder/GetDataPreviousStep";
3 years ago
static get getPpmReasons => "$_baseUrl/Lookups/GetLookup?lookupEnum=522"; // get for ppm po reason, in mobile there is no use of it.
static get getPpmAssetAvailability => "$_baseUrl/Lookups/GetLookup?lookupEnum=1205"; // get for ppm po reason, in mobile there is no use of it.
static get getPpmElectricalSafety => "$_baseUrl/Lookups/GetLookup?lookupEnum=480"; // get for ppm po reason, in mobile there is no use of it.
static get getPpmTaskStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=403"; // get for ppm po reason, in mobile there is no use of it.
static get getPpmService => "$_baseUrl/Lookups/GetLookup?lookupEnum=34"; // get for ppm po reason, in mobile there is no use of it.
static get getServiceReportReasons => "$_baseUrl/Lookups/GetLookupReason?lookupEnum=505";
1 year ago
static get getServiceReportRejectionReasons => "$_baseUrl/Lookups/GetLookup?lookupEnum=1303";
static get getServiceReportReasonsNew => "$_baseUrl/Lookups/GetLookupReasonNew?lookupEnum=505";
static get getServiceReportRetirementType => "$_baseUrl/Lookups/GetLookup?lookupEnum=415";
static get getServiceReportActivityStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=1302";
3 years ago
static get getServiceReportTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=501"; // get
static get getServiceReportTypesForWO => "$_baseUrl/Lookups/GetLookup?lookupEnum=34"; // get
3 years ago
static get getServiceReportStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=521"; // get
static get getServiceReportLastCalls => "$_baseUrl/WorkOrder/GetLookupCallLastSituationBasedOnCase"; // get
static get getAssetTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=500"; // get
static get getPersonRoles => "$_baseUrl/Lookups/GetLookup?lookupEnum=36"; // get
3 years ago
static get getPartNumber => "$_baseUrl/PartCatalog/GetPartAutoComplete"; // get
2 years ago
static get getServiceReportPriority => "$_baseUrl/Lookups/GetLookup?lookupEnum=4"; // get
3 years ago
static get getServiceReportDefectTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=601"; // get
static get getCallRequestForWorkOrder => "$_baseUrl/CallRequest/GetCallRequestForWorkOrder"; // get
1 year ago
static get attachmentBaseUrl => "https://atomsmdev.hmg.com/v2/mobile/Files/DownloadFile?fileName=";
3 years ago
//gas refill
3 years ago
static get getGasTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=606"; // get
// todo check edits with backend
static get getGasCylinderSize => "$_baseUrl/Lookups/GetLookup?lookupEnum=608"; // get
static get getGasCylinderType => "$_baseUrl/Lookups/GetLookup?lookupEnum=607"; // get
static get getGasStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=609"; // get
static get requestGasRefill => "$_baseUrl/GazRefill/AddGazRefill"; // get
static get updateGasRefill => "$_baseUrl/GazRefill/UpdateGazRefill"; // get
static get getGasRefill => "$_baseUrl/GazRefill/GetGazRefills"; // get
static get getGasRefillById => "$_baseUrl/GazRefill/GetGazRefillById"; // get
static get getGazRefillComments => "$_baseUrl/GazRefill/GetHistoryComments"; // get
static get addGazRefillComment => "$_baseUrl/GazRefill/AddHistoryComment"; // add
3 years ago
//device transfer
3 years ago
static get requestDeviceTransfer => "$_baseUrl/AssetTransfer/AddAssetTransfer"; // get
static get updateDeviceTransfer => "$_baseUrl/AssetTransfer/UpdateAssetTransfer"; // get
static get getDeviceTransfer => "$_baseUrl/AssetTransfer/GetAssetTransfers"; // get
static get getAssetTransferById => "$_baseUrl/AssetTransfer/GetAssetTransferById"; // get
static get getAssetTransferStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=406"; // get
3 years ago
// employee
3 years ago
static get getEmployees => "$_baseUrl/Lookups/GetLookup?lookupEnum=33"; // get
static get getEngineers => "$_baseUrl/Account/GetUserByRoleValue?value=R-6"; // get
static get getNurses => "$_baseUrl/Account/GetUserByRoleValue?value=R-7"; // get
static get getNursesBySiteId => "$_baseUrl/Account/GetUserByRoleValueSiteAndAssetGroupBySiteId?value=R-7"; // get
3 years ago
3 years ago
// pentry
3 years ago
static get getPentry => "$_baseUrl/return/pentry/details"; // get
static get updatePentry => "$_baseUrl/Visit/UpdateVisit"; // get
static get getPentryTaskStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=403"; // get
static get getPentryVisitStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=402"; // get
static get getPentryStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=401"; // get
3 years ago
// contacts
3 years ago
static get getPentryContacts => "$_baseUrl/handle/return/all/contacts"; // get
//comments
static get getComments => "$_baseUrl/CallRequest/GetHistoryComments"; // get
static get addComment => "$_baseUrl/CallRequest/AddHistoryComment"; // add
3 years ago
}