wfm-mobile-core
Version:
WFM Mobile Core
430 lines (429 loc) • 28.1 kB
JavaScript
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
var __generator = (this && this.__generator) || function (thisArg, body) {
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
function verb(n) { return function (v) { return step([n, v]); }; }
function step(op) {
if (f) throw new TypeError("Generator is already executing.");
while (_) try {
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
if (y = 0, t) op = [op[0] & 2, t.value];
switch (op[0]) {
case 0: case 1: t = op; break;
case 4: _.label++; return { value: op[1], done: false };
case 5: _.label++; y = op[1]; op = [0]; continue;
case 7: op = _.ops.pop(); _.trys.pop(); continue;
default:
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
if (t[2]) _.ops.pop();
_.trys.pop(); continue;
}
op = body.call(thisArg, _);
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
}
};
var __read = (this && this.__read) || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o), r, ar = [], e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
}
catch (error) { e = { error: error }; }
finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
}
finally { if (e) throw e.error; }
}
return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from) {
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
to[j] = from[i];
return to;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShiftsApi = void 0;
var mobx_1 = require("mobx");
var constants_1 = require("../constants");
var EFetchingStatus_1 = require("../enums/EFetchingStatus");
var helpers_1 = require("../helpers");
var http_1 = require("../http");
var generationOfGraphData_1 = require("../utils/generationOfGraphData");
var linkParser_1 = require("../utils/linkParser");
var User_1 = require("./User");
var ShiftsApi = /** @class */ (function () {
function ShiftsApi() {
}
ShiftsApi.setFetchingSchedule = function (newStatus) {
ShiftsApi.fetchingSchedule = newStatus;
};
ShiftsApi.setFetchingShift = function (newStatus) {
ShiftsApi.fetchingShift = newStatus;
};
ShiftsApi.setFetchingStatus = function (newStatus) {
ShiftsApi.fetchingStatusExchange = newStatus;
};
ShiftsApi.getShifts = function (_a) {
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
var startDate = _a.startDate, endDate = _a.endDate;
return __awaiter(this, void 0, void 0, function () {
var today, firstDayOfCurrentMonth, previousMonth, urlWorkedShifts, responseWorkedShifts, workedShifts, shiftsUrl, shiftsResponse, urlWorkedShifts, responseWorkedShifts, workedShifts, shiftsExchangeResponse, exchangeUrl, exchangeResponse, firedMainPosition, lastDayOfWork_1, shiftsExchange, shiftsTaggedExchange, orgUnitResourceResponse, orgUnitResponse, workingScheduleDaysLink, workingScheduleResponse, addressResponse, shifts_1, uniqueIds, filteredArray, e_1;
return __generator(this, function (_16) {
switch (_16.label) {
case 0:
this.setFetchingShift(EFetchingStatus_1.EFetchingStatus.IN_PROGRESS);
today = helpers_1.dateISOFormat(new Date());
firstDayOfCurrentMonth = helpers_1.dateISOFormat(new Date().setDate(1));
previousMonth = startDate < firstDayOfCurrentMonth;
_16.label = 1;
case 1:
_16.trys.push([1, 14, , 15]);
if (!previousMonth) return [3 /*break*/, 3];
urlWorkedShifts = linkParser_1.parseLinksTemplate((_c = (_b = User_1.UserApi.userLinks) === null || _b === void 0 ? void 0 : _b.shifts) === null || _c === void 0 ? void 0 : _c.href) + "?from=" + startDate + "&table=true&to=" + endDate;
return [4 /*yield*/, http_1.httpClient.get(urlWorkedShifts, constants_1.headersHAL)];
case 2:
responseWorkedShifts = (_16.sent());
workedShifts = ((_d = responseWorkedShifts === null || responseWorkedShifts === void 0 ? void 0 : responseWorkedShifts._embedded) === null || _d === void 0 ? void 0 : _d.shifts) || [];
ShiftsApi.workedShifts = workedShifts.filter(function (shift) { return shift.employeePositionId; });
ShiftsApi.getSchedules({ startDate: startDate, endDate: endDate });
this.setFetchingStatus(EFetchingStatus_1.EFetchingStatus.DONE);
return [3 /*break*/, 13];
case 3:
shiftsUrl = linkParser_1.parseLinksTemplate((_f = (_e = User_1.UserApi.userLinks) === null || _e === void 0 ? void 0 : _e.shifts) === null || _f === void 0 ? void 0 : _f.href) + "?from=" + startDate + "&to=" + endDate;
if (((_g = User_1.UserApi.userLinks) === null || _g === void 0 ? void 0 : _g.shifts) === undefined)
return [2 /*return*/, Promise.reject()];
return [4 /*yield*/, http_1.httpClient.get(shiftsUrl, constants_1.headersHAL)];
case 4:
shiftsResponse = (_k = (_j = (_h = (_16.sent())) === null || _h === void 0 ? void 0 : _h._embedded) === null || _j === void 0 ? void 0 : _j.shifts) !== null && _k !== void 0 ? _k : [];
// рабочие смены (будущие)
ShiftsApi.shifts = (shiftsResponse === null || shiftsResponse === void 0 ? void 0 : shiftsResponse.filter(function (shift) { return shift.employeePositionId; })) || [];
urlWorkedShifts = linkParser_1.parseLinksTemplate((_m = (_l = User_1.UserApi.userLinks) === null || _l === void 0 ? void 0 : _l.shifts) === null || _m === void 0 ? void 0 : _m.href) + "?from=" + startDate + "&table=true&to=" + today;
return [4 /*yield*/, http_1.httpClient.get(urlWorkedShifts, constants_1.headersHAL)];
case 5:
responseWorkedShifts = (_16.sent());
workedShifts = ((_o = responseWorkedShifts === null || responseWorkedShifts === void 0 ? void 0 : responseWorkedShifts._embedded) === null || _o === void 0 ? void 0 : _o.shifts) || [];
ShiftsApi.workedShifts = workedShifts.filter(function (shift) { return shift.employeePositionId; });
shiftsExchangeResponse = shiftsResponse === null || shiftsResponse === void 0 ? void 0 : shiftsResponse.filter(function (shift) { return (shift === null || shift === void 0 ? void 0 : shift.employeePositionId) == null; });
exchangeUrl = linkParser_1.parseLinksTemplate((_q = (_p = User_1.UserApi.userLinks) === null || _p === void 0 ? void 0 : _p[constants_1.ResourceNames.SHIFTS_EXCHANGE_TAGGED_EMPLOYEE]) === null || _q === void 0 ? void 0 : _q.href) + "?from=" + startDate + "&to=" + endDate + "&includeAssigned=false";
if (((_r = User_1.UserApi.userLinks) === null || _r === void 0 ? void 0 : _r[constants_1.ResourceNames.SHIFTS_EXCHANGE_TAGGED_EMPLOYEE]) === undefined)
return [2 /*return*/, Promise.reject()];
return [4 /*yield*/, http_1.httpClient.get(exchangeUrl, constants_1.headersHAL)];
case 6:
exchangeResponse = (_u = (_t = (_s = (_16.sent())) === null || _s === void 0 ? void 0 : _s._embedded) === null || _t === void 0 ? void 0 : _t.shifts) !== null && _u !== void 0 ? _u : [];
firedMainPosition = User_1.UserApi.employeePositions[0].dateInterval.endDate !== null;
lastDayOfWork_1 = (_v = User_1.UserApi.employeePositions[0]) === null || _v === void 0 ? void 0 : _v.dateInterval.endDate;
shiftsExchange = shiftsExchangeResponse;
shiftsTaggedExchange = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.filter(function (shift) { return (shift === null || shift === void 0 ? void 0 : shift.employeePositionId) == null; });
// фильтр смен с биржи до дня увольнения
if (firedMainPosition) {
shiftsExchange = shiftsExchangeResponse === null || shiftsExchangeResponse === void 0 ? void 0 : shiftsExchangeResponse.filter(function (shift) { return helpers_1.dateISOFormat(shift.dateTimeInterval.startDateTime) <= lastDayOfWork_1; });
shiftsTaggedExchange = exchangeResponse === null || exchangeResponse === void 0 ? void 0 : exchangeResponse.filter(function (shift) { return shift.dateTimeInterval.startDateTime <= lastDayOfWork_1; });
}
if (!!!((_w = ShiftsApi.shifts) === null || _w === void 0 ? void 0 : _w.length)) return [3 /*break*/, 12];
return [4 /*yield*/, http_1.httpClient.get((_y = (_x = http_1.httpClient === null || http_1.httpClient === void 0 ? void 0 : http_1.httpClient.links) === null || _x === void 0 ? void 0 : _x.orgUnits) === null || _y === void 0 ? void 0 : _y.href, constants_1.headersHAL)];
case 7:
orgUnitResourceResponse = (_16.sent());
return [4 /*yield*/, http_1.httpClient.get((_3 = (_2 = (_1 = (_0 = (_z = orgUnitResourceResponse) === null || _z === void 0 ? void 0 : _z._embedded) === null || _0 === void 0 ? void 0 : _0.orgUnits[0]) === null || _1 === void 0 ? void 0 : _1._links) === null || _2 === void 0 ? void 0 : _2.self) === null || _3 === void 0 ? void 0 : _3.href, constants_1.headersHAL)];
case 8:
orgUnitResponse = (_16.sent());
workingScheduleDaysLink = (_6 = (_5 = (_4 = orgUnitResponse) === null || _4 === void 0 ? void 0 : _4._links) === null || _5 === void 0 ? void 0 : _5.workingScheduleDays) === null || _6 === void 0 ? void 0 : _6.href;
if (!workingScheduleDaysLink) return [3 /*break*/, 10];
return [4 /*yield*/, http_1.httpClient.get(linkParser_1.parseLinksTemplate(workingScheduleDaysLink) + "?from=" + startDate + "&to=" + endDate, constants_1.headersHAL)];
case 9:
workingScheduleResponse = (_16.sent());
ShiftsApi.workingScheduleDays = (_7 = workingScheduleResponse === null || workingScheduleResponse === void 0 ? void 0 : workingScheduleResponse._embedded) === null || _7 === void 0 ? void 0 : _7.workingScheduleDays;
_16.label = 10;
case 10:
ShiftsApi.orgUnitId = (_8 = orgUnitResponse) === null || _8 === void 0 ? void 0 : _8.id;
return [4 /*yield*/, http_1.httpClient.get(((_13 = (_12 = (_11 = (_10 = (_9 = orgUnitResourceResponse) === null || _9 === void 0 ? void 0 : _9._embedded) === null || _10 === void 0 ? void 0 : _10.orgUnits[0]) === null || _11 === void 0 ? void 0 : _11._links) === null || _12 === void 0 ? void 0 : _12.self) === null || _13 === void 0 ? void 0 : _13.href) + "/org-unit-addresses", constants_1.headersHAL)];
case 11:
addressResponse = (_16.sent());
ShiftsApi.orgUnitAddress = ((_14 = addressResponse[ShiftsApi.orgUnitId]) === null || _14 === void 0 ? void 0 : _14.city) + ", " + ((_15 = addressResponse[ShiftsApi.orgUnitId]) === null || _15 === void 0 ? void 0 : _15.addressStreet);
_16.label = 12;
case 12:
shifts_1 = __spreadArray(__spreadArray([], __read(shiftsExchange)), __read(shiftsTaggedExchange));
uniqueIds = __spreadArray([], __read(new Set(shifts_1 === null || shifts_1 === void 0 ? void 0 : shifts_1.map(function (shift) { return shift.id; }))));
filteredArray = uniqueIds === null || uniqueIds === void 0 ? void 0 : uniqueIds.map(function (id) { return shifts_1.find(function (shift) { return shift.id === id; }); });
ShiftsApi.shiftsInExchange = filteredArray === null || filteredArray === void 0 ? void 0 : filteredArray.filter(function (shift) { return shift.dateTimeInterval.startDateTime >= today; });
ShiftsApi.getSchedules({ startDate: startDate, endDate: endDate });
this.setFetchingStatus(EFetchingStatus_1.EFetchingStatus.DONE);
_16.label = 13;
case 13: return [3 /*break*/, 15];
case 14:
e_1 = _16.sent();
ShiftsApi.shifts = [];
ShiftsApi.getSchedules({ startDate: startDate, endDate: endDate });
return [2 /*return*/, Promise.reject(e_1)];
case 15: return [2 /*return*/];
}
});
});
};
ShiftsApi.getEmployeesList = function (date, orgId) {
var _a, _b, _c, _d, _e, _f;
return __awaiter(this, void 0, void 0, function () {
var urlEmployees, employeesListResponse, employeesList, urlShifts, shiftsEmloyeesResponse, shiftsEmployees, e_2;
return __generator(this, function (_g) {
switch (_g.label) {
case 0:
_g.trys.push([0, 3, , 4]);
urlEmployees = ((_b = (_a = http_1.httpClient === null || http_1.httpClient === void 0 ? void 0 : http_1.httpClient.links) === null || _a === void 0 ? void 0 : _a.orgUnits) === null || _b === void 0 ? void 0 : _b.href) + "/" + orgId + "/employee-positions?from=" + date + "&to=" + date;
return [4 /*yield*/, http_1.httpClient.get(urlEmployees, constants_1.headersHAL)];
case 1:
employeesListResponse = (_g.sent());
employeesList = (_c = employeesListResponse === null || employeesListResponse === void 0 ? void 0 : employeesListResponse._embedded) === null || _c === void 0 ? void 0 : _c.employeePositions;
urlShifts = ((_e = (_d = http_1.httpClient === null || http_1.httpClient === void 0 ? void 0 : http_1.httpClient.links) === null || _d === void 0 ? void 0 : _d.orgUnits) === null || _e === void 0 ? void 0 : _e.href) + "/" + orgId + "/shifts?from=" + date + "&to=" + date;
return [4 /*yield*/, http_1.httpClient.get(urlShifts, constants_1.headersHAL)];
case 2:
shiftsEmloyeesResponse = (_g.sent());
shiftsEmployees = (_f = shiftsEmloyeesResponse === null || shiftsEmloyeesResponse === void 0 ? void 0 : shiftsEmloyeesResponse._embedded) === null || _f === void 0 ? void 0 : _f.shifts;
return [2 /*return*/, Promise.resolve({ employeesList: employeesList, shiftsEmployees: shiftsEmployees })];
case 3:
e_2 = _g.sent();
return [2 /*return*/, Promise.reject(e_2)];
case 4: return [2 /*return*/];
}
});
});
};
ShiftsApi.getSchedules = function (_a) {
var _b, _c, _d;
var startDate = _a.startDate, endDate = _a.endDate;
return __awaiter(this, void 0, void 0, function () {
var url, response, schedules, e_3;
return __generator(this, function (_e) {
switch (_e.label) {
case 0:
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.IN_PROGRESS);
_e.label = 1;
case 1:
_e.trys.push([1, 3, , 4]);
url = linkParser_1.parseLinksTemplate(((_b = User_1.UserApi.userLinks) === null || _b === void 0 ? void 0 : _b.scheduleRequests).href) + "?from=" + startDate + "&to=" + endDate;
return [4 /*yield*/, http_1.httpClient.get(url, constants_1.headersHAL)];
case 2:
response = (_e.sent());
schedules = (_d = (_c = response === null || response === void 0 ? void 0 : response._embedded) === null || _c === void 0 ? void 0 : _c.scheduleRequests) !== null && _d !== void 0 ? _d : [];
ShiftsApi.schedules = schedules.filter(function (sc) { var _a; return ((_a = sc === null || sc === void 0 ? void 0 : sc.dateTimeInterval) === null || _a === void 0 ? void 0 : _a.startDateTime) < endDate; });
generationOfGraphData_1.generationOfGraphData(startDate, endDate);
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.DONE);
return [2 /*return*/, Promise.resolve(response)];
case 3:
e_3 = _e.sent();
ShiftsApi.schedules = [];
generationOfGraphData_1.generationOfGraphData(startDate, endDate);
return [2 /*return*/, Promise.reject(e_3)];
case 4: return [2 /*return*/];
}
});
});
};
ShiftsApi.createSchedule = function (scheduleParams) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var response, e_4;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.IN_PROGRESS);
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, http_1.httpClient.post(linkParser_1.parseLinksTemplate((_a = http_1.httpClient.links[constants_1.ResourceNames.SCHEDULE_REQUESTS]) === null || _a === void 0 ? void 0 : _a.href) + "?calculateConstraints=true", constants_1.headersHAL, scheduleParams)];
case 2:
response = _b.sent();
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.DONE);
return [2 /*return*/, Promise.resolve(response)];
case 3:
e_4 = _b.sent();
return [2 /*return*/, Promise.reject(e_4)];
case 4: return [2 /*return*/];
}
});
});
};
ShiftsApi.editSchedule = function (link, scheduleParams) {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.IN_PROGRESS);
return [4 /*yield*/, this.shiftAction('put', link, scheduleParams)];
case 1:
response = _a.sent();
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.DONE);
return [2 /*return*/, Promise.resolve(response)];
}
});
});
};
ShiftsApi.deleteSchedule = function (link) {
return __awaiter(this, void 0, void 0, function () {
var response, e_5;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.IN_PROGRESS);
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, http_1.httpClient.delete(link, constants_1.headersHAL)];
case 2:
response = _a.sent();
this.setFetchingSchedule(EFetchingStatus_1.EFetchingStatus.DONE);
return [2 /*return*/, Promise.resolve(response)];
case 3:
e_5 = _a.sent();
return [2 /*return*/, Promise.reject(e_5)];
case 4: return [2 /*return*/];
}
});
});
};
ShiftsApi.takeShift = function (link, scheduleParams) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.shiftAction('post', link, scheduleParams)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
ShiftsApi.putShift = function (link, scheduleParams) {
return __awaiter(this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.shiftAction('put', link, scheduleParams)];
case 1: return [2 /*return*/, _a.sent()];
}
});
});
};
ShiftsApi.shiftAction = function (action, link, scheduleParams) {
return __awaiter(this, void 0, void 0, function () {
var response, e_6;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, http_1.httpClient[action](link, constants_1.headersHAL, scheduleParams)];
case 1:
response = _a.sent();
return [2 /*return*/, Promise.resolve(response)];
case 2:
e_6 = _a.sent();
return [2 /*return*/, Promise.reject(e_6)];
case 3: return [2 /*return*/];
}
});
});
};
ShiftsApi.getAdditionalInfo = function (shiftId) {
return __awaiter(this, void 0, void 0, function () {
var url, response, e_7;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
url = (http_1.httpClient === null || http_1.httpClient === void 0 ? void 0 : http_1.httpClient.entryPoint) + "/shifts/exchange/" + shiftId + "/additional-info";
return [4 /*yield*/, http_1.httpClient.get(url, constants_1.headersHAL)];
case 1:
response = (_a.sent());
return [2 /*return*/, Promise.resolve(response)];
case 2:
e_7 = _a.sent();
return [2 /*return*/, Promise.reject(e_7)];
case 3: return [2 /*return*/];
}
});
});
};
ShiftsApi.getExchangeShiftOrgUnitAddress = function (orgUnitId) {
var _a;
return __awaiter(this, void 0, void 0, function () {
var url, response, e_8;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
_b.trys.push([0, 2, , 3]);
url = ((_a = http_1.httpClient.links) === null || _a === void 0 ? void 0 : _a[constants_1.ResourceNames.ORG_UNITS]).href + "/" + orgUnitId + "/org-unit-addresses";
return [4 /*yield*/, http_1.httpClient.get(url, constants_1.headersHAL)];
case 1:
response = (_b.sent());
this.setFetchingStatus(EFetchingStatus_1.EFetchingStatus.DONE);
return [2 /*return*/, Promise.resolve(response)];
case 2:
e_8 = _b.sent();
return [2 /*return*/, Promise.reject(e_8)];
case 3: return [2 /*return*/];
}
});
});
};
ShiftsApi.error = {};
ShiftsApi.schedules = [];
ShiftsApi.shiftsInExchange = [];
ShiftsApi.shifts = [];
ShiftsApi.workedShifts = [];
ShiftsApi.workingScheduleDays = [];
ShiftsApi.fetchingSchedule = EFetchingStatus_1.EFetchingStatus.NONE;
ShiftsApi.fetchingShift = EFetchingStatus_1.EFetchingStatus.NONE;
ShiftsApi.fetchingStatusExchange = EFetchingStatus_1.EFetchingStatus.NONE;
__decorate([
mobx_1.observable
], ShiftsApi, "error", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "schedules", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "shiftsInExchange", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "shifts", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "workedShifts", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "workingScheduleDays", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "orgUnitAddress", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "orgUnitId", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "fetchingSchedule", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "fetchingShift", void 0);
__decorate([
mobx_1.observable
], ShiftsApi, "fetchingStatusExchange", void 0);
return ShiftsApi;
}());
exports.ShiftsApi = ShiftsApi;