fix shift plan

main
حسین معصومی پور 2024-05-25 19:27:21 +03:30
parent 8d893341be
commit bc6db23a50
25 changed files with 3928 additions and 75 deletions

14
.env
View File

@ -1,9 +1,9 @@
NODE_ENV="development"
NEXT_PUBLIC_SERVER_URL=http://192.168.1.12:32767
NEXT_PUBLIC_PUBLIC_URL=http://192.168.1.12:32767
NEXT_PUBLIC_API_URL=http://192.168.1.12:32767/api
NEXT_PUBLIC_VERSION=0.3.2
# NEXT_PUBLIC_SERVER_URL=http://192.168.1.12:32767
# NEXT_PUBLIC_PUBLIC_URL=http://192.168.1.12:32767
# NEXT_PUBLIC_API_URL=http://192.168.1.12:32767/api
# NEXT_PUBLIC_VERSION=0.3.3
# SECURE_LOCAL_STORAGE_HASH_KEY=f1da2b2c7a4c446934267fea631102ec389b5b99
# NEXT_PUBLIC_API_URL_IMAGE=https://192.168.88.12:49154/Files/ReportImages
@ -15,8 +15,8 @@ NEXT_PUBLIC_VERSION=0.3.2
# NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
# NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
# NEXT_PUBLIC_API_URL=https://api.brizco.io/api
NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
NEXT_PUBLIC_API_URL=https://api.brizco.io/api
# NEXT_PUBLIC_API_URL_IMAGE=https://api.macsonline.ir/Files/ReportImages
# NEXT_PUBLIC_API_URL_BackUp=https://api.macsonline.ir/Files/BackUps

View File

@ -2,4 +2,4 @@ NODE_ENV="production"
NEXT_PUBLIC_SERVER_URL=https://api.brizco.io
NEXT_PUBLIC_PUBLIC_URL=https://api.brizco.io
NEXT_PUBLIC_API_URL=https://api.brizco.io/api
NEXT_PUBLIC_VERSION=0.3.2
NEXT_PUBLIC_VERSION=0.3.3

View File

@ -1,4 +1,4 @@
FROM registry.vnfco.ir/library/node:14-alpine AS runner
FROM node:20-alpine3.18 AS runner
WORKDIR /app
ARG NODE_ENV=production
COPY public ./public
@ -12,3 +12,5 @@ EXPOSE 3000
ENV PORT 3000
CMD ["/app/node_modules/.bin/next", "start"]

View File

@ -50,7 +50,6 @@ const ActivityCard = ({ data }) => {
CTX.DoneActivity(data.id);
};
console.log("data", data);
return (
<div
className={` p-2 overflow-hidden ${

View File

@ -88,13 +88,7 @@ const ActivityCardCloseShift = ({ data }) => {
? "!bg-yellow-100 rounded-xl"
: ""
}`}
onClick={() => {
console.log(
"completeActivities?.find((e) => e.activityId == data?.id)?.isCompleted",
completeActivities?.find((e) => e.activityId == data?.id)
?.isCompleted != data?.isDone
);
}}
onClick={() => {}}
>
<div className="flex">
<div className="flex">

View File

@ -21,8 +21,6 @@ const TasksCard = ({ tasksData, permissions }) => {
}
};
console.log("tasksData", tasksData.days);
return (
<div className="mt-3">
{tasksData?.map((e, index) => (

View File

@ -58,7 +58,6 @@ const Contact = () => {
},
(error) => {
setLoading(false);
console.error(error);
alert("Ahh, something went wrong. Please try again.");
}

View File

@ -57,15 +57,9 @@ const BottomSheetAddUserToPositionShiftPlan = ({
: "bg-gray-100"
}`}
onClick={() => {
console.log("Clicked!");
console.log("userAndPositionIds:", userAndPositionIds);
console.log("positionId:", positionId);
console.log("e.userId:", e.userId);
const userExistsIndex = userAndPositionIds?.findIndex(
(item) => item.value === e.userId && item.key === positionId
);
console.log("userExistsIndex:", userExistsIndex);
if (!userAndPositionIds || userExistsIndex === -1) {
setUserAndPositionIds((current) => [

View File

@ -144,8 +144,6 @@ const BottomSheetCreateShifts = (props) => {
}
}, [shiftData]);
console.log("----------------------------------", CTX.state.startAtTimeShift);
return (
<BottomSheet
onSpringStart={(e) => handleBottomSheetCreateShift(e)}

View File

@ -102,8 +102,6 @@ const BottomSheetReportManageShift = (props) => {
groupObjectsByPlanFor(shiftplansData);
}, [shiftplansData]);
console.log("shiftplans", shiftplans);
return (
<BottomSheet
onSpringStart={(e) => handleBottomSheetCreateRole(e)}

View File

@ -1 +0,0 @@
self.fallback=async e=>{let{destination:a,url:n}=e,o={document:"/offline",image:!1,audio:!1,video:!1,font:!1}[a];return o?caches.match(o,{ignoreSearch:!0}):Response.error()};

View File

@ -0,0 +1,102 @@
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@ducanh2912/next-pwa/dist/fallback.js":
/*!************************************************************!*\
!*** ./node_modules/@ducanh2912/next-pwa/dist/fallback.js ***!
\************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\nself.fallback = async (_)=>{\n let { destination: e, url: A } = _, s = {\n document: \"/offline\",\n image: false,\n audio: false,\n video: false,\n font: false\n }[e];\n return s ? caches.match(s, {\n ignoreSearch: !0\n }) : \"\" === e && false && 0 ? 0 : Response.error();\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvQGR1Y2FuaDI5MTIvbmV4dC1wd2EvZGlzdC9mYWxsYmFjay5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7QUFDQSxVQUFVLHlCQUF5QjtBQUNuQyxrQkFBa0IsVUFBcUM7QUFDdkQsZUFBZSxLQUFrQztBQUNqRCxlQUFlLEtBQWtDO0FBQ2pELGVBQWUsS0FBa0M7QUFDakQsY0FBYyxLQUFpQztBQUMvQyxLQUFLO0FBQ0w7QUFDQTtBQUNBLEtBQUssZ0JBQWdCLEtBQWlDLElBQUksQ0FBd0MsR0FBRyxDQUUvRjtBQUNOIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vX05fRS8uL25vZGVfbW9kdWxlcy9AZHVjYW5oMjkxMi9uZXh0LXB3YS9kaXN0L2ZhbGxiYWNrLmpzP2NlNGIiXSwic291cmNlc0NvbnRlbnQiOlsic2VsZi5mYWxsYmFjayA9IGFzeW5jIChfKT0+e1xuICAgIGxldCB7IGRlc3RpbmF0aW9uOiBlLCB1cmw6IEEgfSA9IF8sIHMgPSB7XG4gICAgICAgIGRvY3VtZW50OiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19ET0NVTUVOVF9fLFxuICAgICAgICBpbWFnZTogcHJvY2Vzcy5lbnYuX19QV0FfRkFMTEJBQ0tfSU1BR0VfXyxcbiAgICAgICAgYXVkaW86IHByb2Nlc3MuZW52Ll9fUFdBX0ZBTExCQUNLX0FVRElPX18sXG4gICAgICAgIHZpZGVvOiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19WSURFT19fLFxuICAgICAgICBmb250OiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19GT05UX19cbiAgICB9W2VdO1xuICAgIHJldHVybiBzID8gY2FjaGVzLm1hdGNoKHMsIHtcbiAgICAgICAgaWdub3JlU2VhcmNoOiAhMFxuICAgIH0pIDogXCJcIiA9PT0gZSAmJiBwcm9jZXNzLmVudi5fX1BXQV9GQUxMQkFDS19EQVRBX18gJiYgQS5tYXRjaCgvXFwvX25leHRcXC9kYXRhXFwvLitcXC8uK1xcLmpzb24kL2kpID8gY2FjaGVzLm1hdGNoKHByb2Nlc3MuZW52Ll9fUFdBX0ZBTExCQUNLX0RBVEFfXywge1xuICAgICAgICBpZ25vcmVTZWFyY2g6ICEwXG4gICAgfSkgOiBSZXNwb25zZS5lcnJvcigpO1xufTsiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/@ducanh2912/next-pwa/dist/fallback.js\n"));
/***/ })
/******/ });
/************************************************************************/
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types policy */
/******/ !function() {
/******/ var policy;
/******/ __webpack_require__.tt = function() {
/******/ // Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.
/******/ if (policy === undefined) {
/******/ policy = {
/******/ createScript: function(script) { return script; }
/******/ };
/******/ if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {
/******/ policy = trustedTypes.createPolicy("nextjs#bundler", policy);
/******/ }
/******/ }
/******/ return policy;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types script */
/******/ !function() {
/******/ __webpack_require__.ts = function(script) { return __webpack_require__.tt().createScript(script); };
/******/ }();
/******/
/******/ /* webpack/runtime/react refresh */
/******/ !function() {
/******/ if (__webpack_require__.i) {
/******/ __webpack_require__.i.push(function(options) {
/******/ var originalFactory = options.factory;
/******/ options.factory = function(moduleObject, moduleExports, webpackRequire) {
/******/ var hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$;
/******/ var cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : function() {};
/******/ try {
/******/ originalFactory.call(this, moduleObject, moduleExports, webpackRequire);
/******/ } finally {
/******/ cleanup();
/******/ }
/******/ }
/******/ })
/******/ }
/******/ }();
/******/
/******/ /* webpack/runtime/compat */
/******/
/******/
/******/ // noop fns to prevent runtime errors during initialization
/******/ if (typeof self !== "undefined") {
/******/ self.$RefreshReg$ = function () {};
/******/ self.$RefreshSig$ = function () {
/******/ return function (type) {
/******/ return type;
/******/ };
/******/ };
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval-source-map devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./node_modules/@ducanh2912/next-pwa/dist/fallback.js"](0, __webpack_exports__, __webpack_require__);
/******/
/******/ })()
;

File diff suppressed because one or more lines are too long

1
public/sw.js.map 100644

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
self.onmessage=async e=>{switch(e.data.type){case"__START_URL_CACHE__":{let t=e.data.url,a=await fetch(t);if(!a.redirected)return(await caches.open("start-url")).put(t,a);return Promise.resolve()}case"__FRONTEND_NAV_CACHE__":{let t=e.data.url,a=await caches.open("pages");if(await a.match(t,{ignoreSearch:!0}))return;let s=await fetch(t);if(!s.ok)return;if(a.put(t,s.clone()),e.data.shouldCacheAggressively&&s.headers.get("Content-Type")?.includes("text/html"))try{let e=await s.text(),t=[],a=await caches.open("static-style-assets"),r=await caches.open("next-static-js-assets"),c=await caches.open("static-js-assets");for(let[s,r]of e.matchAll(/<link.*?href=['"](.*?)['"].*?>/g))/rel=['"]stylesheet['"]/.test(s)&&t.push(a.match(r).then(e=>e?Promise.resolve():a.add(r)));for(let[,a]of e.matchAll(/<script.*?src=['"](.*?)['"].*?>/g)){let e=/\/_next\/static.+\.js$/i.test(a)?r:c;t.push(e.match(a).then(t=>t?Promise.resolve():e.add(a)))}return await Promise.all(t)}catch{}return Promise.resolve()}default:return Promise.resolve()}};

View File

@ -0,0 +1,102 @@
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
/******/ (function() { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js":
/*!*******************************************************************!*\
!*** ./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js ***!
\*******************************************************************/
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
eval(__webpack_require__.ts("__webpack_require__.r(__webpack_exports__);\nself.onmessage = async (e)=>{\n switch(e.data.type){\n case \"__START_URL_CACHE__\":\n {\n let t = e.data.url, a = await fetch(t);\n if (!a.redirected) return (await caches.open(\"start-url\")).put(t, a);\n return Promise.resolve();\n }\n case \"__FRONTEND_NAV_CACHE__\":\n {\n let t = e.data.url, a = await caches.open(\"pages\");\n if (await a.match(t, {\n ignoreSearch: !0\n })) return;\n let s = await fetch(t);\n if (!s.ok) return;\n if (a.put(t, s.clone()), e.data.shouldCacheAggressively && s.headers.get(\"Content-Type\")?.includes(\"text/html\")) try {\n let e = await s.text(), t = [], a = await caches.open(\"static-style-assets\"), r = await caches.open(\"next-static-js-assets\"), c = await caches.open(\"static-js-assets\");\n for (let [s, r] of e.matchAll(/<link.*?href=['\"](.*?)['\"].*?>/g))/rel=['\"]stylesheet['\"]/.test(s) && t.push(a.match(r).then((e)=>e ? Promise.resolve() : a.add(r)));\n for (let [, a] of e.matchAll(/<script.*?src=['\"](.*?)['\"].*?>/g)){\n let e = /\\/_next\\/static.+\\.js$/i.test(a) ? r : c;\n t.push(e.match(a).then((t)=>t ? Promise.resolve() : e.add(a)));\n }\n return await Promise.all(t);\n } catch {}\n return Promise.resolve();\n }\n default:\n return Promise.resolve();\n }\n};//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvQGR1Y2FuaDI5MTIvbmV4dC1wd2EvZGlzdC9zdy1lbnRyeS13b3JrZXIuanMiLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQ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gICAgICAgIHJldHVybiBhd2FpdCBQcm9taXNlLmFsbCh0KTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoICB7fVxuICAgICAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHJldHVybiBQcm9taXNlLnJlc29sdmUoKTtcbiAgICB9XG59OyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js\n"));
/***/ })
/******/ });
/************************************************************************/
/******/ // The require scope
/******/ var __webpack_require__ = {};
/******/
/************************************************************************/
/******/ /* webpack/runtime/make namespace object */
/******/ !function() {
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types policy */
/******/ !function() {
/******/ var policy;
/******/ __webpack_require__.tt = function() {
/******/ // Create Trusted Type policy if Trusted Types are available and the policy doesn't exist yet.
/******/ if (policy === undefined) {
/******/ policy = {
/******/ createScript: function(script) { return script; }
/******/ };
/******/ if (typeof trustedTypes !== "undefined" && trustedTypes.createPolicy) {
/******/ policy = trustedTypes.createPolicy("nextjs#bundler", policy);
/******/ }
/******/ }
/******/ return policy;
/******/ };
/******/ }();
/******/
/******/ /* webpack/runtime/trusted types script */
/******/ !function() {
/******/ __webpack_require__.ts = function(script) { return __webpack_require__.tt().createScript(script); };
/******/ }();
/******/
/******/ /* webpack/runtime/react refresh */
/******/ !function() {
/******/ if (__webpack_require__.i) {
/******/ __webpack_require__.i.push(function(options) {
/******/ var originalFactory = options.factory;
/******/ options.factory = function(moduleObject, moduleExports, webpackRequire) {
/******/ var hasRefresh = typeof self !== "undefined" && !!self.$RefreshInterceptModuleExecution$;
/******/ var cleanup = hasRefresh ? self.$RefreshInterceptModuleExecution$(moduleObject.id) : function() {};
/******/ try {
/******/ originalFactory.call(this, moduleObject, moduleExports, webpackRequire);
/******/ } finally {
/******/ cleanup();
/******/ }
/******/ }
/******/ })
/******/ }
/******/ }();
/******/
/******/ /* webpack/runtime/compat */
/******/
/******/
/******/ // noop fns to prevent runtime errors during initialization
/******/ if (typeof self !== "undefined") {
/******/ self.$RefreshReg$ = function () {};
/******/ self.$RefreshSig$ = function () {
/******/ return function (type) {
/******/ return type;
/******/ };
/******/ };
/******/ }
/******/
/************************************************************************/
/******/
/******/ // startup
/******/ // Load entry module and return exports
/******/ // This entry module can't be inlined because the eval-source-map devtool is used.
/******/ var __webpack_exports__ = {};
/******/ __webpack_modules__["./node_modules/@ducanh2912/next-pwa/dist/sw-entry-worker.js"](0, __webpack_exports__, __webpack_require__);
/******/
/******/ })()
;

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -26,8 +26,6 @@ const Home = (props) => {
const profile = CTX.state.profile;
console.log(profile);
useEffect(() => {
CTX.GetHomePageData();
}, []);
@ -51,7 +49,6 @@ const Home = (props) => {
],
};
console.log("datasets", data);
return data;
}, [homePageData]);
@ -61,7 +58,6 @@ const Home = (props) => {
100
);
}, [homePageData?.doneActivitiesToday, homePageData?.totalActivitiesToday]);
console.log(CTX.state.homePageData);
const handleGoToReport = () => {
CTX.setReportDetail({
@ -92,8 +88,6 @@ const Home = (props) => {
const today = new Date();
const formattedDate = formatJalaliDate(today);
console.log(homePageData?.todayStaffNames?.slice(0, 4));
return (
<div className="pb-20">
<AppHeader

View File

@ -588,12 +588,6 @@ export default function RootLayout({ children }) {
}
};
const GetShifts = async (date) => {
console.log(
"Date123456789",
`${process.env.NEXT_PUBLIC_API_URL}/shift?page=0${
date ? `&selectedDate=${date}` : ""
}`
);
setLoading(true);
try {
const data = await Chapar.get(
@ -947,8 +941,6 @@ export default function RootLayout({ children }) {
}
);
console.log(data);
setShifPlansData(data);
setLoading(false);
@ -1311,7 +1303,6 @@ export default function RootLayout({ children }) {
const UnDoneActivity = async (id, resone) => {
setLoading(true);
console.log("s");
try {
const data = await Chapar.post(
`${process.env.NEXT_PUBLIC_API_URL}/activity/undone/${id}?undoneReason=${resone}`,
@ -1369,7 +1360,6 @@ export default function RootLayout({ children }) {
};
const changeRole = async (id) => {
console.log(getToken());
setLoading(true);
try {
const data = await Chapar.post(
@ -1499,7 +1489,6 @@ export default function RootLayout({ children }) {
}
);
console.log(data);
setHomePageData(data);
setLoading(false);
} catch ({ error, status }) {

View File

@ -196,12 +196,6 @@ const CompleteShift = () => {
}
};
console.log(siftsData[activeShifPlan]);
console.log(
"getYesterdayPersianDate",
moment().locale("fa").subtract(1, "day")?.unix() * 1000
);
return (
<div className="pb-20">
<AppHeader

View File

@ -47,8 +47,6 @@ const Calendar = () => {
const [currentShiftPlanId, setCurrentShiftPlanId] = useState(null);
const transformData = (responseArray) => {
console.log("responseArray", responseArray);
const daysArray = [];
return responseArray.map((item) => {
const date = moment(item.dateTime).locale("fa");
@ -94,7 +92,7 @@ const Calendar = () => {
daysUntilWeek[selectDay]?.checkDay &&
moment.utc(daysUntilWeek[selectDay].checkDay, "jYYYY-jMM-jDDTHH").unix() *
1000,
shiftId: shiftPlanData && shiftPlanData.shiftId,
shiftId: shiftsCurrentDaysData && shiftsCurrentDaysData[selectShift]?.id,
routineId: routinesData && routinesData[selectRoutine]?.id,
supervisionUserId: superId,
userAndPositionIds,
@ -105,7 +103,7 @@ const Calendar = () => {
daysUntilWeek[selectDay]?.checkDay &&
moment.utc(daysUntilWeek[selectDay].checkDay, "jYYYY-jMM-jDDTHH").unix() *
1000,
shiftId: shiftPlanData && shiftPlanData.shiftId,
shiftId: shiftsCurrentDaysData && shiftsCurrentDaysData[selectShift]?.id,
routineId: routinesData && routinesData[selectRoutine]?.id,
userAndPositionIds,
supervisionUserId: superId,
@ -132,7 +130,6 @@ const Calendar = () => {
};
const handleSelectShift = (index) => {
console.log("usersData.length", usersData.length);
setselectShift(index);
setShiftPlanSteps(3);
if (usersData.length <= 0) {
@ -272,11 +269,6 @@ const Calendar = () => {
);
}, [usersData]);
console.log("shiftPlanData", shiftPlanData);
console.log(
"hiftsCurrentDaysData[selectShift]",
shiftsCurrentDaysData[selectShift]
);
return (
<div className="pb-20">
<AppHeader
@ -585,7 +577,6 @@ const Calendar = () => {
value={superId}
inputEvent={(e) => {
setSuperId(e.target.value);
console.log(e.target.value);
}}
style="text-right"
select={true}

View File

@ -59,7 +59,6 @@ const Shifts = (props) => {
// Sort the groupedArray by the planFor date
groupedArray.sort((a, b) => new Date(a.planFor) - new Date(b.planFor));
console.log(groupedArray);
setShiftplans(groupedArray);
};
@ -109,10 +108,6 @@ const Shifts = (props) => {
setShiftPlansSelect(indextoday);
}, [shiftplans]);
console.log(shiftplans[0]?.data[0]?.users);
console.log("shiftplans555", shiftplans);
return (
<>
<div className="pb-20">

View File

@ -30,8 +30,6 @@ const page = () => {
const stopGetActivities = CTX.state.stopGetActivities;
const typeTask = CTX.state.typeTask;
console.log("pageGetTasks", pageGetTasks);
useEffect(() => {
CTX.GetTasks(pageGetTasks);
CTX.GetActivity(