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

88 lines
4.9 KiB
Dart

3 years ago
class URLs {
3 years ago
URLs._();
static const host2 = "http://194.163.164.213/atoms/api";
3 years ago
static const host1 = "https://atomsuat.hmg.com"; // uat url
Merge remote-tracking branch 'atoms_main/main' into main_latest_merged # Conflicts: # lib/controllers/api_routes/urls.dart # lib/controllers/providers/api/departments_provider.dart # lib/controllers/providers/api/device_transfer_provider.dart # lib/controllers/providers/api/devices_provider.dart # lib/controllers/providers/api/gas_refill_provider.dart # lib/controllers/providers/api/hospitals_provider.dart # lib/controllers/providers/api/parts_provider.dart # lib/controllers/providers/api/regular_visits_provider.dart # lib/controllers/providers/api/service_requests_provider.dart # lib/controllers/providers/api/status_drop_down/employee/assigned_to_provider.dart # lib/controllers/providers/api/status_drop_down/gas_refill/gas_cylinder_size_provider.dart # lib/controllers/providers/api/status_drop_down/gas_refill/gas_status_provider.dart # lib/controllers/providers/api/status_drop_down/gas_refill/gas_types_provider.dart # lib/controllers/providers/api/status_drop_down/pentry/pentry_status_provider.dart # lib/controllers/providers/api/status_drop_down/pentry/pentry_task_status_provider.dart # lib/controllers/providers/api/status_drop_down/pentry/pentry_visit_status_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_report_defect_types_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_report_last_calls_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_report_priority_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_report_reasons_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_report_status_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_report_types_provider.dart # lib/controllers/providers/api/status_drop_down/report/service_types_provider.dart # lib/main.dart # lib/models/device/device.dart # lib/models/device/device_transfer.dart # lib/models/device/device_transfer_info.dart # lib/models/gas_refill/gas_refill_details.dart # lib/models/gas_refill/gas_refill_model.dart # lib/models/lookup.dart # lib/models/pantry/calibration_tools.dart # lib/models/pantry/lookups/contact_person.dart # lib/models/pantry/lookups/contact_title.dart # lib/models/pantry/pentry.dart # lib/models/pantry/pm_kit.dart # lib/models/pantry/ppm_check_list.dart # lib/models/service_report.dart # lib/models/service_request/service_request.dart # lib/models/user.dart # lib/models/visits/visit.dart # lib/models/visits/visits_group.dart # lib/views/app_style/colors.dart # lib/views/pages/login.dart # lib/views/pages/register.dart # lib/views/pages/splash_screen.dart # lib/views/pages/user/land_page.dart # lib/views/pages/user/requests/create_request.dart # lib/views/pages/user/requests/report/create_service_report.dart # lib/views/pages/user/requests/report/edit_service_report.dart # lib/views/pages/user/requests/request_details.dart # lib/views/pages/user/visits/pantry/edit_pentry.dart # lib/views/pages/user/visits/preventive_maintenance_visits_page.dart # lib/views/pages/user/visits/regular_visits_page.dart # lib/views/pages/user/visits/update_visits_group_sheet.dart # lib/views/pages/user/visits/visit_details.dart # lib/views/widgets/app_text_form_field.dart # lib/views/widgets/buttons/app_back_button.dart # lib/views/widgets/departments/department_button.dart # lib/views/widgets/drawer/drawer_item.dart # lib/views/widgets/equipment/auto_complete_devices_field.dart # lib/views/widgets/equipment/device_button.dart # lib/views/widgets/equipment/single_device_picker.dart # lib/views/widgets/hospitals/hospital_auto_complete_field.dart # lib/views/widgets/hospitals/hospital_button.dart # lib/views/widgets/images/multi_image_picker.dart # lib/views/widgets/loaders/loading_manager.dart # lib/views/widgets/parts/auto_complete_parts_field.dart # lib/views/widgets/pentry/auto_complete_fields/auto_complete_devices_field.dart # lib/views/widgets/pentry/pentry_calibration_tool_form.dart # lib/views/widgets/pentry/pentry_info_form.dart # lib/views/widgets/pentry/pentry_pm_kit_form.dart # lib/views/widgets/requests/service_request_update_dialog.dart # lib/views/widgets/search/service_request_search_bar.dart # lib/views/widgets/search/visits_search_bar.dart # lib/views/widgets/sound/record_sound.dart # lib/views/widgets/sound/sound_player.dart # lib/views/widgets/speech_to_text/speech_to_text.dart # lib/views/widgets/status/employee/assigned_to_mune.dart # lib/views/widgets/status/multi_status_menu.dart # lib/views/widgets/status/report/service_status.dart # lib/views/widgets/status/single_status_menu.dart # lib/views/widgets/timer/app_timer.dart # lib/views/widgets/visits/visit_item.dart # pubspec.yaml
3 years ago
3 years ago
// static const host1 = "http://109.123.243.118:9000";
3 years ago
static String _baseUrl = "$_host/mobile";
static String _host = host1;
set host(String value) => _host = value;
3 years ago
static String getFileUrl(String file) => file == null || file.isEmpty ? null : "$_host/attachment/$file";
3 years ago
// API Routes
3 years ago
static get login => "$_baseUrl/MobileAuth/Login"; // post
static get register => "$_baseUrl/handle/create/user"; // post
static get updateProfile => "$_baseUrl/update/user/profile"; // post
static get getHospitals => "$_baseUrl/Customer/GetCustomers"; // get
static get getDepartments => "$_baseUrl/Customer/GetDepartmentLookup"; // get
static get getEquipment => "$_baseUrl/Asset/GetAssets"; // get ?client=208051
static get getModels => "$_baseUrl/ModelDefinition/GetModelDefinitionAsset"; // get ?client=2
// 08051
static get getServiceRequests => "$_baseUrl/CallRequest/GetCallRequests"; // get
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";
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 getNotifications => "$_baseUrl/return/user/notification"; // get
static get getRecentNotifications => "$_baseUrl/return/user/recent/notification"; // get
static get createRequest => "$_baseUrl/CallRequest/AddCallRequest"; // get
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
3 years ago
3 years ago
static get getServiceReportReasons => "$_baseUrl/Lookups/GetLookup?lookupEnum=522"; // get
3 years ago
static get getServiceReportTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=501"; // get
3 years ago
static get getServiceReportStatus => "$_baseUrl/Lookups/GetLookup?lookupEnum=521"; // get
static get getServiceReportLastCalls => "$_baseUrl/Lookups/GetLookup?lookupEnum=520"; // get
3 years ago
static get getAssetTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=28"; // get
3 years ago
static get getPartNumber => "$_baseUrl/PartCatalog/GetPartAutoComplete"; // get
static get getServiceReportPriority => "$_baseUrl/Lookups/GetLookup?lookupEnum=602"; // get
static get getServiceReportDefectTypes => "$_baseUrl/Lookups/GetLookup?lookupEnum=601"; // get
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
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
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
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
3 years ago
}