Advertisement
psi_mmobile

Untitled

Jan 18th, 2024
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PL/SQL 4.29 KB | None | 0 0
  1. fetchCAWRecords(
  2.     person,
  3.     poi,
  4.     warningCheckbox,
  5.     exceptionsOnlyCheckbox,
  6.     pplWithMissingDocs,
  7.     nonAdminStatusCheckbox,
  8.     cawFromDate,
  9.     cawToDate
  10.   ) {
  11.     let params = NEW HttpParams();
  12.     params = params.SET('was_here_before', warningCheckbox);
  13.     params = params.SET('exceptions_only', exceptionsOnlyCheckbox);
  14.     params = params.SET('show_non_admin_status_only', nonAdminStatusCheckbox);
  15.     params = params.SET('display_only_ppl_missing_docs', pplWithMissingDocs);
  16.     IF (person) {
  17.       params = params.SET('person_id', person.person_id);
  18.     }
  19.     IF (poi) {
  20.       params = params.SET('poi_id', poi.poi_id);
  21.     }
  22.     params = params.SET('history_from', cawFromDate);
  23.     params = params.SET('history_to', cawToDate);
  24.     this.http
  25.       .get<StandardORDSGETResponse<PoiRegistration>>(
  26.         `${this.dataBaseService.ordsTraxxeoURL}tracking/checkin`,
  27.         { params }
  28.       )
  29.       .subscribe((caws) => {
  30.         caws.items.forEach((item) => this.parseCAW(item));
  31.         const itemsWithSelected = caws.items.map((item) => ({
  32.           ...item,
  33.           selected: FALSE
  34.         }));
  35.         const store = NEW Store({ modelClass: PoiRegistrationModel });
  36.         store.add(
  37.           NEW PoiRegistrationModel({
  38.             work_date: NULL,
  39.             social_office_transaction_id: NULL,
  40.             poi_tin: NULL,
  41.             wbs_id: NULL,
  42.             so_transaction_status_name: NULL,
  43.             creation_date: NULL,
  44.             creation_user_name: NULL,
  45.             so_creation_number: NULL,
  46.             cancel_date: NULL,
  47.             cancellation_user_name: NULL,
  48.             so_cancellation_number: NULL,
  49.             so_transaction_status_id: NULL,
  50.             company_nr: NULL,
  51.             person_id: NULL,
  52.             first_name: NULL,
  53.             last_name: NULL,
  54.             creation_gui_user_id: NULL,
  55.             cancellation_gui_user_id: NULL,
  56.             sot_person_id: NULL,
  57.             sot_wbs_id: NULL,
  58.             day_string: NULL,
  59.             day_nr: NULL,
  60.             ref_number: NULL,
  61.             creation_date_with_time_zone: NULL,
  62.             cancel_date_with_time_zone: NULL,
  63.             timezone: NULL,
  64.             operation_center_id: NULL,
  65.             person_category_name: NULL,
  66.             vo_person_category_id: NULL,
  67.             graphical_symbol: NULL,
  68.             person_groups: NULL,
  69.             start_time: NULL,
  70.             duration: NULL,
  71.             end_time: NULL,
  72.             is_start_time_set: NULL,
  73.             work_date_with_time_zone: NULL,
  74.             so_comment: NULL,
  75.             plan_mode: NULL,
  76.             person_company_name: NULL,
  77.             poi_name: NULL,
  78.             poi_id: NULL,
  79.             gui_user_id: NULL,
  80.             gp_person_id: NULL,
  81.             gp_gui_user_id: NULL,
  82.             work_date_str: NULL,
  83.             is_admin_status_ok: NULL,
  84.             admin_status_category_str: NULL,
  85.             description: NULL,
  86.             doc_id_be: NULL,
  87.             doc_sii: NULL,
  88.             doc_lc: NULL,
  89.             doc_limosa: NULL,
  90.             doc_a1: NULL,
  91.             doc_dim_or_cb: NULL,
  92.             doc_id_xx: NULL,
  93.             sot_status_desc: NULL,
  94.             doc_dim: NULL,
  95.             doc_cb: NULL,
  96.             doc_annexxe: NULL,
  97.             apc_proof_of_identity: NULL,
  98.             apc_proof_of_residence: NULL,
  99.             apc_proof_of_work: NULL,
  100.             admin_profile_category: NULL,
  101.             is_blacklisted: NULL,
  102.             person_all_admin_attach_doc_validated: NULL,
  103.             month_nr: NULL,
  104.             company_name: NULL,
  105.             vehicle_owner_id: NULL,
  106.             real_employer_name: NULL,
  107.             real_employer_tin: NULL,
  108.             sot_admin_remark_translation: NULL,
  109.             sot_remark_exist: NULL,
  110.             rank1_sc_name: NULL,
  111.             rank1_sc_tin: NULL,
  112.             apc_covid: NULL,
  113.             is_on_site: NULL,
  114.             is_using_caw_robot: NULL,
  115.             text: NULL,
  116.             VALUE: NULL,
  117.             name: NULL,
  118.             unfiltered: NULL,
  119.             selected: NULL
  120.           })
  121.         );
  122.         store.removeAll();
  123.         // store.add(caws.items);
  124.         store.add(itemsWithSelected);
  125.         store.COMMIT();
  126.         this._cawStore.next(store);
  127.         this.setIsFetching(FALSE);
  128.       });
  129.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement