vms-nest-prisma-api-document 1012.0.0 → 1014.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{bookmark_service-DgvbWhS0.d.ts → bookmark_service-GDSTht_e.d.ts} +3197 -2367
- package/dist/core/Enums.d.ts +12 -1
- package/dist/core/Enums.js +13 -0
- package/dist/services/account/bookmark_service.d.ts +1 -1
- package/dist/services/account/invoice_service.d.ts +1 -1
- package/dist/services/account/notification_preferences.service.d.ts +1 -1
- package/dist/services/account/report_preferences.service.d.ts +1 -1
- package/dist/services/account/ticket_service.d.ts +1 -1
- package/dist/services/core/cronjobs.service.d.ts +12 -12
- package/dist/services/core/external_api.service.d.ts +10 -10
- package/dist/services/fleet/breakdown_management/breakdown_management_service.d.ts +6 -0
- package/dist/services/fleet/breakdown_management/breakdown_management_service.js +580 -0
- package/dist/services/fleet/bus_mangement/bus_stop.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/calendar.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/day_run.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/master_route.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/master_schedule.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/notice_board.d.ts +1 -1
- package/dist/services/fleet/bus_mangement/student.d.ts +1 -1
- package/dist/services/fleet/document_management/document_management_service.d.ts +596 -0
- package/dist/services/fleet/document_management/document_management_service.js +555 -0
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_daily_summary_service.js +0 -4
- package/dist/services/fleet/fuel_management/fleet_fuel_refill_service.d.ts +1 -1
- package/dist/services/fleet/fuel_management/fleet_fuel_removal_service.d.ts +1 -1
- package/dist/services/fleet/incident_management/incident_management_service.d.ts +1 -1
- package/dist/services/fleet/incident_management/incident_management_service.js +136 -213
- package/dist/services/fleet/inspection_management/fleet_inspection_form_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_form_service.js +10 -4
- package/dist/services/fleet/inspection_management/fleet_inspection_management_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_management_service.js +57 -68
- package/dist/services/fleet/inspection_management/fleet_inspection_schedule_service.d.ts +1 -1
- package/dist/services/fleet/inspection_management/fleet_inspection_schedule_service.js +5 -12
- package/dist/services/fleet/issue_management/issue_management_service.d.ts +1 -1
- package/dist/services/fleet/issue_management/issue_management_service.js +130 -130
- package/dist/services/fleet/service_management/fleet_service_schedule_service.d.ts +1 -1
- package/dist/services/fleet/service_management/fleet_service_schedule_service.js +4 -9
- package/dist/services/fleet/service_management/fleet_service_service.d.ts +6 -0
- package/dist/services/fleet/service_management/{fleet_service_management_service.js → fleet_service_service.js} +186 -188
- package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_fuel_station.js +51 -44
- package/dist/services/fleet/vendor_management/fleet_vendor_service.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service.js +262 -279
- package/dist/services/fleet/vendor_management/fleet_vendor_service_center.d.ts +1 -1
- package/dist/services/fleet/vendor_management/fleet_vendor_service_center.js +53 -43
- package/dist/services/fleet/workshop_management/fleet_workshop_service.d.ts +6 -0
- package/dist/services/fleet/workshop_management/fleet_workshop_service.js +347 -0
- package/dist/services/gps/features/geofence/gps_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/gps_geofence_transaction_summary_service.d.ts +1 -1
- package/dist/services/gps/features/geofence/trip_geofence_to_geofence_service.d.ts +1 -1
- package/dist/services/gps/features/gps_live_track_share_link_service.d.ts +1 -1
- package/dist/services/gps/features/gps_track_history_share_link_service.d.ts +1 -1
- package/dist/services/gps/reports/gps_reports_mongo_service.d.ts +46 -46
- package/dist/services/main/devices/master_device_service.d.ts +1 -1
- package/dist/services/main/drivers/master_driver_service.d.ts +1 -1
- package/dist/services/main/sims/master_sim_service.d.ts +1 -1
- package/dist/services/main/users/auth_service.d.ts +1 -1
- package/dist/services/main/users/user_admin_service.d.ts +1 -1
- package/dist/services/main/users/user_organisation_service.d.ts +1 -1
- package/dist/services/main/users/user_service.d.ts +1 -1
- package/dist/services/main/vehicle/childs/vehicle_odometer_history.d.ts +1 -1
- package/dist/services/main/vehicle/master_vehicle_service.d.ts +1 -1
- package/dist/services/master/bus/master_class_service.d.ts +1 -1
- package/dist/services/master/bus/master_program_service.d.ts +1 -1
- package/dist/services/master/bus/master_relationship_service.d.ts +1 -1
- package/dist/services/master/bus/master_section_service.d.ts +1 -1
- package/dist/services/master/bus/master_semester_service.d.ts +1 -1
- package/dist/services/master/bus/master_stream_service.d.ts +1 -1
- package/dist/services/master/bus/master_year_service.d.ts +1 -1
- package/dist/services/master/cache_reset/master_reset_cache_service.d.ts +1 -1
- package/dist/services/master/device/master_device_manufacturer_service.d.ts +1 -1
- package/dist/services/master/device/master_device_model_service.d.ts +1 -1
- package/dist/services/master/device/master_device_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_name_service.d.ts +1 -1
- package/dist/services/master/expense/master_expense_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_fuel_company_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_document_type_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_tag_service.d.ts +1 -1
- package/dist/services/master/expense/master_vendor_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_breakdown_type_service.d.ts +6 -0
- package/dist/services/master/fleet/master_fleet_breakdown_type_service.js +315 -0
- package/dist/services/master/fleet/master_fleet_incident_severity_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_incident_type_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_insurance_claim_status_service.d.ts +1 -1
- package/dist/services/master/fleet/master_fleet_service_part_service.d.ts +6 -0
- package/dist/services/master/fleet/master_fleet_service_part_service.js +332 -0
- package/dist/services/master/fleet/master_fleet_service_task_service.d.ts +1 -1
- package/dist/services/master/main/master_main_country_service.d.ts +1 -1
- package/dist/services/master/main/master_main_currency_service.d.ts +1 -1
- package/dist/services/master/main/master_main_date_format_service.d.ts +1 -1
- package/dist/services/master/main/master_main_industry_service.d.ts +1 -1
- package/dist/services/master/main/master_main_landmark_service.d.ts +1 -1
- package/dist/services/master/main/master_main_language_service.d.ts +1 -1
- package/dist/services/master/main/master_main_sim_provider_service.d.ts +1 -1
- package/dist/services/master/main/master_main_state_service.d.ts +1 -1
- package/dist/services/master/main/master_main_timezone_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_distance_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_mileage_service.d.ts +1 -1
- package/dist/services/master/main/master_main_unit_volume_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_branch_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_color_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_group_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_sub_company_service.d.ts +1 -1
- package/dist/services/master/organisation/organisation_tag_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_sub_category_service.d.ts +1 -1
- package/dist/services/master/spare_part/master_spare_part_unit_service.d.ts +1 -1
- package/dist/services/master/trip/master_trip_party_type_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_grade_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_make_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_model_service.d.ts +1 -1
- package/dist/services/master/tyre/master_tyre_model_service.js +32 -0
- package/dist/services/master/user/master_user_role_service.d.ts +1 -1
- package/dist/services/master/user/master_user_status_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_associated_to_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_document_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_removal_reason_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_fuel_unit_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_make_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_ownership_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_status_type_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_sub_model_service.d.ts +1 -1
- package/dist/services/master/vehicle/master_vehicle_type_service.d.ts +1 -1
- package/dist/services/website/exclusive_feature_access.d.ts +1 -1
- package/package.json +1 -1
- package/dist/services/fleet/service_management/fleet_service_management_service.d.ts +0 -6
|
@@ -259,6 +259,18 @@ var FleetVendorAddressLabel = /* @__PURE__ */ ((FleetVendorAddressLabel2) => {
|
|
|
259
259
|
FleetVendorAddressLabel2["OTHER"] = "OTHER";
|
|
260
260
|
return FleetVendorAddressLabel2;
|
|
261
261
|
})(FleetVendorAddressLabel || {});
|
|
262
|
+
var BankAccountType = /* @__PURE__ */ ((BankAccountType2) => {
|
|
263
|
+
BankAccountType2["SavingsAccount"] = "SavingsAccount";
|
|
264
|
+
BankAccountType2["CurrentAccount"] = "CurrentAccount";
|
|
265
|
+
BankAccountType2["BusinessAccount"] = "BusinessAccount";
|
|
266
|
+
BankAccountType2["SalaryAccount"] = "SalaryAccount";
|
|
267
|
+
BankAccountType2["TrustAccount"] = "TrustAccount";
|
|
268
|
+
BankAccountType2["ForeignCurrencyAccount"] = "ForeignCurrencyAccount";
|
|
269
|
+
BankAccountType2["CashCreditAccount"] = "CashCreditAccount";
|
|
270
|
+
BankAccountType2["OverdraftAccount"] = "OverdraftAccount";
|
|
271
|
+
BankAccountType2["Other"] = "Other";
|
|
272
|
+
return BankAccountType2;
|
|
273
|
+
})(BankAccountType || {});
|
|
262
274
|
|
|
263
275
|
// src/zod_utils/zod_base_schema.ts
|
|
264
276
|
var OrderBySchema = z2.array(
|
|
@@ -322,80 +334,129 @@ var MongoBaseQuerySchema = z2.object({
|
|
|
322
334
|
var URL = "fleet/vendor_management/fleet_vendor";
|
|
323
335
|
var ENDPOINTS = {
|
|
324
336
|
// AWS S3 PRESIGNED
|
|
325
|
-
vendor_logo_presigned_url: (
|
|
326
|
-
vendor_contact_person_logo_presigned_url: (
|
|
337
|
+
vendor_logo_presigned_url: (file_name) => `${URL}/vendor_logo_presigned_url/${file_name}`,
|
|
338
|
+
vendor_contact_person_logo_presigned_url: (file_name) => `${URL}/vendor_contact_person_logo_presigned_url/${file_name}`,
|
|
327
339
|
vendor_document_file_presigned_url: `${URL}/vendor_document_file_presigned_url`,
|
|
340
|
+
// File Uploads
|
|
328
341
|
update_vendor_logo: (id) => `${URL}/update_vendor_logo/${id}`,
|
|
329
|
-
|
|
342
|
+
remove_vendor_logo: (id) => `${URL}/remove_vendor_logo/${id}`,
|
|
330
343
|
update_vendor_contact_person_logo: (id) => `${URL}/update_vendor_contact_person_logo/${id}`,
|
|
331
|
-
|
|
332
|
-
// File Uploads
|
|
344
|
+
remove_vendor_contact_person_logo: (id) => `${URL}/remove_vendor_contact_person_logo/${id}`,
|
|
333
345
|
create_vendor_document_file: `${URL}/create_vendor_document_file`,
|
|
334
346
|
remove_vendor_document_file: (id) => `${URL}/remove_vendor_document_file/${id}`,
|
|
335
347
|
// FleetVendor APIs
|
|
336
|
-
find: `${URL}/search`,
|
|
348
|
+
find: `${URL}/fleet_vendor/search`,
|
|
349
|
+
create: `${URL}/fleet_vendor`,
|
|
350
|
+
update: (id) => `${URL}/fleet_vendor/${id}`,
|
|
351
|
+
delete: (id) => `${URL}/fleet_vendor/${id}`,
|
|
337
352
|
vendor_dashboard: `${URL}/vendor_dashboard`,
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
353
|
+
// FleetVendorContactPerson APIs
|
|
354
|
+
find_contact_person: `${URL}/vendor_contact_person/search`,
|
|
355
|
+
create_contact_person: `${URL}/vendor_contact_person`,
|
|
356
|
+
update_contact_person: (id) => `${URL}/vendor_contact_person/${id}`,
|
|
357
|
+
delete_contact_person: (id) => `${URL}/vendor_contact_person/${id}`,
|
|
358
|
+
// FleetVendorDocument APIs
|
|
359
|
+
find_document: `${URL}/vendor_document/search`,
|
|
360
|
+
create_document: `${URL}/vendor_document`,
|
|
361
|
+
update_document: (id) => `${URL}/vendor_document/${id}`,
|
|
362
|
+
delete_document: (id) => `${URL}/vendor_document/${id}`,
|
|
341
363
|
// FleetVendorAddress APIs
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
update_address: (id) => `${URL}/
|
|
345
|
-
|
|
364
|
+
find_address: `${URL}/vendor_address/search`,
|
|
365
|
+
create_address: `${URL}/vendor_address`,
|
|
366
|
+
update_address: (id) => `${URL}/vendor_address/${id}`,
|
|
367
|
+
delete_address: (id) => `${URL}/vendor_address/${id}`,
|
|
346
368
|
// FleetVendorBankAccount APIs
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
update_bank_account: (id) => `${URL}/
|
|
350
|
-
|
|
351
|
-
// FleetVendorContactPersons APIs
|
|
352
|
-
create_contact_person: `${URL}/contact_person`,
|
|
353
|
-
find_contact_person: `${URL}/contact_person/search`,
|
|
354
|
-
update_contact_person: (id) => `${URL}/contact_person/${id}`,
|
|
355
|
-
remove_contact_person: (id) => `${URL}/contact_person/${id}`,
|
|
369
|
+
find_bank_account: `${URL}/vendor_bank_account/search`,
|
|
370
|
+
create_bank_account: `${URL}/vendor_bank_account`,
|
|
371
|
+
update_bank_account: (id) => `${URL}/vendor_bank_account/${id}`,
|
|
372
|
+
delete_bank_account: (id) => `${URL}/vendor_bank_account/${id}`,
|
|
356
373
|
// FleetVendorReview APIs
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
update_review: (id) => `${URL}/
|
|
360
|
-
|
|
361
|
-
//
|
|
362
|
-
create_document: `${URL}/document`,
|
|
363
|
-
find_document: `${URL}/document/search`,
|
|
364
|
-
update_document: (id) => `${URL}/document/${id}`,
|
|
365
|
-
remove_document: (id) => `${URL}/document/${id}`,
|
|
366
|
-
// Cache APIs
|
|
374
|
+
find_review: `${URL}/vendor_review/search`,
|
|
375
|
+
create_review: `${URL}/vendor_review`,
|
|
376
|
+
update_review: (id) => `${URL}/vendor_review/${id}`,
|
|
377
|
+
delete_review: (id) => `${URL}/vendor_review/${id}`,
|
|
378
|
+
// FleetVendor Cache
|
|
367
379
|
cache_simple: (organisation_id) => `${URL}/cache_simple/${organisation_id}`
|
|
368
380
|
};
|
|
369
381
|
var FleetVendorLogoSchema = z3.object({
|
|
370
382
|
// Profile Image/Logo
|
|
371
|
-
logo_url: stringMandatory("Logo URL",
|
|
372
|
-
logo_key: stringMandatory("Logo Key",
|
|
373
|
-
logo_name: stringMandatory("Logo Name",
|
|
383
|
+
logo_url: stringMandatory("Logo URL", 1, 300),
|
|
384
|
+
logo_key: stringMandatory("Logo Key", 1, 300),
|
|
385
|
+
logo_name: stringMandatory("Logo Name", 1, 300)
|
|
374
386
|
});
|
|
375
|
-
var
|
|
387
|
+
var FleetVendorContactPersonLogoSchema = z3.object({
|
|
376
388
|
// Profile Image/Logo
|
|
377
|
-
image_url: stringMandatory("Image URL",
|
|
378
|
-
image_key: stringMandatory("Image Key",
|
|
379
|
-
image_name: stringMandatory("Image Name",
|
|
389
|
+
image_url: stringMandatory("Image URL", 1, 300),
|
|
390
|
+
image_key: stringMandatory("Image Key", 1, 300),
|
|
391
|
+
image_name: stringMandatory("Image Name", 1, 300)
|
|
380
392
|
});
|
|
381
393
|
var FleetVendorDocumentFileSchema = BaseFileSchema.extend({
|
|
382
394
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
383
395
|
// Single-Selection -> UserOrganisation
|
|
396
|
+
user_id: single_select_optional("User"),
|
|
397
|
+
// Single-Selection -> User
|
|
384
398
|
fleet_vendor_document_id: single_select_mandatory("FleetVendorDocument")
|
|
385
399
|
// Single-Selection -> FleetVendorDocument
|
|
386
400
|
});
|
|
401
|
+
var FleetVendorSchema = z3.object({
|
|
402
|
+
// Relations - Parent
|
|
403
|
+
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
404
|
+
// Single-Selection -> UserOrganisation
|
|
405
|
+
user_id: single_select_optional("User"),
|
|
406
|
+
// Single-Selection -> User
|
|
407
|
+
// Profile Image/Logo
|
|
408
|
+
logo_url: stringOptional("Logo URL", 0, 300),
|
|
409
|
+
logo_key: stringOptional("Logo Key", 0, 300),
|
|
410
|
+
logo_name: stringOptional("Logo Name", 0, 300),
|
|
411
|
+
// Main Field Details
|
|
412
|
+
vendor_name: stringMandatory("Vendor Name", 3, 100),
|
|
413
|
+
vendor_code: stringOptional("Vendor Code", 0, 100),
|
|
414
|
+
business_mobile: stringOptional("Business Mobile", 0, 15),
|
|
415
|
+
business_email: stringOptional("Business Email", 0, 100),
|
|
416
|
+
// Business Details
|
|
417
|
+
gst_number: stringOptional("GST Number", 0, 15),
|
|
418
|
+
pan_number: stringOptional("PAN Number", 0, 10),
|
|
419
|
+
tax_id_number: stringOptional("Tax ID Number", 0, 50),
|
|
420
|
+
vat_number: stringOptional("VAT Number", 0, 50),
|
|
421
|
+
business_registration_number: stringOptional("Business Registration Number", 0, 50),
|
|
422
|
+
// Financial Details
|
|
423
|
+
payment_terms: stringOptional("Payment Terms", 0, 2e3),
|
|
424
|
+
financial_notes: stringOptional("Financial Notes", 0, 2e3),
|
|
425
|
+
// Additional Information
|
|
426
|
+
additional_details_1: stringOptional("Additional Details 1", 0, 2e3),
|
|
427
|
+
additional_details_2: stringOptional("Additional Details 2", 0, 2e3),
|
|
428
|
+
additional_details_3: stringOptional("Additional Details 3", 0, 2e3),
|
|
429
|
+
vendor_type_ids: multi_select_optional("MasterVendorType"),
|
|
430
|
+
// Multi selection -> MasterVendorType
|
|
431
|
+
vendor_tag_ids: multi_select_optional("MasterVendorTag"),
|
|
432
|
+
// Multi selection -> MasterVendorTag
|
|
433
|
+
// Metadata
|
|
434
|
+
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
435
|
+
});
|
|
436
|
+
var FleetVendorQuerySchema = BaseQuerySchema.extend({
|
|
437
|
+
// Self Table
|
|
438
|
+
vendor_ids: multi_select_optional("FleetVendor"),
|
|
439
|
+
// Multi-Selection -> FleetVendor
|
|
440
|
+
// Relations - Parent
|
|
441
|
+
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
442
|
+
// Multi-Selection -> UserOrganisation
|
|
443
|
+
user_ids: multi_select_optional("User"),
|
|
444
|
+
// Multi-Selection -> User
|
|
445
|
+
vendor_type_ids: multi_select_optional("MasterVendorType"),
|
|
446
|
+
// Multi-Selection -> MasterVendorType
|
|
447
|
+
vendor_tag_ids: multi_select_optional("MasterVendorTag")
|
|
448
|
+
// Multi-Selection -> MasterVendorTag
|
|
449
|
+
});
|
|
387
450
|
var FleetVendorAddressSchema = z3.object({
|
|
388
451
|
// Relations - Parent
|
|
389
452
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
390
453
|
// Single-Selection -> UserOrganisation
|
|
454
|
+
user_id: single_select_optional("User"),
|
|
455
|
+
// Single-Selection -> User
|
|
391
456
|
vendor_id: single_select_mandatory("FleetVendor"),
|
|
392
457
|
// Single-Selection -> FleetVendor
|
|
393
458
|
// Main Field Details
|
|
394
|
-
vendor_address_label: enumMandatory(
|
|
395
|
-
"Fleet Vendor Address Label",
|
|
396
|
-
FleetVendorAddressLabel,
|
|
397
|
-
"OTHER" /* OTHER */
|
|
398
|
-
),
|
|
459
|
+
vendor_address_label: enumMandatory("Fleet Vendor Address Label", FleetVendorAddressLabel, "OTHER" /* OTHER */),
|
|
399
460
|
// Address Details
|
|
400
461
|
address_line1: stringOptional("Address Line 1", 0, 150),
|
|
401
462
|
address_line2: stringOptional("Address Line 2", 0, 150),
|
|
@@ -417,33 +478,34 @@ var FleetVendorAddressSchema = z3.object({
|
|
|
417
478
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
418
479
|
});
|
|
419
480
|
var FleetVendorAddressQuerySchema = BaseQuerySchema.extend({
|
|
420
|
-
//
|
|
481
|
+
// Self Table
|
|
421
482
|
vendor_address_ids: multi_select_optional("FleetVendorAddress"),
|
|
422
483
|
// Multi-Selection -> FleetVendorAddress
|
|
423
|
-
//
|
|
484
|
+
// Relations - Parent
|
|
424
485
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
425
486
|
// Multi-Selection -> UserOrganisation
|
|
487
|
+
user_ids: multi_select_optional("User"),
|
|
488
|
+
// Multi-Selection -> User
|
|
426
489
|
vendor_ids: multi_select_optional("FleetVendor"),
|
|
427
490
|
// Multi-Selection -> FleetVendor
|
|
428
|
-
vendor_address_label: enumArrayOptional(
|
|
429
|
-
|
|
430
|
-
FleetVendorAddressLabel,
|
|
431
|
-
getAllEnums(FleetVendorAddressLabel)
|
|
432
|
-
),
|
|
433
|
-
// enums
|
|
491
|
+
vendor_address_label: enumArrayOptional("Vendor Address Label", FleetVendorAddressLabel, getAllEnums(FleetVendorAddressLabel)),
|
|
492
|
+
// Enums
|
|
434
493
|
is_default: enumArrayOptional("Is Default", YesNo, getAllEnums(YesNo))
|
|
435
494
|
});
|
|
436
495
|
var FleetVendorBankAccountSchema = z3.object({
|
|
437
496
|
// Relations - Parent
|
|
438
497
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
439
498
|
// Single-Selection -> UserOrganisation
|
|
499
|
+
user_id: single_select_optional("User"),
|
|
500
|
+
// Single-Selection -> User
|
|
440
501
|
vendor_id: single_select_mandatory("FleetVendor"),
|
|
441
502
|
// Single-Selection -> FleetVendor
|
|
442
503
|
// Main Field Details
|
|
443
504
|
bank_name: stringOptional("Bank Name", 0, 100),
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
505
|
+
branch_name: stringOptional("Branch Name", 0, 100),
|
|
506
|
+
account_holder_name: stringOptional("Account Holder Name", 0, 100),
|
|
507
|
+
account_number: stringMandatory("Account Number", 1, 50),
|
|
508
|
+
account_type: enumMandatory("Account Type", BankAccountType, "Other" /* Other */),
|
|
447
509
|
ifsc_code: stringOptional("IFSC Code", 0, 20),
|
|
448
510
|
swift_code: stringOptional("Swift Code", 0, 20),
|
|
449
511
|
iban_number: stringOptional("IBAN Number", 0, 34),
|
|
@@ -454,21 +516,26 @@ var FleetVendorBankAccountSchema = z3.object({
|
|
|
454
516
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
455
517
|
});
|
|
456
518
|
var FleetVendorBankAccountQuerySchema = BaseQuerySchema.extend({
|
|
457
|
-
//
|
|
519
|
+
// Self Table
|
|
458
520
|
vendor_bank_account_ids: multi_select_optional("FleetVendorBankAccount"),
|
|
459
521
|
// Multi-Selection -> FleetVendorBankAccount
|
|
460
|
-
//
|
|
522
|
+
// Relations - Parent
|
|
461
523
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
462
524
|
// Multi-Selection -> UserOrganisation
|
|
525
|
+
user_ids: multi_select_optional("User"),
|
|
526
|
+
// Multi-Selection -> User
|
|
463
527
|
vendor_ids: multi_select_optional("FleetVendor"),
|
|
464
528
|
// Multi-Selection -> FleetVendor
|
|
465
|
-
//
|
|
466
|
-
is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo))
|
|
529
|
+
// Enums
|
|
530
|
+
is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo)),
|
|
531
|
+
account_type: enumArrayOptional("Account Type", BankAccountType, getAllEnums(BankAccountType))
|
|
467
532
|
});
|
|
468
|
-
var
|
|
533
|
+
var FleetVendorContactPersonSchema = z3.object({
|
|
469
534
|
// Relations - Parent
|
|
470
535
|
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
471
536
|
// Single-Selection -> UserOrganisation
|
|
537
|
+
user_id: single_select_optional("User"),
|
|
538
|
+
// Single-Selection -> User
|
|
472
539
|
vendor_id: single_select_mandatory("FleetVendor"),
|
|
473
540
|
// Single-Selection -> FleetVendor
|
|
474
541
|
// Profile Image/Logo
|
|
@@ -489,16 +556,18 @@ var FleetVendorContactPersonsSchema = z3.object({
|
|
|
489
556
|
// Metadata
|
|
490
557
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
491
558
|
});
|
|
492
|
-
var
|
|
493
|
-
//
|
|
494
|
-
contact_person_ids: multi_select_optional("
|
|
495
|
-
// Multi-Selection ->
|
|
496
|
-
//
|
|
559
|
+
var FleetVendorContactPersonQuerySchema = BaseQuerySchema.extend({
|
|
560
|
+
// Self Table
|
|
561
|
+
contact_person_ids: multi_select_optional("FleetVendorContactPerson"),
|
|
562
|
+
// Multi-Selection -> FleetVendorContactPerson
|
|
563
|
+
// Relations - Parent
|
|
497
564
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
498
565
|
// Multi-Selection -> UserOrganisation
|
|
566
|
+
user_ids: multi_select_optional("User"),
|
|
567
|
+
// Multi-Selection -> User
|
|
499
568
|
vendor_ids: multi_select_optional("FleetVendor"),
|
|
500
569
|
// Multi-Selection -> FleetVendor
|
|
501
|
-
//
|
|
570
|
+
// Enums
|
|
502
571
|
is_primary: enumArrayOptional("Is Primary", YesNo, getAllEnums(YesNo))
|
|
503
572
|
});
|
|
504
573
|
var FleetVendorReviewSchema = z3.object({
|
|
@@ -510,18 +579,20 @@ var FleetVendorReviewSchema = z3.object({
|
|
|
510
579
|
user_id: single_select_optional("User"),
|
|
511
580
|
// Single-Selection -> User
|
|
512
581
|
// Main Field Details
|
|
513
|
-
rating: numberMandatory("Rating"),
|
|
582
|
+
rating: numberMandatory("Rating", 1, 5),
|
|
514
583
|
rating_comments: stringOptional("Rating Comments", 0, 2e3),
|
|
515
584
|
// Metadata
|
|
516
585
|
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
517
586
|
});
|
|
518
587
|
var FleetVendorReviewQuerySchema = BaseQuerySchema.extend({
|
|
519
|
-
//
|
|
588
|
+
// Self Table
|
|
520
589
|
vendor_review_ids: multi_select_optional("FleetVendorReview"),
|
|
521
590
|
// Multi-Selection -> FleetVendorReview
|
|
522
|
-
//
|
|
591
|
+
// Relations - Parent
|
|
523
592
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
524
593
|
// Multi-Selection -> UserOrganisation
|
|
594
|
+
user_ids: multi_select_optional("User"),
|
|
595
|
+
// Multi-Selection -> User
|
|
525
596
|
vendor_ids: multi_select_optional("FleetVendor")
|
|
526
597
|
// Multi-Selection -> FleetVendor
|
|
527
598
|
});
|
|
@@ -536,149 +607,70 @@ var FleetVendorDocumentSchema = z3.object({
|
|
|
536
607
|
document_type_id: single_select_mandatory("MasterVendorDocumentType"),
|
|
537
608
|
// Single-Selection -> MasterVendorDocumentType
|
|
538
609
|
// Main Field Details
|
|
539
|
-
document_name:
|
|
610
|
+
document_name: stringMandatory("Document Name", 3, 150),
|
|
540
611
|
document_number: stringOptional("Document Number", 0, 150),
|
|
541
612
|
issuing_authority: stringOptional("Issuing Authority", 0, 150),
|
|
542
613
|
issue_date: dateOptional("Issue Date"),
|
|
543
614
|
expiry_date: dateOptional("Expiry Date"),
|
|
544
615
|
remarks: stringOptional("Remarks", 0, 150),
|
|
545
|
-
|
|
546
|
-
time_zone_id: single_select_mandatory("MasterMainTimeZone"),
|
|
547
|
-
FleetVendorDocumentFileSchema: nestedArrayOfObjectsOptional(
|
|
548
|
-
"FleetVendorDocumentFileSchema",
|
|
549
|
-
FleetVendorDocumentFileSchema,
|
|
550
|
-
[]
|
|
551
|
-
),
|
|
616
|
+
FleetVendorDocumentFileSchema: nestedArrayOfObjectsOptional("FleetVendorDocumentFileSchema", FleetVendorDocumentFileSchema, []),
|
|
552
617
|
// Metadata
|
|
553
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
618
|
+
status: enumMandatory("Status", Status, "Active" /* Active */),
|
|
619
|
+
// Other
|
|
620
|
+
time_zone_id: single_select_mandatory("MasterMainTimeZone")
|
|
554
621
|
});
|
|
555
622
|
var FleetVendorDocumentQuerySchema = BaseQuerySchema.extend({
|
|
556
|
-
//
|
|
623
|
+
// Self Table
|
|
557
624
|
fleet_vendor_document_ids: multi_select_optional("FleetVendorDocument"),
|
|
558
625
|
// Multi-selection -> FleetVendorDocument
|
|
559
|
-
//
|
|
626
|
+
// Relations - Parent
|
|
560
627
|
organisation_ids: multi_select_optional("UserOrganisation"),
|
|
561
628
|
// Multi-selection -> UserOrganisation
|
|
629
|
+
user_ids: multi_select_optional("User"),
|
|
630
|
+
// Multi-selection -> User
|
|
562
631
|
vendor_ids: multi_select_optional("FleetVendor"),
|
|
563
632
|
// Multi-selection -> FleetVendor
|
|
564
633
|
document_type_ids: multi_select_optional("MasterVendorDocumentType")
|
|
565
634
|
// Multi-selection -> MasterVendorDocumentType
|
|
566
635
|
});
|
|
567
|
-
var FleetVendorSchema = z3.object({
|
|
568
|
-
// Relations - Parent
|
|
569
|
-
organisation_id: single_select_mandatory("UserOrganisation"),
|
|
570
|
-
// Single-Selection -> UserOrganisation
|
|
571
|
-
// Profile Image/Logo
|
|
572
|
-
logo_url: stringOptional("Logo URL", 0, 300),
|
|
573
|
-
logo_key: stringOptional("Logo Key", 0, 300),
|
|
574
|
-
logo_name: stringOptional("Logo Name", 0, 300),
|
|
575
|
-
// Main Field Details
|
|
576
|
-
vendor_name: stringMandatory("Vendor Name", 3, 100),
|
|
577
|
-
vendor_code: stringOptional("Vendor Code", 0, 100),
|
|
578
|
-
business_mobile: stringOptional("Business Mobile", 0, 15),
|
|
579
|
-
business_email: stringOptional("Business Email", 0, 100),
|
|
580
|
-
// Business Details
|
|
581
|
-
gst_number: stringOptional("GST Number", 0, 15),
|
|
582
|
-
pan_number: stringOptional("PAN Number", 0, 10),
|
|
583
|
-
tax_id_number: stringOptional("Tax ID Number", 0, 50),
|
|
584
|
-
vat_number: stringOptional("VAT Number", 0, 50),
|
|
585
|
-
business_registration_number: stringOptional(
|
|
586
|
-
"Business Registration Number",
|
|
587
|
-
0,
|
|
588
|
-
50
|
|
589
|
-
),
|
|
590
|
-
// Financial Details
|
|
591
|
-
payment_terms: stringOptional("Payment Terms", 0, 2e3),
|
|
592
|
-
financial_notes: stringOptional("Financial Notes", 0, 2e3),
|
|
593
|
-
// Additional Information
|
|
594
|
-
additional_details_1: stringOptional("Additional Details 1", 0, 2e3),
|
|
595
|
-
additional_details_2: stringOptional("Additional Details 2", 0, 2e3),
|
|
596
|
-
additional_details_3: stringOptional("Additional Details 3", 0, 2e3),
|
|
597
|
-
vendor_type_ids: multi_select_optional("MasterVendorType"),
|
|
598
|
-
// Multi selection -> MasterVendorType
|
|
599
|
-
vendor_tag_ids: multi_select_optional("MasterVendorTag"),
|
|
600
|
-
// Multi selection -> MasterVendorTag
|
|
601
|
-
// Childs Arrays
|
|
602
|
-
FleetVendorAddressSchema: nestedArrayOfObjectsOptional(
|
|
603
|
-
"FleetVendorAddressSchema",
|
|
604
|
-
FleetVendorAddressSchema,
|
|
605
|
-
[]
|
|
606
|
-
),
|
|
607
|
-
FleetVendorBankAccountSchema: nestedArrayOfObjectsOptional(
|
|
608
|
-
"FleetVendorBankAccountSchema",
|
|
609
|
-
FleetVendorBankAccountSchema,
|
|
610
|
-
[]
|
|
611
|
-
),
|
|
612
|
-
FleetVendorContactPersonsSchema: nestedArrayOfObjectsOptional(
|
|
613
|
-
"FleetVendorContactPersonsSchema",
|
|
614
|
-
FleetVendorContactPersonsSchema,
|
|
615
|
-
[]
|
|
616
|
-
),
|
|
617
|
-
FleetVendorReviewSchema: nestedArrayOfObjectsOptional(
|
|
618
|
-
"FleetVendorReviewSchema",
|
|
619
|
-
FleetVendorReviewSchema,
|
|
620
|
-
[]
|
|
621
|
-
),
|
|
622
|
-
FleetVendorDocumentSchema: nestedArrayOfObjectsOptional(
|
|
623
|
-
"FleetVendorDocumentSchema",
|
|
624
|
-
FleetVendorDocumentSchema,
|
|
625
|
-
[]
|
|
626
|
-
),
|
|
627
|
-
// Metadata
|
|
628
|
-
status: enumMandatory("Status", Status, "Active" /* Active */)
|
|
629
|
-
});
|
|
630
|
-
var FleetVendorQuerySchema = BaseQuerySchema.extend({
|
|
631
|
-
// self table
|
|
632
|
-
vendor_ids: multi_select_optional("FleetVendor"),
|
|
633
|
-
// Multi-Selection -> FleetVendor
|
|
634
|
-
// relations - Parent
|
|
635
|
-
organisation_ids: multi_select_optional("UserOrganisation")
|
|
636
|
-
// Multi-Selection -> UserOrganisation
|
|
637
|
-
});
|
|
638
636
|
var FleetVendorDashBoardQuerySchema = BaseQuerySchema.extend({
|
|
639
637
|
organisation_ids: multi_select_mandatory("UserOrganisation")
|
|
640
638
|
// Multi-Selection -> UserOrganisation
|
|
641
639
|
});
|
|
642
640
|
var toFleetVendorPayload = (row) => ({
|
|
641
|
+
organisation_id: row.organisation_id || "",
|
|
642
|
+
user_id: row.user_id || "",
|
|
643
|
+
logo_url: row.logo_url || "",
|
|
644
|
+
logo_key: row.logo_key || "",
|
|
645
|
+
logo_name: row.logo_name || "",
|
|
643
646
|
vendor_name: row.vendor_name || "",
|
|
644
647
|
vendor_code: row.vendor_code || "",
|
|
645
648
|
business_mobile: row.business_mobile || "",
|
|
646
649
|
business_email: row.business_email || "",
|
|
647
|
-
logo_url: row.logo_url || "",
|
|
648
|
-
logo_key: row.logo_key || "",
|
|
649
|
-
logo_name: row.logo_name || "",
|
|
650
|
-
// Business Details
|
|
651
650
|
gst_number: row.gst_number || "",
|
|
652
651
|
pan_number: row.pan_number || "",
|
|
653
652
|
tax_id_number: row.tax_id_number || "",
|
|
654
653
|
vat_number: row.vat_number || "",
|
|
655
654
|
business_registration_number: row.business_registration_number || "",
|
|
656
|
-
// Financial Details
|
|
657
655
|
payment_terms: row.payment_terms || "",
|
|
658
656
|
financial_notes: row.financial_notes || "",
|
|
659
|
-
// Additional Information
|
|
660
657
|
additional_details_1: row.additional_details_1 || "",
|
|
661
658
|
additional_details_2: row.additional_details_2 || "",
|
|
662
659
|
additional_details_3: row.additional_details_3 || "",
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
vendor_type_ids: row.FleetVendorTypeLink?.map((v) => v.vendor_type_id) || [],
|
|
666
|
-
vendor_tag_ids: row.FleetVendorTagLink?.map((v) => v.vendor_tag_id) || [],
|
|
667
|
-
FleetVendorAddressSchema: [],
|
|
668
|
-
FleetVendorBankAccountSchema: [],
|
|
669
|
-
FleetVendorContactPersonsSchema: [],
|
|
670
|
-
FleetVendorReviewSchema: [],
|
|
671
|
-
FleetVendorDocumentSchema: [],
|
|
660
|
+
vendor_type_ids: row.FleetVendorTypeLink?.map((l) => l.vendor_type_id) || [],
|
|
661
|
+
vendor_tag_ids: row.FleetVendorTagLink?.map((l) => l.vendor_tag_id) || [],
|
|
672
662
|
status: row.status || "Active" /* Active */
|
|
673
663
|
});
|
|
674
664
|
var newFleetVendorPayload = () => ({
|
|
665
|
+
organisation_id: "",
|
|
666
|
+
user_id: "",
|
|
667
|
+
logo_url: "",
|
|
668
|
+
logo_key: "",
|
|
669
|
+
logo_name: "",
|
|
675
670
|
vendor_name: "",
|
|
676
671
|
vendor_code: "",
|
|
677
672
|
business_mobile: "",
|
|
678
673
|
business_email: "",
|
|
679
|
-
logo_url: "",
|
|
680
|
-
logo_key: "",
|
|
681
|
-
logo_name: "",
|
|
682
674
|
gst_number: "",
|
|
683
675
|
pan_number: "",
|
|
684
676
|
tax_id_number: "",
|
|
@@ -689,19 +681,15 @@ var newFleetVendorPayload = () => ({
|
|
|
689
681
|
additional_details_1: "",
|
|
690
682
|
additional_details_2: "",
|
|
691
683
|
additional_details_3: "",
|
|
692
|
-
organisation_id: "",
|
|
693
684
|
vendor_type_ids: [],
|
|
694
685
|
vendor_tag_ids: [],
|
|
695
|
-
FleetVendorAddressSchema: [],
|
|
696
|
-
FleetVendorBankAccountSchema: [],
|
|
697
|
-
FleetVendorContactPersonsSchema: [],
|
|
698
|
-
FleetVendorReviewSchema: [],
|
|
699
|
-
FleetVendorDocumentSchema: [],
|
|
700
686
|
status: "Active" /* Active */
|
|
701
687
|
});
|
|
702
688
|
var toFleetVendorAddressPayload = (row) => ({
|
|
689
|
+
organisation_id: row.organisation_id || "",
|
|
690
|
+
user_id: row.user_id || "",
|
|
691
|
+
vendor_id: row.vendor_id || "",
|
|
703
692
|
vendor_address_label: row.vendor_address_label || "OTHER" /* OTHER */,
|
|
704
|
-
// Address Details
|
|
705
693
|
address_line1: row.address_line1 || "",
|
|
706
694
|
address_line2: row.address_line2 || "",
|
|
707
695
|
locality_landmark: row.locality_landmark || "",
|
|
@@ -712,17 +700,17 @@ var toFleetVendorAddressPayload = (row) => ({
|
|
|
712
700
|
postal_code: row.postal_code || "",
|
|
713
701
|
country: row.country || "",
|
|
714
702
|
country_code: row.country_code || "",
|
|
715
|
-
// Location Details
|
|
716
703
|
latitude: row.latitude || 0,
|
|
717
704
|
longitude: row.longitude || 0,
|
|
718
705
|
google_location: row.google_location || "",
|
|
719
|
-
organisation_id: row.organisation_id || "",
|
|
720
|
-
vendor_id: row.vendor_id || "",
|
|
721
706
|
is_default: row.is_default || "No" /* No */,
|
|
722
707
|
notes: row.notes || "",
|
|
723
708
|
status: row.status || "Active" /* Active */
|
|
724
709
|
});
|
|
725
710
|
var newFleetVendorAddressPayload = () => ({
|
|
711
|
+
organisation_id: "",
|
|
712
|
+
user_id: "",
|
|
713
|
+
vendor_id: "",
|
|
726
714
|
vendor_address_label: "OTHER" /* OTHER */,
|
|
727
715
|
address_line1: "",
|
|
728
716
|
address_line2: "",
|
|
@@ -737,64 +725,66 @@ var newFleetVendorAddressPayload = () => ({
|
|
|
737
725
|
latitude: 0,
|
|
738
726
|
longitude: 0,
|
|
739
727
|
google_location: "",
|
|
740
|
-
organisation_id: "",
|
|
741
|
-
vendor_id: "",
|
|
742
728
|
is_default: "No" /* No */,
|
|
743
729
|
notes: "",
|
|
744
730
|
status: "Active" /* Active */
|
|
745
731
|
});
|
|
746
732
|
var toFleetVendorBankAccountPayload = (row) => ({
|
|
733
|
+
organisation_id: row.organisation_id || "",
|
|
734
|
+
user_id: row.user_id || "",
|
|
735
|
+
vendor_id: row.vendor_id || "",
|
|
747
736
|
bank_name: row.bank_name || "",
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
737
|
+
branch_name: row.branch_name || "",
|
|
738
|
+
account_holder_name: row.account_holder_name || "",
|
|
739
|
+
account_number: row.account_number || "",
|
|
740
|
+
account_type: row.account_type || "Other" /* Other */,
|
|
751
741
|
ifsc_code: row.ifsc_code || "",
|
|
752
742
|
swift_code: row.swift_code || "",
|
|
753
743
|
iban_number: row.iban_number || "",
|
|
754
744
|
upi_id: row.upi_id || "",
|
|
755
745
|
is_primary: row.is_primary || "No" /* No */,
|
|
756
746
|
notes: row.notes || "",
|
|
757
|
-
// Relations
|
|
758
|
-
organisation_id: row.organisation_id || "",
|
|
759
|
-
vendor_id: row.vendor_id || "",
|
|
760
747
|
status: row.status || "Active" /* Active */
|
|
761
748
|
});
|
|
762
749
|
var newFleetVendorBankAccountPayload = () => ({
|
|
750
|
+
organisation_id: "",
|
|
751
|
+
user_id: "",
|
|
752
|
+
vendor_id: "",
|
|
763
753
|
bank_name: "",
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
754
|
+
branch_name: "",
|
|
755
|
+
account_holder_name: "",
|
|
756
|
+
account_number: "",
|
|
757
|
+
account_type: "Other" /* Other */,
|
|
767
758
|
ifsc_code: "",
|
|
768
759
|
swift_code: "",
|
|
769
760
|
iban_number: "",
|
|
770
761
|
upi_id: "",
|
|
771
762
|
is_primary: "No" /* No */,
|
|
772
763
|
notes: "",
|
|
773
|
-
vendor_id: "",
|
|
774
|
-
organisation_id: "",
|
|
775
764
|
status: "Active" /* Active */
|
|
776
765
|
});
|
|
777
|
-
var
|
|
778
|
-
|
|
766
|
+
var toFleetVendorContactPersonPayload = (row) => ({
|
|
767
|
+
organisation_id: row.organisation_id || "",
|
|
768
|
+
user_id: row.user_id || "",
|
|
769
|
+
vendor_id: row.vendor_id || "",
|
|
779
770
|
image_url: row.image_url || "",
|
|
780
771
|
image_key: row.image_key || "",
|
|
781
772
|
image_name: row.image_name || "",
|
|
782
|
-
// Primary Details
|
|
783
773
|
name: row.name || "",
|
|
784
774
|
mobile: row.mobile || "",
|
|
785
775
|
alternative_mobile: row.alternative_mobile || "",
|
|
786
776
|
email: row.email || "",
|
|
787
777
|
designation: row.designation || "",
|
|
788
|
-
// Additional Details
|
|
789
778
|
branch_name: row.branch_name || "",
|
|
790
779
|
preferred_language: row.preferred_language || "",
|
|
791
780
|
is_primary: row.is_primary || "No" /* No */,
|
|
792
781
|
notes: row.notes || "",
|
|
793
|
-
organisation_id: row.organisation_id || "",
|
|
794
|
-
vendor_id: row.vendor_id || "",
|
|
795
782
|
status: row.status || "Active" /* Active */
|
|
796
783
|
});
|
|
797
|
-
var
|
|
784
|
+
var newFleetVendorContactPersonPayload = () => ({
|
|
785
|
+
organisation_id: "",
|
|
786
|
+
user_id: "",
|
|
787
|
+
vendor_id: "",
|
|
798
788
|
image_url: "",
|
|
799
789
|
image_key: "",
|
|
800
790
|
image_name: "",
|
|
@@ -807,46 +797,37 @@ var newFleetVendorContactPersonsPayload = () => ({
|
|
|
807
797
|
preferred_language: "",
|
|
808
798
|
is_primary: "No" /* No */,
|
|
809
799
|
notes: "",
|
|
810
|
-
organisation_id: "",
|
|
811
|
-
vendor_id: "",
|
|
812
800
|
status: "Active" /* Active */
|
|
813
801
|
});
|
|
814
802
|
var toFleetVendorReviewPayload = (row) => ({
|
|
815
|
-
rating: row.rating || 0,
|
|
816
|
-
rating_comments: row.rating_comments || "",
|
|
817
|
-
// Relations
|
|
818
803
|
organisation_id: row.organisation_id || "",
|
|
819
804
|
vendor_id: row.vendor_id || "",
|
|
820
805
|
user_id: row.user_id || "",
|
|
806
|
+
rating: row.rating || 1,
|
|
807
|
+
rating_comments: row.rating_comments || "",
|
|
821
808
|
status: row.status || "Active" /* Active */
|
|
822
809
|
});
|
|
823
810
|
var newFleetVendorReviewPayload = () => ({
|
|
824
|
-
rating: 0,
|
|
825
|
-
rating_comments: "",
|
|
826
811
|
organisation_id: "",
|
|
827
812
|
vendor_id: "",
|
|
828
813
|
user_id: "",
|
|
814
|
+
rating: 1,
|
|
815
|
+
rating_comments: "",
|
|
829
816
|
status: "Active" /* Active */
|
|
830
817
|
});
|
|
831
818
|
var toFleetVendorDocumentPayload = (row) => ({
|
|
832
|
-
|
|
819
|
+
organisation_id: row.organisation_id || "",
|
|
820
|
+
user_id: row.user_id || "",
|
|
821
|
+
vendor_id: row.vendor_id || "",
|
|
822
|
+
document_type_id: row.document_type_id || "",
|
|
833
823
|
document_name: row.document_name || "",
|
|
834
824
|
document_number: row.document_number || "",
|
|
835
825
|
issuing_authority: row.issuing_authority || "",
|
|
836
826
|
issue_date: row.issue_date || "",
|
|
837
827
|
expiry_date: row.expiry_date || "",
|
|
838
828
|
remarks: row.remarks || "",
|
|
839
|
-
// Relations
|
|
840
|
-
organisation_id: row.organisation_id || "",
|
|
841
|
-
vendor_id: row.vendor_id || "",
|
|
842
|
-
user_id: row.user_id || "",
|
|
843
|
-
document_type_id: row.document_type_id || "",
|
|
844
|
-
status: row.status || "Active" /* Active */,
|
|
845
|
-
time_zone_id: "",
|
|
846
|
-
// Needs to be provided manually
|
|
847
829
|
FleetVendorDocumentFileSchema: row.FleetVendorDocumentFile?.map((file) => ({
|
|
848
830
|
fleet_vendor_document_file_id: file.fleet_vendor_document_file_id || "",
|
|
849
|
-
// Usage Type -> Odometer Image, Fuel Bill, Fuel Tank Image, Refill Recording Video
|
|
850
831
|
usage_type: file.usage_type || "",
|
|
851
832
|
file_type: file.file_type || "Image" /* Image */,
|
|
852
833
|
file_url: file.file_url || "",
|
|
@@ -859,30 +840,32 @@ var toFleetVendorDocumentPayload = (row) => ({
|
|
|
859
840
|
added_date_time: file.added_date_time,
|
|
860
841
|
modified_date_time: file.modified_date_time,
|
|
861
842
|
organisation_id: file.organisation_id || "",
|
|
843
|
+
user_id: file.user_id || "",
|
|
862
844
|
fleet_vendor_document_id: file.fleet_vendor_document_id || ""
|
|
863
|
-
})) || []
|
|
845
|
+
})) || [],
|
|
846
|
+
status: row.status || "Active" /* Active */,
|
|
847
|
+
time_zone_id: ""
|
|
864
848
|
});
|
|
865
849
|
var newFleetVendorDocumentPayload = () => ({
|
|
850
|
+
organisation_id: "",
|
|
851
|
+
user_id: "",
|
|
852
|
+
vendor_id: "",
|
|
853
|
+
document_type_id: "",
|
|
866
854
|
document_name: "",
|
|
867
855
|
document_number: "",
|
|
868
856
|
issuing_authority: "",
|
|
869
857
|
issue_date: "",
|
|
870
858
|
expiry_date: "",
|
|
871
859
|
remarks: "",
|
|
872
|
-
|
|
873
|
-
vendor_id: "",
|
|
874
|
-
user_id: "",
|
|
875
|
-
document_type_id: "",
|
|
860
|
+
FleetVendorDocumentFileSchema: [],
|
|
876
861
|
status: "Active" /* Active */,
|
|
877
|
-
time_zone_id: ""
|
|
878
|
-
// Needs to be provided manually
|
|
879
|
-
FleetVendorDocumentFileSchema: []
|
|
862
|
+
time_zone_id: ""
|
|
880
863
|
});
|
|
881
|
-
var get_vendor_logo_presigned_url = async (
|
|
882
|
-
return apiGet(ENDPOINTS.vendor_logo_presigned_url(
|
|
864
|
+
var get_vendor_logo_presigned_url = async (file_name) => {
|
|
865
|
+
return apiGet(ENDPOINTS.vendor_logo_presigned_url(file_name));
|
|
883
866
|
};
|
|
884
|
-
var get_vendor_contact_person_logo_presigned_url = async (
|
|
885
|
-
return apiGet(ENDPOINTS.vendor_contact_person_logo_presigned_url(
|
|
867
|
+
var get_vendor_contact_person_logo_presigned_url = async (file_name) => {
|
|
868
|
+
return apiGet(ENDPOINTS.vendor_contact_person_logo_presigned_url(file_name));
|
|
886
869
|
};
|
|
887
870
|
var get_vendor_document_file_presigned_url = async (data) => {
|
|
888
871
|
return apiPost(ENDPOINTS.vendor_document_file_presigned_url, data);
|
|
@@ -890,14 +873,14 @@ var get_vendor_document_file_presigned_url = async (data) => {
|
|
|
890
873
|
var update_vendor_logo = async (id, data) => {
|
|
891
874
|
return apiPatch(ENDPOINTS.update_vendor_logo(id), data);
|
|
892
875
|
};
|
|
893
|
-
var
|
|
894
|
-
return apiDelete(ENDPOINTS.
|
|
876
|
+
var remove_vendor_logo = async (id) => {
|
|
877
|
+
return apiDelete(ENDPOINTS.remove_vendor_logo(id));
|
|
895
878
|
};
|
|
896
879
|
var update_vendor_contact_person_logo = async (id, data) => {
|
|
897
880
|
return apiPatch(ENDPOINTS.update_vendor_contact_person_logo(id), data);
|
|
898
881
|
};
|
|
899
|
-
var
|
|
900
|
-
return apiDelete(ENDPOINTS.
|
|
882
|
+
var remove_vendor_contact_person_logo = async (id) => {
|
|
883
|
+
return apiDelete(ENDPOINTS.remove_vendor_contact_person_logo(id));
|
|
901
884
|
};
|
|
902
885
|
var create_vendor_document_file = async (data) => {
|
|
903
886
|
return apiPost(ENDPOINTS.create_vendor_document_file, data);
|
|
@@ -920,67 +903,67 @@ var deleteFleetVendor = async (id) => {
|
|
|
920
903
|
var vendor_dashboard = async (data) => {
|
|
921
904
|
return apiPost(ENDPOINTS.vendor_dashboard, data);
|
|
922
905
|
};
|
|
923
|
-
var
|
|
924
|
-
return apiPost(ENDPOINTS.
|
|
906
|
+
var findFleetVendorContactPerson = async (data) => {
|
|
907
|
+
return apiPost(ENDPOINTS.find_contact_person, data);
|
|
908
|
+
};
|
|
909
|
+
var createFleetVendorContactPerson = async (data) => {
|
|
910
|
+
return apiPost(ENDPOINTS.create_contact_person, data);
|
|
911
|
+
};
|
|
912
|
+
var updateFleetVendorContactPerson = async (id, data) => {
|
|
913
|
+
return apiPatch(ENDPOINTS.update_contact_person(id), data);
|
|
914
|
+
};
|
|
915
|
+
var deleteFleetVendorContactPerson = async (id) => {
|
|
916
|
+
return apiDelete(ENDPOINTS.delete_contact_person(id));
|
|
917
|
+
};
|
|
918
|
+
var findFleetVendorDocument = async (data) => {
|
|
919
|
+
return apiPost(ENDPOINTS.find_document, data);
|
|
920
|
+
};
|
|
921
|
+
var createFleetVendorDocument = async (data) => {
|
|
922
|
+
return apiPost(ENDPOINTS.create_document, data);
|
|
923
|
+
};
|
|
924
|
+
var updateFleetVendorDocument = async (id, data) => {
|
|
925
|
+
return apiPatch(ENDPOINTS.update_document(id), data);
|
|
926
|
+
};
|
|
927
|
+
var deleteFleetVendorDocument = async (id) => {
|
|
928
|
+
return apiDelete(ENDPOINTS.delete_document(id));
|
|
925
929
|
};
|
|
926
930
|
var findFleetVendorAddress = async (data) => {
|
|
927
931
|
return apiPost(ENDPOINTS.find_address, data);
|
|
928
932
|
};
|
|
933
|
+
var createFleetVendorAddress = async (data) => {
|
|
934
|
+
return apiPost(ENDPOINTS.create_address, data);
|
|
935
|
+
};
|
|
929
936
|
var updateFleetVendorAddress = async (id, data) => {
|
|
930
937
|
return apiPatch(ENDPOINTS.update_address(id), data);
|
|
931
938
|
};
|
|
932
939
|
var deleteFleetVendorAddress = async (id) => {
|
|
933
|
-
return apiDelete(ENDPOINTS.
|
|
934
|
-
};
|
|
935
|
-
var createFleetVendorBankAccount = async (data) => {
|
|
936
|
-
return apiPost(ENDPOINTS.create_bank_account, data);
|
|
940
|
+
return apiDelete(ENDPOINTS.delete_address(id));
|
|
937
941
|
};
|
|
938
942
|
var findFleetVendorBankAccount = async (data) => {
|
|
939
943
|
return apiPost(ENDPOINTS.find_bank_account, data);
|
|
940
944
|
};
|
|
945
|
+
var createFleetVendorBankAccount = async (data) => {
|
|
946
|
+
return apiPost(ENDPOINTS.create_bank_account, data);
|
|
947
|
+
};
|
|
941
948
|
var updateFleetVendorBankAccount = async (id, data) => {
|
|
942
949
|
return apiPatch(ENDPOINTS.update_bank_account(id), data);
|
|
943
950
|
};
|
|
944
951
|
var deleteFleetVendorBankAccount = async (id) => {
|
|
945
|
-
return apiDelete(ENDPOINTS.
|
|
952
|
+
return apiDelete(ENDPOINTS.delete_bank_account(id));
|
|
946
953
|
};
|
|
947
|
-
var
|
|
948
|
-
return apiPost(ENDPOINTS.
|
|
949
|
-
};
|
|
950
|
-
var findFleetVendorContactPersons = async (data) => {
|
|
951
|
-
return apiPost(ENDPOINTS.find_contact_person, data);
|
|
952
|
-
};
|
|
953
|
-
var updateFleetVendorContactPersons = async (id, data) => {
|
|
954
|
-
return apiPatch(ENDPOINTS.update_contact_person(id), data);
|
|
955
|
-
};
|
|
956
|
-
var deleteFleetVendorContactPersons = async (id) => {
|
|
957
|
-
return apiDelete(ENDPOINTS.remove_contact_person(id));
|
|
954
|
+
var findFleetVendorReview = async (data) => {
|
|
955
|
+
return apiPost(ENDPOINTS.find_review, data);
|
|
958
956
|
};
|
|
959
957
|
var createFleetVendorReview = async (data) => {
|
|
960
958
|
return apiPost(ENDPOINTS.create_review, data);
|
|
961
959
|
};
|
|
962
|
-
var findFleetVendorReview = async (data) => {
|
|
963
|
-
return apiPost(ENDPOINTS.find_review, data);
|
|
964
|
-
};
|
|
965
960
|
var updateFleetVendorReview = async (id, data) => {
|
|
966
961
|
return apiPatch(ENDPOINTS.update_review(id), data);
|
|
967
962
|
};
|
|
968
963
|
var deleteFleetVendorReview = async (id) => {
|
|
969
|
-
return apiDelete(ENDPOINTS.
|
|
970
|
-
};
|
|
971
|
-
var createFleetVendorDocument = async (data) => {
|
|
972
|
-
return apiPost(ENDPOINTS.create_document, data);
|
|
973
|
-
};
|
|
974
|
-
var findFleetVendorDocument = async (data) => {
|
|
975
|
-
return apiPost(ENDPOINTS.find_document, data);
|
|
976
|
-
};
|
|
977
|
-
var updateFleetVendorDocument = async (id, data) => {
|
|
978
|
-
return apiPatch(ENDPOINTS.update_document(id), data);
|
|
979
|
-
};
|
|
980
|
-
var deleteFleetVendorDocument = async (id) => {
|
|
981
|
-
return apiDelete(ENDPOINTS.remove_document(id));
|
|
964
|
+
return apiDelete(ENDPOINTS.delete_review(id));
|
|
982
965
|
};
|
|
983
|
-
var
|
|
966
|
+
var find_vendor_cache_simple = async (organisation_id) => {
|
|
984
967
|
return apiGet(ENDPOINTS.cache_simple(organisation_id));
|
|
985
968
|
};
|
|
986
969
|
export {
|
|
@@ -988,9 +971,9 @@ export {
|
|
|
988
971
|
FleetVendorAddressSchema,
|
|
989
972
|
FleetVendorBankAccountQuerySchema,
|
|
990
973
|
FleetVendorBankAccountSchema,
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
974
|
+
FleetVendorContactPersonLogoSchema,
|
|
975
|
+
FleetVendorContactPersonQuerySchema,
|
|
976
|
+
FleetVendorContactPersonSchema,
|
|
994
977
|
FleetVendorDashBoardQuerySchema,
|
|
995
978
|
FleetVendorDocumentFileSchema,
|
|
996
979
|
FleetVendorDocumentQuerySchema,
|
|
@@ -1003,45 +986,45 @@ export {
|
|
|
1003
986
|
createFleetVendor,
|
|
1004
987
|
createFleetVendorAddress,
|
|
1005
988
|
createFleetVendorBankAccount,
|
|
1006
|
-
|
|
989
|
+
createFleetVendorContactPerson,
|
|
1007
990
|
createFleetVendorDocument,
|
|
1008
991
|
createFleetVendorReview,
|
|
1009
992
|
create_vendor_document_file,
|
|
1010
993
|
deleteFleetVendor,
|
|
1011
994
|
deleteFleetVendorAddress,
|
|
1012
995
|
deleteFleetVendorBankAccount,
|
|
1013
|
-
|
|
996
|
+
deleteFleetVendorContactPerson,
|
|
1014
997
|
deleteFleetVendorDocument,
|
|
1015
998
|
deleteFleetVendorReview,
|
|
1016
|
-
delete_vendor_contact_person_logo,
|
|
1017
|
-
delete_vendor_logo,
|
|
1018
999
|
findFleetVendor,
|
|
1019
1000
|
findFleetVendorAddress,
|
|
1020
1001
|
findFleetVendorBankAccount,
|
|
1021
|
-
|
|
1002
|
+
findFleetVendorContactPerson,
|
|
1022
1003
|
findFleetVendorDocument,
|
|
1023
1004
|
findFleetVendorReview,
|
|
1024
|
-
|
|
1005
|
+
find_vendor_cache_simple,
|
|
1025
1006
|
get_vendor_contact_person_logo_presigned_url,
|
|
1026
1007
|
get_vendor_document_file_presigned_url,
|
|
1027
1008
|
get_vendor_logo_presigned_url,
|
|
1028
1009
|
newFleetVendorAddressPayload,
|
|
1029
1010
|
newFleetVendorBankAccountPayload,
|
|
1030
|
-
|
|
1011
|
+
newFleetVendorContactPersonPayload,
|
|
1031
1012
|
newFleetVendorDocumentPayload,
|
|
1032
1013
|
newFleetVendorPayload,
|
|
1033
1014
|
newFleetVendorReviewPayload,
|
|
1015
|
+
remove_vendor_contact_person_logo,
|
|
1034
1016
|
remove_vendor_document_file,
|
|
1017
|
+
remove_vendor_logo,
|
|
1035
1018
|
toFleetVendorAddressPayload,
|
|
1036
1019
|
toFleetVendorBankAccountPayload,
|
|
1037
|
-
|
|
1020
|
+
toFleetVendorContactPersonPayload,
|
|
1038
1021
|
toFleetVendorDocumentPayload,
|
|
1039
1022
|
toFleetVendorPayload,
|
|
1040
1023
|
toFleetVendorReviewPayload,
|
|
1041
1024
|
updateFleetVendor,
|
|
1042
1025
|
updateFleetVendorAddress,
|
|
1043
1026
|
updateFleetVendorBankAccount,
|
|
1044
|
-
|
|
1027
|
+
updateFleetVendorContactPerson,
|
|
1045
1028
|
updateFleetVendorDocument,
|
|
1046
1029
|
updateFleetVendorReview,
|
|
1047
1030
|
update_vendor_contact_person_logo,
|