primary_care_admin_binder 0.1.93 → 0.1.95

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.
Files changed (2) hide show
  1. package/dist/index.cjs.js +588 -223
  2. package/package.json +1 -1
package/dist/index.cjs.js CHANGED
@@ -2496,11 +2496,16 @@ var __keyClockPractioner__ = "".concat(process.env.REACT_APP_KEY_CLOCK_API, "/ap
2496
2496
  var __keyClockblockappointment__ = "".concat(process.env.REACT_APP_KEY_CLOCK_API, "/api/v1/BlockWithSchedule");
2497
2497
  var refreshOrgToken = "".concat(__nifiUrl__, "/api/v1/refreshOrgAuthToken");
2498
2498
  var refreshUserToken = "".concat(__nifiUrl__, "/api/v1/refreshAuthToken");
2499
- var __nifiEditUrl__ = "".concat(process.env.REACT_APP_NIFI_API, "/api/v1/editHoliday");
2500
- var __nifiAddUrl__ = "".concat(process.env.REACT_APP_NIFI_API, "/api/v1/addHoliday");
2499
+ "".concat(process.env.REACT_APP_NIFI_API, "/api/editHoliday");
2500
+ "".concat(process.env.REACT_APP_NIFI_API, "/api/addHoliday");
2501
2501
  "".concat(process.env.REACT_APP_NIFI_API, "/api/v1/");
2502
2502
  var __TokenGeneration__ = "".concat(process.env.REACT_APP_TOKEN_URL, "/IDMJWTTokencreation");
2503
2503
 
2504
+ //holiday urls
2505
+
2506
+ var __holidayEditUrl__ = "".concat(process.env.REACT_APP_APPOINTMENT_API, "/api/editHoliday");
2507
+ var __holidayAddUrl__ = "".concat(process.env.REACT_APP_APPOINTMENT_API, "/api/addHoliday");
2508
+
2504
2509
  var moment = createCommonjsModule(function (module, exports) {
2505
2510
  (function (global, factory) {
2506
2511
  module.exports = factory() ;
@@ -8183,6 +8188,7 @@ var moment = createCommonjsModule(function (module, exports) {
8183
8188
  var fetchData = /*#__PURE__*/function () {
8184
8189
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(input) {
8185
8190
  var url,
8191
+ jwtToken,
8186
8192
  __options,
8187
8193
  res,
8188
8194
  data,
@@ -8192,24 +8198,28 @@ var fetchData = /*#__PURE__*/function () {
8192
8198
  switch (_context.prev = _context.next) {
8193
8199
  case 0:
8194
8200
  url = _args.length > 1 && _args[1] !== undefined ? _args[1] : __baseUrl__;
8201
+ jwtToken = _args.length > 2 ? _args[2] : undefined;
8195
8202
  console.log(url, "dftty");
8196
8203
  __options = {
8197
8204
  method: "POST",
8198
- headers: {
8205
+ headers: jwtToken ? {
8206
+ "Content-Type": "application/json",
8207
+ "jwtToken": jwtToken
8208
+ } : {
8199
8209
  "Content-Type": "application/json"
8200
8210
  },
8201
8211
  body: {}
8202
8212
  };
8203
- _context.next = 5;
8213
+ _context.next = 6;
8204
8214
  return fetch(url, _objectSpread2$1(_objectSpread2$1({}, __options), input));
8205
- case 5:
8215
+ case 6:
8206
8216
  res = _context.sent;
8207
- _context.next = 8;
8217
+ _context.next = 9;
8208
8218
  return res.json();
8209
- case 8:
8219
+ case 9:
8210
8220
  data = _context.sent;
8211
8221
  return _context.abrupt("return", data);
8212
- case 10:
8222
+ case 11:
8213
8223
  case "end":
8214
8224
  return _context.stop();
8215
8225
  }
@@ -14961,7 +14971,7 @@ var queries$j = {
14961
14971
  return {
14962
14972
  db_name: dbName$1,
14963
14973
  entity: "Holiday",
14964
- filter: "Holiday._id=='Holiday/".concat(data, "' && Holiday.CalYear==2022 && Holiday.activestatus==true"),
14974
+ filter: "Holiday._id=='Holiday/".concat(data, "' && Holiday.activestatus==true"),
14965
14975
  return_fields: "merge(Holiday,{HolidayType:document(Holiday.HolidayType),CalDay:document(Holiday.CalDay)},{HolidayDtls:(for Holidaydtls in Holidaydtls filter Holidaydtls.holidayid==Holiday._id return merge(Holidaydtls,{orgid:document(Holidaydtls.orgid),status:document(Holidaydtls.status)}))})"
14966
14976
  };
14967
14977
  },
@@ -15252,33 +15262,225 @@ var availabilityManagementActions$1 = {
15252
15262
  var availabilityManagementSlice$1 = availabilityManagementSlice.reducer;
15253
15263
 
15254
15264
  var _extraReducers$B;
15265
+ var GET_HOLIDAY_TYPE = createAsyncThunk("holidaySlice/holidayTypeqdm", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
15266
+ var _ref2,
15267
+ rejectWithValue,
15268
+ _data$,
15269
+ _data$$HOLIDAYTYPE,
15270
+ _data$$HOLIDAYTYPE$Va,
15271
+ body,
15272
+ data,
15273
+ arry,
15274
+ _args = arguments;
15275
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15276
+ while (1) {
15277
+ switch (_context.prev = _context.next) {
15278
+ case 0:
15279
+ _ref2 = _args.length > 1 ? _args[1] : undefined, rejectWithValue = _ref2.rejectWithValue;
15280
+ _context.prev = 2;
15281
+ // const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
15282
+ body = {
15283
+ "db_name": "primarycareng",
15284
+ "filter": {
15285
+ "type": ["HOLIDAYTYPE"],
15286
+ "tenantid": "",
15287
+ "facilityid": "",
15288
+ "lang": ""
15289
+ },
15290
+ "queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
15291
+ };
15292
+ _context.next = 6;
15293
+ return fetchData({
15294
+ body: JSON.stringify(body)
15295
+ }, __baseUrl__$1);
15296
+ case 6:
15297
+ data = _context.sent;
15298
+ arry = [];
15299
+ (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : (_data$$HOLIDAYTYPE = _data$.HOLIDAYTYPE) === null || _data$$HOLIDAYTYPE === void 0 ? void 0 : (_data$$HOLIDAYTYPE$Va = _data$$HOLIDAYTYPE.Value) === null || _data$$HOLIDAYTYPE$Va === void 0 ? void 0 : _data$$HOLIDAYTYPE$Va.map(function (item) {
15300
+ return arry.push({
15301
+ _id: item._id,
15302
+ Value: item._id,
15303
+ label: item.display
15304
+ });
15305
+ });
15306
+ return _context.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15307
+ data: arry
15308
+ }));
15309
+ case 12:
15310
+ _context.prev = 12;
15311
+ _context.t0 = _context["catch"](2);
15312
+ return _context.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15313
+ message: _context.t0.message
15314
+ })));
15315
+ case 15:
15316
+ case "end":
15317
+ return _context.stop();
15318
+ }
15319
+ }
15320
+ }, _callee, null, [[2, 12]]);
15321
+ })));
15322
+ var HOLIDAY_SINGLE_READ_QDM = createAsyncThunk("holidaySlice/holidaySinglereadqdm", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
15323
+ var payload,
15324
+ _ref4,
15325
+ rejectWithValue,
15326
+ body,
15327
+ data,
15328
+ _args2 = arguments;
15329
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
15330
+ while (1) {
15331
+ switch (_context2.prev = _context2.next) {
15332
+ case 0:
15333
+ payload = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {};
15334
+ _ref4 = _args2.length > 1 ? _args2[1] : undefined, rejectWithValue = _ref4.rejectWithValue;
15335
+ _context2.prev = 2;
15336
+ // const { holidayid ="" , allData = false } = _id;
15337
+ body = {
15338
+ "db_name": "primarycareng",
15339
+ "filter": {
15340
+ "holidayid": payload
15341
+ },
15342
+ "queryid": "d7f170d0-f1f0-4f92-bec6-2171f5bbf358"
15343
+ };
15344
+ _context2.next = 6;
15345
+ return fetchData({
15346
+ body: JSON.stringify(body)
15347
+ }, __baseUrl__$1);
15348
+ case 6:
15349
+ data = _context2.sent;
15350
+ console.log(data);
15351
+ return _context2.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15352
+ data: data
15353
+ }));
15354
+ case 11:
15355
+ _context2.prev = 11;
15356
+ _context2.t0 = _context2["catch"](2);
15357
+ return _context2.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15358
+ message: _context2.t0.message
15359
+ })));
15360
+ case 14:
15361
+ case "end":
15362
+ return _context2.stop();
15363
+ }
15364
+ }
15365
+ }, _callee2, null, [[2, 11]]);
15366
+ })));
15367
+ var HOLIDAY_ENTITY_MASTERS_QDM = createAsyncThunk("holidaySlice/entity_read_qdm", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
15368
+ var payload,
15369
+ _ref6,
15370
+ rejectWithValue,
15371
+ body,
15372
+ data,
15373
+ _args3 = arguments;
15374
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
15375
+ while (1) {
15376
+ switch (_context3.prev = _context3.next) {
15377
+ case 0:
15378
+ payload = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : "";
15379
+ _ref6 = _args3.length > 1 ? _args3[1] : undefined, rejectWithValue = _ref6.rejectWithValue;
15380
+ _context3.prev = 2;
15381
+ // const { holidayid ="" , allData = false } = _id;
15382
+ body = {
15383
+ "db_name": "primarycareng",
15384
+ "filter": {
15385
+ "holidayid": payload ? payload : ""
15386
+ },
15387
+ "queryid": "80ccd827-16da-42f5-ac4d-e94b25834229"
15388
+ };
15389
+ _context3.next = 6;
15390
+ return fetchData({
15391
+ body: JSON.stringify(body)
15392
+ }, __baseUrl__$1);
15393
+ case 6:
15394
+ data = _context3.sent;
15395
+ return _context3.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15396
+ data: data
15397
+ }));
15398
+ case 10:
15399
+ _context3.prev = 10;
15400
+ _context3.t0 = _context3["catch"](2);
15401
+ return _context3.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15402
+ message: _context3.t0.message
15403
+ })));
15404
+ case 13:
15405
+ case "end":
15406
+ return _context3.stop();
15407
+ }
15408
+ }
15409
+ }, _callee3, null, [[2, 10]]);
15410
+ })));
15411
+ var HOLIDAY_SINGLE_READ_SELECTED_QDM = createAsyncThunk("holidaySlice/holidaySinglereadSelectedqdm", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
15412
+ var payload,
15413
+ _ref8,
15414
+ rejectWithValue,
15415
+ _id,
15416
+ body,
15417
+ data,
15418
+ _args4 = arguments;
15419
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
15420
+ while (1) {
15421
+ switch (_context4.prev = _context4.next) {
15422
+ case 0:
15423
+ payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
15424
+ _ref8 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref8.rejectWithValue;
15425
+ _context4.prev = 2;
15426
+ _id = 'Holiday/' + payload; // const { holidayid ="" , allData = false } = _id;
15427
+ body = {
15428
+ "db_name": "primarycareng",
15429
+ "filter": {
15430
+ "holidayid": _id
15431
+ },
15432
+ "queryid": "184fb879-244f-495e-a1dd-31f5eae6faf7"
15433
+ };
15434
+ _context4.next = 7;
15435
+ return fetchData({
15436
+ body: JSON.stringify(body)
15437
+ }, __baseUrl__$1);
15438
+ case 7:
15439
+ data = _context4.sent;
15440
+ console.log(data);
15441
+ return _context4.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15442
+ data: data
15443
+ }));
15444
+ case 12:
15445
+ _context4.prev = 12;
15446
+ _context4.t0 = _context4["catch"](2);
15447
+ return _context4.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15448
+ message: _context4.t0.message
15449
+ })));
15450
+ case 15:
15451
+ case "end":
15452
+ return _context4.stop();
15453
+ }
15454
+ }
15455
+ }, _callee4, null, [[2, 12]]);
15456
+ })));
15255
15457
  var loopMasters$7 = function loopMasters() {
15256
15458
  return new es6Promise.Promise( /*#__PURE__*/function () {
15257
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(resolve, reject) {
15459
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(resolve, reject) {
15258
15460
  var calls;
15259
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
15461
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
15260
15462
  while (1) {
15261
- switch (_context2.prev = _context2.next) {
15463
+ switch (_context6.prev = _context6.next) {
15262
15464
  case 0:
15263
15465
  calls = Object.keys(queries$j.holiday_master).map( /*#__PURE__*/function () {
15264
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(val) {
15265
- return _regeneratorRuntime().wrap(function _callee$(_context) {
15466
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(val) {
15467
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
15266
15468
  while (1) {
15267
- switch (_context.prev = _context.next) {
15469
+ switch (_context5.prev = _context5.next) {
15268
15470
  case 0:
15269
- _context.next = 2;
15471
+ _context5.next = 2;
15270
15472
  return fetchMaster$7(val, queries$j.holiday_master[val]);
15271
15473
  case 2:
15272
- return _context.abrupt("return", _context.sent);
15474
+ return _context5.abrupt("return", _context5.sent);
15273
15475
  case 3:
15274
15476
  case "end":
15275
- return _context.stop();
15477
+ return _context5.stop();
15276
15478
  }
15277
15479
  }
15278
- }, _callee);
15480
+ }, _callee5);
15279
15481
  }));
15280
15482
  return function (_x3) {
15281
- return _ref2.apply(this, arguments);
15483
+ return _ref10.apply(this, arguments);
15282
15484
  };
15283
15485
  }());
15284
15486
  es6Promise.Promise.all(calls).then(function (data) {
@@ -15307,428 +15509,557 @@ var loopMasters$7 = function loopMasters() {
15307
15509
  });
15308
15510
  case 2:
15309
15511
  case "end":
15310
- return _context2.stop();
15512
+ return _context6.stop();
15311
15513
  }
15312
15514
  }
15313
- }, _callee2);
15515
+ }, _callee6);
15314
15516
  }));
15315
15517
  return function (_x, _x2) {
15316
- return _ref.apply(this, arguments);
15518
+ return _ref9.apply(this, arguments);
15317
15519
  };
15318
15520
  }());
15319
15521
  };
15320
15522
  var fetchMaster$7 = function fetchMaster(name, query) {
15321
15523
  return new es6Promise.Promise( /*#__PURE__*/function () {
15322
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(resolve, reject) {
15524
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(resolve, reject) {
15323
15525
  var data;
15324
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
15526
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
15325
15527
  while (1) {
15326
- switch (_context3.prev = _context3.next) {
15528
+ switch (_context7.prev = _context7.next) {
15327
15529
  case 0:
15328
- _context3.next = 2;
15530
+ _context7.next = 2;
15329
15531
  return fetchData({
15330
15532
  body: query
15331
15533
  }, __readDocumentUrl__);
15332
15534
  case 2:
15333
- data = _context3.sent;
15535
+ data = _context7.sent;
15334
15536
  resolve({
15335
15537
  data: data.result,
15336
15538
  name: name
15337
15539
  });
15338
15540
  case 4:
15339
15541
  case "end":
15340
- return _context3.stop();
15542
+ return _context7.stop();
15341
15543
  }
15342
15544
  }
15343
- }, _callee3);
15545
+ }, _callee7);
15344
15546
  }));
15345
15547
  return function (_x4, _x5) {
15346
- return _ref3.apply(this, arguments);
15548
+ return _ref11.apply(this, arguments);
15347
15549
  };
15348
15550
  }());
15349
15551
  };
15350
- var HOLIDAY_STATUS_CHANGE = createAsyncThunk("holidaySlice/holidayStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
15552
+ var HOLIDAY_STATUS_CHANGE = createAsyncThunk("holidaySlice/holidayStatus", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15351
15553
  var payload,
15352
- _ref5,
15554
+ _ref13,
15353
15555
  rejectWithValue,
15354
15556
  statuschange,
15355
15557
  queriesjson,
15356
15558
  data,
15357
- _args4 = arguments;
15358
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
15559
+ _args8 = arguments;
15560
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
15359
15561
  while (1) {
15360
- switch (_context4.prev = _context4.next) {
15562
+ switch (_context8.prev = _context8.next) {
15361
15563
  case 0:
15362
- payload = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : {};
15363
- _ref5 = _args4.length > 1 ? _args4[1] : undefined, rejectWithValue = _ref5.rejectWithValue;
15364
- _context4.prev = 2;
15564
+ payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
15565
+ _ref13 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref13.rejectWithValue;
15566
+ _context8.prev = 2;
15365
15567
  statuschange = {
15366
15568
  _key: payload._key,
15367
15569
  status: payload.status
15368
15570
  };
15369
15571
  queriesjson = queries$j.status_update_holiday(statuschange);
15370
- _context4.next = 7;
15572
+ _context8.next = 7;
15371
15573
  return fetchData({
15372
15574
  body: JSON.stringify(queriesjson)
15373
15575
  }, __holidayNifiUrl__);
15374
15576
  case 7:
15375
- data = _context4.sent;
15376
- return _context4.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15577
+ data = _context8.sent;
15578
+ return _context8.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15377
15579
  data: data
15378
15580
  }));
15379
15581
  case 11:
15380
- _context4.prev = 11;
15381
- _context4.t0 = _context4["catch"](2);
15382
- return _context4.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15383
- message: _context4.t0.message
15582
+ _context8.prev = 11;
15583
+ _context8.t0 = _context8["catch"](2);
15584
+ return _context8.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15585
+ message: _context8.t0.message
15384
15586
  })));
15385
15587
  case 14:
15386
15588
  case "end":
15387
- return _context4.stop();
15589
+ return _context8.stop();
15388
15590
  }
15389
15591
  }
15390
- }, _callee4, null, [[2, 11]]);
15592
+ }, _callee8, null, [[2, 11]]);
15391
15593
  })));
15392
- var HOLIDAY_READ = createAsyncThunk("holidaySlice/holidy_list", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
15594
+
15595
+ // const HOLIDAY_READ = createAsyncThunk(
15596
+ // `holidaySlice/holidy_list`,
15597
+ // async (payload = {}, { rejectWithValue }) => {
15598
+ // try {
15599
+ // let readqueries = queries.holiday_read(payload);
15600
+ // const data = await fetchData(
15601
+ // { body: JSON.stringify(readqueries) },
15602
+ // __readDocumentUrl__
15603
+ // );
15604
+
15605
+ // let arry = [];
15606
+ // data?.result.map((val) => {
15607
+ // if (val._key) {
15608
+ // arry.push({
15609
+ // total_count: val?.TotalCount,
15610
+ // date: val.CalDate ? utcTOLocal(val.CalDate, "DD-MMM") : null,
15611
+ // CalYear: val.CalYear ? val.CalYear : null,
15612
+ // day: val.CalDay ? val.CalDay?.display : "",
15613
+ // holiday_reason: val.HolidayReason ? val.HolidayReason : "",
15614
+ // holiday_type: val?.HolidayType ? val?.HolidayType?.display : "",
15615
+ // _key: val._key ? val._key : "",
15616
+ // status: val.status ? val.status : false,
15617
+ // copyData: data?.result,
15618
+ // });
15619
+ // }
15620
+ // });
15621
+ // debugger;
15622
+ // return {
15623
+ // ...defaultState.List,
15624
+ // data: arry,
15625
+ // };
15626
+ // } catch (error) {
15627
+ // console.log(error, "error");
15628
+ // return rejectWithValue({
15629
+ // ...defaultReject.List,
15630
+ // message: error.message,
15631
+ // });
15632
+ // }
15633
+ // }
15634
+ // );
15635
+
15636
+ var HOLIDAY_READ_QDM = createAsyncThunk("holidaySlice/holiday_qdm", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15393
15637
  var payload,
15394
- _ref7,
15638
+ _ref15,
15395
15639
  rejectWithValue,
15396
- readqueries,
15640
+ _payload$CalYear,
15641
+ CalYear,
15642
+ _payload$page,
15643
+ page,
15644
+ _payload$perPage,
15645
+ perPage,
15646
+ body,
15397
15647
  data,
15398
15648
  arry,
15399
- _args5 = arguments;
15400
- return _regeneratorRuntime().wrap(function _callee5$(_context5) {
15649
+ _args9 = arguments;
15650
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
15401
15651
  while (1) {
15402
- switch (_context5.prev = _context5.next) {
15652
+ switch (_context9.prev = _context9.next) {
15403
15653
  case 0:
15404
- payload = _args5.length > 0 && _args5[0] !== undefined ? _args5[0] : {};
15405
- _ref7 = _args5.length > 1 ? _args5[1] : undefined, rejectWithValue = _ref7.rejectWithValue;
15406
- _context5.prev = 2;
15407
- readqueries = queries$j.holiday_read(payload);
15408
- _context5.next = 6;
15654
+ payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
15655
+ _ref15 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref15.rejectWithValue;
15656
+ _context9.prev = 2;
15657
+ _payload$CalYear = payload.CalYear, CalYear = _payload$CalYear === void 0 ? "" : _payload$CalYear, _payload$page = payload.page, page = _payload$page === void 0 ? "" : _payload$page, _payload$perPage = payload.perPage, perPage = _payload$perPage === void 0 ? "" : _payload$perPage, payload.allData;
15658
+ body = {
15659
+ "db_name": "primarycareng",
15660
+ "filter": {
15661
+ "year": CalYear,
15662
+ "page": page,
15663
+ "perPage": perPage
15664
+ },
15665
+ "queryid": "e8a3d9b8-2503-47e2-9b02-b6abeebef45f"
15666
+ }; // let readqueries = qdmQueries.holiday_read_qdm(payload);
15667
+ _context9.next = 7;
15409
15668
  return fetchData({
15410
- body: JSON.stringify(readqueries)
15411
- }, __readDocumentUrl__);
15412
- case 6:
15413
- data = _context5.sent;
15669
+ body: JSON.stringify(body)
15670
+ }, __baseUrl__$1);
15671
+ case 7:
15672
+ data = _context9.sent;
15414
15673
  arry = [];
15415
- data === null || data === void 0 ? void 0 : data.result.map(function (val) {
15674
+ data === null || data === void 0 ? void 0 : data.map(function (val) {
15416
15675
  if (val._key) {
15417
- var _val$CalDay, _val$HolidayType;
15676
+ var _val$CalDay;
15418
15677
  arry.push({
15419
- total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
15420
- date: val.CalDate ? utcTOLocal(val.CalDate, "DD-MMM") : null,
15678
+ total_count: val === null || val === void 0 ? void 0 : val.total_count,
15679
+ date: val.CalDate ? utcTOLocal(val.CalDate, "DD-MM-YYYY") : null,
15421
15680
  CalYear: val.CalYear ? val.CalYear : null,
15422
15681
  day: val.CalDay ? (_val$CalDay = val.CalDay) === null || _val$CalDay === void 0 ? void 0 : _val$CalDay.display : "",
15423
15682
  holiday_reason: val.HolidayReason ? val.HolidayReason : "",
15424
- holiday_type: val !== null && val !== void 0 && val.HolidayType ? val === null || val === void 0 ? void 0 : (_val$HolidayType = val.HolidayType) === null || _val$HolidayType === void 0 ? void 0 : _val$HolidayType.display : "",
15425
- _key: val._key ? val._key : "",
15683
+ holiday_type: val !== null && val !== void 0 && val.HolidayType ? val === null || val === void 0 ? void 0 : val.HolidayType : "",
15684
+ _id: val._id ? val._id : "",
15426
15685
  status: val.status ? val.status : false,
15427
- copyData: data === null || data === void 0 ? void 0 : data.result
15686
+ copyData: data === null || data === void 0 ? void 0 : data.result,
15687
+ TotalCountByYear: val === null || val === void 0 ? void 0 : val.TotalCountByYear
15428
15688
  });
15429
15689
  }
15430
15690
  });
15431
15691
  debugger;
15432
- return _context5.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15692
+ return _context9.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15433
15693
  data: arry
15434
15694
  }));
15435
- case 13:
15436
- _context5.prev = 13;
15437
- _context5.t0 = _context5["catch"](2);
15438
- console.log(_context5.t0, "error");
15439
- return _context5.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject.List), {}, {
15440
- message: _context5.t0.message
15695
+ case 14:
15696
+ _context9.prev = 14;
15697
+ _context9.t0 = _context9["catch"](2);
15698
+ console.log(_context9.t0, "error");
15699
+ return _context9.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject.List), {}, {
15700
+ message: _context9.t0.message
15441
15701
  })));
15442
- case 17:
15702
+ case 18:
15443
15703
  case "end":
15444
- return _context5.stop();
15704
+ return _context9.stop();
15445
15705
  }
15446
15706
  }
15447
- }, _callee5, null, [[2, 13]]);
15707
+ }, _callee9, null, [[2, 14]]);
15448
15708
  })));
15449
- var HOLIDAY_SINGLE_READ = createAsyncThunk("holidaySlice/holidy_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
15709
+ var HOLIDAY_SINGLE_READ = createAsyncThunk("holidaySlice/holidy_single_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15450
15710
  var payload,
15451
- _ref9,
15711
+ _ref17,
15452
15712
  rejectWithValue,
15453
15713
  readqueries,
15454
15714
  data,
15455
15715
  arry,
15456
- _args6 = arguments;
15457
- return _regeneratorRuntime().wrap(function _callee6$(_context6) {
15716
+ _args10 = arguments;
15717
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
15458
15718
  while (1) {
15459
- switch (_context6.prev = _context6.next) {
15719
+ switch (_context10.prev = _context10.next) {
15460
15720
  case 0:
15461
- payload = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {};
15462
- _ref9 = _args6.length > 1 ? _args6[1] : undefined, rejectWithValue = _ref9.rejectWithValue;
15721
+ payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
15722
+ _ref17 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
15463
15723
  console.log(payload, "p-p");
15464
- _context6.prev = 3;
15724
+ _context10.prev = 3;
15465
15725
  debugger;
15466
15726
  readqueries = queries$j.holiday_single_read(payload);
15467
- _context6.next = 8;
15727
+ _context10.next = 8;
15468
15728
  return fetchData({
15469
15729
  body: JSON.stringify(readqueries)
15470
15730
  }, __readDocumentUrl__);
15471
15731
  case 8:
15472
- data = _context6.sent;
15732
+ data = _context10.sent;
15473
15733
  arry = [];
15474
15734
  data === null || data === void 0 ? void 0 : data.result.map(function (val) {
15475
15735
  if (val._key) {
15476
- var _val$CalDay2, _val$HolidayType2;
15736
+ var _val$CalDay2, _val$HolidayType;
15477
15737
  arry.push({
15478
15738
  total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
15479
15739
  date: val.CalDate ? utcTOLocal(val.CalDate, "DD-MM-YY") : null,
15480
15740
  CalYear: val.CalYear ? val.CalYear : null,
15481
15741
  day: val.CalDay ? (_val$CalDay2 = val.CalDay) === null || _val$CalDay2 === void 0 ? void 0 : _val$CalDay2.display : "",
15482
15742
  holiday_reason: val.HolidayReason ? val.HolidayReason : "",
15483
- holiday_type: val !== null && val !== void 0 && val.HolidayType ? val === null || val === void 0 ? void 0 : (_val$HolidayType2 = val.HolidayType) === null || _val$HolidayType2 === void 0 ? void 0 : _val$HolidayType2.display : "",
15743
+ holiday_type: val !== null && val !== void 0 && val.HolidayType ? val === null || val === void 0 ? void 0 : (_val$HolidayType = val.HolidayType) === null || _val$HolidayType === void 0 ? void 0 : _val$HolidayType.display : "",
15484
15744
  _key: val._key ? val._key : "",
15485
15745
  status: val.status ? val.status : false
15486
15746
  });
15487
15747
  }
15488
15748
  });
15489
15749
  debugger;
15490
- return _context6.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15750
+ return _context10.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15491
15751
  data: data
15492
15752
  }));
15493
15753
  case 15:
15494
- _context6.prev = 15;
15495
- _context6.t0 = _context6["catch"](3);
15496
- console.log(_context6.t0, "error");
15497
- return _context6.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject.List), {}, {
15498
- message: _context6.t0.message
15754
+ _context10.prev = 15;
15755
+ _context10.t0 = _context10["catch"](3);
15756
+ console.log(_context10.t0, "error");
15757
+ return _context10.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject.List), {}, {
15758
+ message: _context10.t0.message
15499
15759
  })));
15500
15760
  case 19:
15501
15761
  case "end":
15502
- return _context6.stop();
15762
+ return _context10.stop();
15503
15763
  }
15504
15764
  }
15505
- }, _callee6, null, [[3, 15]]);
15765
+ }, _callee10, null, [[3, 15]]);
15506
15766
  })));
15507
- var HOLIDAY_SINGLE_READ_SELECTED = createAsyncThunk("holidaySlice/holidy_single_read_selected", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
15767
+ var HOLIDAY_SINGLE_READ_SELECTED = createAsyncThunk("holidaySlice/holidy_single_read_selected", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15508
15768
  var payload,
15509
- _ref11,
15769
+ _ref19,
15510
15770
  rejectWithValue,
15511
15771
  readqueries,
15512
15772
  data,
15513
15773
  arry,
15514
- _args7 = arguments;
15515
- return _regeneratorRuntime().wrap(function _callee7$(_context7) {
15774
+ _args11 = arguments;
15775
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
15516
15776
  while (1) {
15517
- switch (_context7.prev = _context7.next) {
15777
+ switch (_context11.prev = _context11.next) {
15518
15778
  case 0:
15519
- payload = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {};
15520
- _ref11 = _args7.length > 1 ? _args7[1] : undefined, rejectWithValue = _ref11.rejectWithValue;
15779
+ payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
15780
+ _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
15521
15781
  console.log(payload, "p-p123");
15522
- _context7.prev = 3;
15782
+ _context11.prev = 3;
15523
15783
  debugger;
15524
15784
  readqueries = queries$j.holiday_single_read_selected(payload);
15525
- _context7.next = 8;
15785
+ _context11.next = 8;
15526
15786
  return fetchData({
15527
15787
  body: JSON.stringify(readqueries)
15528
15788
  }, __readDocumentUrl__);
15529
15789
  case 8:
15530
- data = _context7.sent;
15790
+ data = _context11.sent;
15531
15791
  console.log(data, "kkdkkde");
15532
15792
  arry = [];
15533
15793
  data === null || data === void 0 ? void 0 : data.result.map(function (val) {
15534
15794
  if (val._key) {
15535
- var _val$CalDay3, _val$HolidayType3;
15795
+ var _val$CalDay3, _val$HolidayType2;
15536
15796
  arry.push({
15537
15797
  total_count: val === null || val === void 0 ? void 0 : val.TotalCount,
15538
15798
  date: val.CalDate ? utcTOLocal(val.CalDate, "DD-MM-YY") : null,
15539
15799
  CalYear: val.CalYear ? val.CalYear : null,
15540
15800
  day: val.CalDay ? (_val$CalDay3 = val.CalDay) === null || _val$CalDay3 === void 0 ? void 0 : _val$CalDay3.display : "",
15541
15801
  holiday_reason: val.HolidayReason ? val.HolidayReason : "",
15542
- holiday_type: val !== null && val !== void 0 && val.HolidayType ? val === null || val === void 0 ? void 0 : (_val$HolidayType3 = val.HolidayType) === null || _val$HolidayType3 === void 0 ? void 0 : _val$HolidayType3.display : "",
15802
+ holiday_type: val !== null && val !== void 0 && val.HolidayType ? val === null || val === void 0 ? void 0 : (_val$HolidayType2 = val.HolidayType) === null || _val$HolidayType2 === void 0 ? void 0 : _val$HolidayType2.display : "",
15543
15803
  _key: val._key ? val._key : "",
15544
15804
  status: val.status ? val.status : false
15545
15805
  });
15546
15806
  }
15547
15807
  });
15548
15808
  debugger;
15549
- return _context7.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15809
+ return _context11.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15550
15810
  data: data
15551
15811
  }));
15552
15812
  case 16:
15553
- _context7.prev = 16;
15554
- _context7.t0 = _context7["catch"](3);
15555
- console.log(_context7.t0, "error");
15556
- return _context7.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject.List), {}, {
15557
- message: _context7.t0.message
15813
+ _context11.prev = 16;
15814
+ _context11.t0 = _context11["catch"](3);
15815
+ console.log(_context11.t0, "error");
15816
+ return _context11.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject.List), {}, {
15817
+ message: _context11.t0.message
15558
15818
  })));
15559
15819
  case 20:
15560
15820
  case "end":
15561
- return _context7.stop();
15821
+ return _context11.stop();
15562
15822
  }
15563
15823
  }
15564
- }, _callee7, null, [[3, 16]]);
15824
+ }, _callee11, null, [[3, 16]]);
15565
15825
  })));
15566
- var HOLIDAY_UPSERT = createAsyncThunk("holidaySlice/holiday_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
15826
+ var HOLIDAY_UPSERT = createAsyncThunk("holidaySlice/holiday_upsert", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
15827
+ var _payload$data;
15567
15828
  var payload,
15568
- _ref13,
15829
+ _ref21,
15569
15830
  rejectWithValue,
15570
15831
  url,
15571
- _payload$,
15832
+ _payload$data2,
15833
+ _payload$data2$,
15572
15834
  data,
15573
- _args8 = arguments;
15574
- return _regeneratorRuntime().wrap(function _callee8$(_context8) {
15835
+ _args12 = arguments;
15836
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
15575
15837
  while (1) {
15576
- switch (_context8.prev = _context8.next) {
15838
+ switch (_context12.prev = _context12.next) {
15577
15839
  case 0:
15578
- payload = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : {};
15579
- _ref13 = _args8.length > 1 ? _args8[1] : undefined, rejectWithValue = _ref13.rejectWithValue;
15840
+ payload = _args12.length > 0 && _args12[0] !== undefined ? _args12[0] : {};
15841
+ _ref21 = _args12.length > 1 ? _args12[1] : undefined, rejectWithValue = _ref21.rejectWithValue;
15580
15842
  console.log(payload, "testPayloadd");
15581
- if (payload.length) {
15582
- if ((_payload$ = payload[0]) !== null && _payload$ !== void 0 && _payload$._key) {
15583
- url = __nifiEditUrl__;
15843
+ if ((payload === null || payload === void 0 ? void 0 : (_payload$data = payload.data) === null || _payload$data === void 0 ? void 0 : _payload$data.length) > 0) {
15844
+ if (payload !== null && payload !== void 0 && (_payload$data2 = payload.data) !== null && _payload$data2 !== void 0 && (_payload$data2$ = _payload$data2[0]) !== null && _payload$data2$ !== void 0 && _payload$data2$._id) {
15845
+ url = __holidayEditUrl__;
15584
15846
  } else {
15585
- url = __nifiAddUrl__;
15847
+ url = __holidayAddUrl__;
15586
15848
  }
15587
15849
  }
15588
- _context8.prev = 4;
15589
- _context8.next = 7;
15850
+ _context12.prev = 4;
15851
+ _context12.next = 7;
15590
15852
  return fetchData({
15591
- body: JSON.stringify(payload)
15592
- }, url);
15853
+ body: JSON.stringify(payload === null || payload === void 0 ? void 0 : payload.data)
15854
+ }, url, payload === null || payload === void 0 ? void 0 : payload.jwtToken);
15593
15855
  case 7:
15594
- data = _context8.sent;
15856
+ data = _context12.sent;
15595
15857
  console.log(data, "sdkfsdkjasdfr");
15596
- return _context8.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15858
+ return _context12.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15597
15859
  data: data
15598
15860
  }));
15599
15861
  case 12:
15600
- _context8.prev = 12;
15601
- _context8.t0 = _context8["catch"](4);
15602
- return _context8.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15603
- message: _context8.t0.message
15862
+ _context12.prev = 12;
15863
+ _context12.t0 = _context12["catch"](4);
15864
+ return _context12.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15865
+ message: _context12.t0.message
15604
15866
  })));
15605
15867
  case 15:
15606
15868
  case "end":
15607
- return _context8.stop();
15869
+ return _context12.stop();
15608
15870
  }
15609
15871
  }
15610
- }, _callee8, null, [[4, 12]]);
15872
+ }, _callee12, null, [[4, 12]]);
15611
15873
  })));
15612
- var HOLIDAY_MASTERS = createAsyncThunk("holidaySlice/holiday_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
15874
+ var HOLIDAY_MASTERS = createAsyncThunk("holidaySlice/holiday_master", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
15613
15875
  var payload,
15614
- _ref15,
15876
+ _ref23,
15615
15877
  rejectWithValue,
15616
15878
  data,
15617
- _args9 = arguments;
15618
- return _regeneratorRuntime().wrap(function _callee9$(_context9) {
15879
+ _args13 = arguments;
15880
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
15619
15881
  while (1) {
15620
- switch (_context9.prev = _context9.next) {
15882
+ switch (_context13.prev = _context13.next) {
15621
15883
  case 0:
15622
- payload = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : {};
15623
- _ref15 = _args9.length > 1 ? _args9[1] : undefined, rejectWithValue = _ref15.rejectWithValue;
15624
- _context9.prev = 2;
15884
+ payload = _args13.length > 0 && _args13[0] !== undefined ? _args13[0] : {};
15885
+ _ref23 = _args13.length > 1 ? _args13[1] : undefined, rejectWithValue = _ref23.rejectWithValue;
15886
+ _context13.prev = 2;
15625
15887
  payload.type;
15626
- _context9.next = 6;
15888
+ _context13.next = 6;
15627
15889
  return loopMasters$7();
15628
15890
  case 6:
15629
- data = _context9.sent;
15630
- return _context9.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
15891
+ data = _context13.sent;
15892
+ return _context13.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.Info), {}, {
15631
15893
  data: data
15632
15894
  }));
15633
15895
  case 10:
15634
- _context9.prev = 10;
15635
- _context9.t0 = _context9["catch"](2);
15636
- return _context9.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15637
- message: _context9.t0.message
15896
+ _context13.prev = 10;
15897
+ _context13.t0 = _context13["catch"](2);
15898
+ return _context13.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15899
+ message: _context13.t0.message
15638
15900
  })));
15639
15901
  case 13:
15640
15902
  case "end":
15641
- return _context9.stop();
15903
+ return _context13.stop();
15642
15904
  }
15643
15905
  }
15644
- }, _callee9, null, [[2, 10]]);
15906
+ }, _callee13, null, [[2, 10]]);
15645
15907
  })));
15646
- var ENTITY_MASTERS = createAsyncThunk("holidaySlice/entity_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
15908
+ var ENTITY_MASTERS = createAsyncThunk("holidaySlice/entity_read", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
15647
15909
  var payload,
15648
- _ref17,
15910
+ _ref25,
15649
15911
  rejectWithValue,
15650
15912
  _payload$search,
15651
15913
  queriesjson,
15652
15914
  data,
15653
- _args10 = arguments;
15654
- return _regeneratorRuntime().wrap(function _callee10$(_context10) {
15915
+ _args14 = arguments;
15916
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
15655
15917
  while (1) {
15656
- switch (_context10.prev = _context10.next) {
15918
+ switch (_context14.prev = _context14.next) {
15657
15919
  case 0:
15658
- payload = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : {};
15659
- _ref17 = _args10.length > 1 ? _args10[1] : undefined, rejectWithValue = _ref17.rejectWithValue;
15660
- _context10.prev = 2;
15920
+ payload = _args14.length > 0 && _args14[0] !== undefined ? _args14[0] : {};
15921
+ _ref25 = _args14.length > 1 ? _args14[1] : undefined, rejectWithValue = _ref25.rejectWithValue;
15922
+ _context14.prev = 2;
15661
15923
  queriesjson = queries$j.entity_read((_payload$search = payload === null || payload === void 0 ? void 0 : payload.search) !== null && _payload$search !== void 0 ? _payload$search : "");
15662
- _context10.next = 6;
15924
+ _context14.next = 6;
15663
15925
  return fetchData({
15664
15926
  body: JSON.stringify(queriesjson)
15665
15927
  }, __baseUrl__$1
15666
15928
  // __readDocumentUrl__
15667
15929
  );
15668
15930
  case 6:
15669
- data = _context10.sent;
15931
+ data = _context14.sent;
15670
15932
  console.log(data, "datasst");
15671
- return _context10.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15933
+ return _context14.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15672
15934
  data: data
15673
15935
  }));
15674
15936
  case 11:
15675
- _context10.prev = 11;
15676
- _context10.t0 = _context10["catch"](2);
15677
- return _context10.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15678
- message: _context10.t0.message
15937
+ _context14.prev = 11;
15938
+ _context14.t0 = _context14["catch"](2);
15939
+ return _context14.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15940
+ message: _context14.t0.message
15679
15941
  })));
15680
15942
  case 14:
15681
15943
  case "end":
15682
- return _context10.stop();
15944
+ return _context14.stop();
15683
15945
  }
15684
15946
  }
15685
- }, _callee10, null, [[2, 11]]);
15947
+ }, _callee14, null, [[2, 11]]);
15686
15948
  })));
15687
- var HOLIDAY_STATUS_REASON = createAsyncThunk("holidaySlice/holidy_status_reason", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
15949
+ // const HOLIDAY_STATUS_REASON = createAsyncThunk(
15950
+ // `holidaySlice/holidy_status_reason`,
15951
+ // async (payload = {}, { rejectWithValue }) => {
15952
+ // // try {
15953
+ // // debugger;
15954
+ // // let readqueries = queries.holiday_status_reason(payload);
15955
+ // // const data = await fetchData(
15956
+ // // { body: JSON.stringify(readqueries) },
15957
+ // // _readDocumentUrl_
15958
+ // // );
15959
+ // // console.log(readqueries, "skdfksdjirrtr");
15960
+ // // debugger;
15961
+ // // return {
15962
+ // // ...defaultState.List,
15963
+ // // data: data,
15964
+ // // };
15965
+ // // } catch (error) {
15966
+ // // console.log(error, "error");
15967
+ // // return rejectWithValue({
15968
+ // // ...defaultReject.List,
15969
+ // // message: error.message,
15970
+ // // });
15971
+ // // }
15972
+ // try {
15973
+ // let queriesjson = queries.holiday_status_reason(payload);
15974
+ // const data = await fetchData(
15975
+ // { body: JSON.stringify(queriesjson) },
15976
+ // // __baseUrl__
15977
+ // __readDocumentUrl__
15978
+ // );
15979
+ // console.log(data, "datass12t");
15980
+ // return {
15981
+ // ...defaultState.List,
15982
+ // data: data,
15983
+ // };
15984
+ // } catch (error) {
15985
+ // return rejectWithValue({
15986
+ // ...defaultReject,
15987
+ // message: error.message,
15988
+ // });
15989
+ // }
15990
+ // }
15991
+ // );
15992
+
15993
+ var HOLIDAY_STATUS_REASON_QDM = createAsyncThunk("holidaySlice/holidayStatusReasonqdm", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
15688
15994
  var payload,
15689
- _ref19,
15995
+ _ref27,
15690
15996
  rejectWithValue,
15691
- queriesjson,
15997
+ _data$2,
15998
+ _data$2$HOLIDAYREASON,
15999
+ _data$2$HOLIDAYREASON2,
16000
+ body,
15692
16001
  data,
15693
- _args11 = arguments;
15694
- return _regeneratorRuntime().wrap(function _callee11$(_context11) {
16002
+ arry,
16003
+ _args15 = arguments;
16004
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
15695
16005
  while (1) {
15696
- switch (_context11.prev = _context11.next) {
16006
+ switch (_context15.prev = _context15.next) {
15697
16007
  case 0:
15698
- payload = _args11.length > 0 && _args11[0] !== undefined ? _args11[0] : {};
15699
- _ref19 = _args11.length > 1 ? _args11[1] : undefined, rejectWithValue = _ref19.rejectWithValue;
15700
- _context11.prev = 2;
15701
- queriesjson = queries$j.holiday_status_reason(payload);
15702
- _context11.next = 6;
16008
+ payload = _args15.length > 0 && _args15[0] !== undefined ? _args15[0] : {};
16009
+ _ref27 = _args15.length > 1 ? _args15[1] : undefined, rejectWithValue = _ref27.rejectWithValue;
16010
+ _context15.prev = 2;
16011
+ // const { type = [], tenantid ="", facilityid="",lang="", allData = false } = payload;
16012
+ body = {
16013
+ "db_name": "primarycareng",
16014
+ "filter": {
16015
+ "type": [payload],
16016
+ "tenantid": "",
16017
+ "facilityid": "",
16018
+ "lang": ""
16019
+ },
16020
+ "queryid": "5c46abcb-a1d6-4c2f-ae4f-93ae551a0c6e"
16021
+ };
16022
+ _context15.next = 6;
15703
16023
  return fetchData({
15704
- body: JSON.stringify(queriesjson)
15705
- },
15706
- // __baseUrl__
15707
- __readDocumentUrl__);
16024
+ body: JSON.stringify(body)
16025
+ }, __baseUrl__$1);
15708
16026
  case 6:
15709
- data = _context11.sent;
15710
- console.log(data, "datass12t");
15711
- return _context11.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
15712
- data: data
16027
+ data = _context15.sent;
16028
+ arry = [];
16029
+ (_data$2 = data[0]) === null || _data$2 === void 0 ? void 0 : (_data$2$HOLIDAYREASON = _data$2.HOLIDAYREASON) === null || _data$2$HOLIDAYREASON === void 0 ? void 0 : (_data$2$HOLIDAYREASON2 = _data$2$HOLIDAYREASON.Value) === null || _data$2$HOLIDAYREASON2 === void 0 ? void 0 : _data$2$HOLIDAYREASON2.map(function (item) {
16030
+ return arry.push({
16031
+ _id: item._id,
16032
+ Value: item._id,
16033
+ label: item.display
16034
+ });
16035
+ });
16036
+ return _context15.abrupt("return", _objectSpread2$1(_objectSpread2$1({}, defaultState.List), {}, {
16037
+ data: arry
15713
16038
  }));
15714
- case 11:
15715
- _context11.prev = 11;
15716
- _context11.t0 = _context11["catch"](2);
15717
- return _context11.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
15718
- message: _context11.t0.message
16039
+ case 12:
16040
+ _context15.prev = 12;
16041
+ _context15.t0 = _context15["catch"](2);
16042
+ return _context15.abrupt("return", rejectWithValue(_objectSpread2$1(_objectSpread2$1({}, defaultReject), {}, {
16043
+ message: _context15.t0.message
15719
16044
  })));
15720
- case 14:
16045
+ case 15:
15721
16046
  case "end":
15722
- return _context11.stop();
16047
+ return _context15.stop();
15723
16048
  }
15724
16049
  }
15725
- }, _callee11, null, [[2, 11]]);
16050
+ }, _callee15, null, [[2, 12]]);
15726
16051
  })));
15727
16052
  var holidaySlice = createSlice({
15728
16053
  name: "holidaySlice",
15729
16054
  initialState: {
16055
+ holidaySinglereadqdm: _objectSpread2$1({}, defaultState.List),
16056
+ holidaySinglereadSelectedqdm: _objectSpread2$1({}, defaultState.List),
16057
+ entity_read_qdm: _objectSpread2$1({}, defaultState.List),
16058
+ holidayStatusReasonqdm: _objectSpread2$1({}, defaultState.List),
16059
+ holidayTypeqdm: _objectSpread2$1({}, defaultState.List),
15730
16060
  status_update: _objectSpread2$1({}, defaultState.List),
15731
16061
  holidy_list: _objectSpread2$1({}, defaultState.List),
16062
+ holiday_qdm: _objectSpread2$1({}, defaultState.List),
15732
16063
  holidy_single_list: _objectSpread2$1({}, defaultState.List),
15733
16064
  holidy_single_list_selected: _objectSpread2$1({}, defaultState.List),
15734
16065
  holiday_upsert: _objectSpread2$1({}, defaultState.List),
@@ -15742,12 +16073,24 @@ var holidaySlice = createSlice({
15742
16073
  state.status_update.loading = true, state.status_update.error = false, state.status_update.loading = true;
15743
16074
  }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_CHANGE.rejected, function (state, action) {
15744
16075
  state.status_update.loading = false, state.status_update.error = true, state.status_update = action.payload;
15745
- }), _defineProperty(_extraReducers$B, HOLIDAY_READ.fulfilled, function (state, action) {
15746
- state.holidy_list.loading = false, state.holidy_list.error = false, state.holidy_list = action.payload;
15747
- }), _defineProperty(_extraReducers$B, HOLIDAY_READ.pending, function (state, action) {
15748
- state.holidy_list.loading = true, state.holidy_list.error = false, state.holidy_list.loading = true;
15749
- }), _defineProperty(_extraReducers$B, HOLIDAY_READ.rejected, function (state, action) {
15750
- state.holidy_list.loading = false, state.holidy_list.error = true, state.holidy_list = action.payload;
16076
+ }), _defineProperty(_extraReducers$B, GET_HOLIDAY_TYPE.fulfilled, function (state, action) {
16077
+ state.holidayTypeqdm.loading = false, state.holidayTypeqdm.error = false, state.holidayTypeqdm = action.payload;
16078
+ }), _defineProperty(_extraReducers$B, GET_HOLIDAY_TYPE.pending, function (state, action) {
16079
+ state.holidayTypeqdm.loading = true, state.holidayTypeqdm.error = false, state.holidayTypeqdm.loading = true;
16080
+ }), _defineProperty(_extraReducers$B, GET_HOLIDAY_TYPE.rejected, function (state, action) {
16081
+ state.holidayTypeqdm.loading = false, state.holidayTypeqdm.error = true, state.holidayTypeqdm = action.payload;
16082
+ }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_REASON_QDM.fulfilled, function (state, action) {
16083
+ state.holidayStatusReasonqdm.loading = false, state.holidayStatusReasonqdm.error = false, state.holidayStatusReasonqdm = action.payload;
16084
+ }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_REASON_QDM.pending, function (state, action) {
16085
+ state.holidayStatusReasonqdm.loading = true, state.holidayStatusReasonqdm.error = false, state.holidayStatusReasonqdm.loading = true;
16086
+ }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_REASON_QDM.rejected, function (state, action) {
16087
+ state.holidayStatusReasonqdm.loading = false, state.holidayStatusReasonqdm.error = true, state.holidayStatusReasonqdm = action.payload;
16088
+ }), _defineProperty(_extraReducers$B, HOLIDAY_READ_QDM.fulfilled, function (state, action) {
16089
+ state.holiday_qdm.loading = false, state.holiday_qdm.error = false, state.holiday_qdm = action.payload;
16090
+ }), _defineProperty(_extraReducers$B, HOLIDAY_READ_QDM.pending, function (state, action) {
16091
+ state.holiday_qdm.loading = true, state.holiday_qdm.error = false, state.holiday_qdm.loading = true;
16092
+ }), _defineProperty(_extraReducers$B, HOLIDAY_READ_QDM.rejected, function (state, action) {
16093
+ state.holiday_qdm.loading = false, state.holiday_qdm.error = true, state.holiday_qdm = action.payload;
15751
16094
  }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ.fulfilled, function (state, action) {
15752
16095
  state.holidy_single_list.loading = false, state.holidy_single_list.error = false, state.holidy_single_list = action.payload;
15753
16096
  }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ.pending, function (state, action) {
@@ -15778,23 +16121,45 @@ var holidaySlice = createSlice({
15778
16121
  state.entity_master.loading = true, state.entity_master.error = false, state.entity_master.loading = true;
15779
16122
  }), _defineProperty(_extraReducers$B, ENTITY_MASTERS.rejected, function (state, action) {
15780
16123
  state.entity_master.loading = false, state.entity_master.error = true, state.entity_master = action.payload;
15781
- }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_REASON.fulfilled, function (state, action) {
15782
- state.holidy_status_reason.loading = false, state.holidy_status_reason.error = false, state.holidy_status_reason = action.payload;
15783
- }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_REASON.pending, function (state, action) {
15784
- state.holidy_status_reason.loading = true, state.holidy_status_reason.error = false, state.holidy_status_reason.loading = true;
15785
- }), _defineProperty(_extraReducers$B, HOLIDAY_STATUS_REASON.rejected, function (state, action) {
15786
- state.holidy_status_reason.loading = false, state.holidy_status_reason.error = true, state.holidy_status_reason = action.payload;
16124
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_QDM.fulfilled, function (state, action) {
16125
+ state.holidaySinglereadqdm.loading = false, state.holidaySinglereadqdm.error = false, state.holidaySinglereadqdm = action.payload;
16126
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_QDM.pending, function (state, action) {
16127
+ state.holidaySinglereadqdm.loading = true, state.holidaySinglereadqdm.error = false, state.holidaySinglereadqdm.loading = true;
16128
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_QDM.rejected, function (state, action) {
16129
+ state.holidaySinglereadqdm.loading = false, state.holidaySinglereadqdm.error = true, state.holidaySinglereadqdm = action.payload;
16130
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_SELECTED.fulfilled, function (state, action) {
16131
+ state.holidy_single_list_selected.loading = false, state.holidy_single_list_selected.error = false, state.holidy_single_list_selected = action.payload;
16132
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_SELECTED.pending, function (state, action) {
16133
+ state.holidy_single_list_selected.loading = true, state.holidy_single_list_selected.error = false, state.holidy_single_list_selected.loading = true;
16134
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_SELECTED.rejected, function (state, action) {
16135
+ state.holidy_single_list_selected.loading = false, state.holidy_single_list_selected.error = true, state.holidy_single_list_selected = action.payload;
16136
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_SELECTED_QDM.fulfilled, function (state, action) {
16137
+ state.holidaySinglereadSelectedqdm.loading = false, state.holidaySinglereadSelectedqdm.error = false, state.holidaySinglereadSelectedqdm = action.payload;
16138
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_SELECTED_QDM.pending, function (state, action) {
16139
+ state.holidaySinglereadSelectedqdm.loading = true, state.holidaySinglereadSelectedqdm.error = false, state.holidaySinglereadSelectedqdm.loading = true;
16140
+ }), _defineProperty(_extraReducers$B, HOLIDAY_SINGLE_READ_SELECTED_QDM.rejected, function (state, action) {
16141
+ state.holidaySinglereadSelectedqdm.loading = false, state.holidaySinglereadSelectedqdm.error = true, state.holidaySinglereadSelectedqdm = action.payload;
16142
+ }), _defineProperty(_extraReducers$B, HOLIDAY_ENTITY_MASTERS_QDM.fulfilled, function (state, action) {
16143
+ state.entity_read_qdm.loading = false, state.entity_read_qdm.error = false, state.entity_read_qdm = action.payload;
16144
+ }), _defineProperty(_extraReducers$B, HOLIDAY_ENTITY_MASTERS_QDM.pending, function (state, action) {
16145
+ state.entity_read_qdm.loading = true, state.entity_read_qdm.error = false, state.entity_read_qdm.loading = true;
16146
+ }), _defineProperty(_extraReducers$B, HOLIDAY_ENTITY_MASTERS_QDM.rejected, function (state, action) {
16147
+ state.entity_read_qdm.loading = false, state.entity_read_qdm.error = true, state.entity_read_qdm = action.payload;
15787
16148
  }), _extraReducers$B)
15788
16149
  });
15789
16150
  var holidayActions = {
15790
16151
  HOLIDAY_STATUS_CHANGE: HOLIDAY_STATUS_CHANGE,
15791
- HOLIDAY_READ: HOLIDAY_READ,
16152
+ HOLIDAY_READ_QDM: HOLIDAY_READ_QDM,
15792
16153
  HOLIDAY_UPSERT: HOLIDAY_UPSERT,
15793
16154
  HOLIDAY_MASTERS: HOLIDAY_MASTERS,
15794
16155
  ENTITY_MASTERS: ENTITY_MASTERS,
15795
16156
  HOLIDAY_SINGLE_READ: HOLIDAY_SINGLE_READ,
15796
16157
  HOLIDAY_SINGLE_READ_SELECTED: HOLIDAY_SINGLE_READ_SELECTED,
15797
- HOLIDAY_STATUS_REASON: HOLIDAY_STATUS_REASON
16158
+ GET_HOLIDAY_TYPE: GET_HOLIDAY_TYPE,
16159
+ HOLIDAY_SINGLE_READ_QDM: HOLIDAY_SINGLE_READ_QDM,
16160
+ HOLIDAY_SINGLE_READ_SELECTED_QDM: HOLIDAY_SINGLE_READ_SELECTED_QDM,
16161
+ HOLIDAY_STATUS_REASON_QDM: HOLIDAY_STATUS_REASON_QDM,
16162
+ HOLIDAY_ENTITY_MASTERS_QDM: HOLIDAY_ENTITY_MASTERS_QDM
15798
16163
  };
15799
16164
  var holidaySlice$1 = holidaySlice.reducer;
15800
16165
 
@@ -16072,7 +16437,7 @@ var queries$i = {
16072
16437
  entity: "ResourcebyApptType",
16073
16438
  is_metadata: true,
16074
16439
  filter: {
16075
- _key: key === null || key === void 0 ? void 0 : (_key$data = key.data) === null || _key$data === void 0 ? void 0 : (_key$data$ = _key$data[0]) === null || _key$data$ === void 0 ? void 0 : _key$data$._key
16440
+ _id: key === null || key === void 0 ? void 0 : (_key$data = key.data) === null || _key$data === void 0 ? void 0 : (_key$data$ = _key$data[0]) === null || _key$data$ === void 0 ? void 0 : _key$data$._id
16076
16441
  },
16077
16442
  metadataId: "88b23ef1-7199-4503-b631-2de82ace6e03",
16078
16443
  metadata_dbname: process.env.REACT_APP_METADATA_DB_NAME,
@@ -17939,9 +18304,9 @@ var RES_APPOINTMENT_LIST_QDM = createAsyncThunk("resourceByAppointmentTypesSlice
17939
18304
  filter: {
17940
18305
  searchname: payload === null || payload === void 0 ? void 0 : payload.search,
17941
18306
  page: payload === null || payload === void 0 ? void 0 : payload.page,
17942
- perpage: payload === null || payload === void 0 ? void 0 : payload.perPage
18307
+ perPage: payload === null || payload === void 0 ? void 0 : payload.perPage
17943
18308
  },
17944
- queryid: "9d9daea6-4bbe-4128-adcf-75cb2ad0b7e8"
18309
+ queryid: "84520dac-03e2-4321-bc99-ce6fe51ad15e"
17945
18310
  };
17946
18311
  _context35.next = 6;
17947
18312
  return fetchData({
@@ -18132,7 +18497,7 @@ var RES_APPOINTMENT_SINGLE_READ_QDM = createAsyncThunk("resourceByAppointmentTyp
18132
18497
  filter: {
18133
18498
  _id: payload
18134
18499
  },
18135
- queryid: "4351b8fe-f580-4e84-aa8e-8e9dc5cfd7f7"
18500
+ queryid: "dac48901-4ef7-4dbd-93d0-a8716d732aba"
18136
18501
  };
18137
18502
  _context39.next = 6;
18138
18503
  return fetchData({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "primary_care_admin_binder",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",