diff --git a/brizco.rar b/brizco.rar new file mode 100644 index 0000000..b3a9379 Binary files /dev/null and b/brizco.rar differ diff --git a/components/AppHeader/page.jsx b/components/AppHeader/page.jsx index 180160d..f4f6654 100644 --- a/components/AppHeader/page.jsx +++ b/components/AppHeader/page.jsx @@ -1,3 +1,4 @@ +import Avatar from "boring-avatars"; import Link from "next/link"; import React from "react"; @@ -13,6 +14,7 @@ const AppHeader = ({ iconHref2, iconEvent2, userIcon, + userIconData, }) => { const icons = [ { @@ -95,7 +97,16 @@ const AppHeader = ({
صندوق دار
++ {e.roleNames.length > 0 + ? e.roleNames.length <= 1 + ? e.roleNames[0] + : e.roleNames[0] + " ......" + : "هیچی پیدا نمیشه براش ...."} +
+ شروع :
+
+
+ پایان :
+
+
+
+ {" "} + {DaysOfWeek(e)}{" "} +
+افزودن کاربر جدید
@@ -254,6 +255,7 @@ const BottomSheetCreateEmployees = (props) => {افزودن نقش جدید
diff --git a/plugins/BottomSheet/BottomSheetCreateShifts.jsx b/plugins/BottomSheet/BottomSheetCreateShifts.jsx index d001059..99aa449 100644 --- a/plugins/BottomSheet/BottomSheetCreateShifts.jsx +++ b/plugins/BottomSheet/BottomSheetCreateShifts.jsx @@ -1,17 +1,144 @@ "use client"; -import React, { useContext } from "react"; +import React, { useContext, useEffect, useRef, useState } from "react"; import { BottomSheet } from "react-spring-bottom-sheet"; import Input from "plugins/Input/page"; import AppContext from "@ctx/AppContext"; +import SimpleReactValidator from "simple-react-validator"; +import { toast } from "react-toastify"; +import Buttonbriz from "plugins/Buttonbriz/page"; const BottomSheetCreateShifts = (props) => { const CTX = useContext(AppContext); + const [title, setTitle] = useState(""); + const [description, setDescription] = useState(""); + const [dayOfWeeksCurrent, setDayOfWeeksCurrent] = useState(""); + const [, forceUpdate] = useState(); + + const dayOfWeeksChoose = CTX.state.dayOfWeeksChoose; + const startAtTimeShift = CTX.state.startAtTimeShift; + const endAtTimeShift = CTX.state.endAtTimeShift; + const goToEditShift = CTX.state.goToEditShift; + const idEditShift = CTX.state.idEditShift; + const shiftData = CTX.state.shiftData; + + const week = [ + { key: "شنبه", value: 6 }, + { key: "یکشنبه", value: 0 }, + { key: "دوشنبه", value: 1 }, + { key: "سه شنبه", value: 2 }, + { key: "چهار شنبه", value: 3 }, + { key: "پنج شنبه", value: 4 }, + { key: "جمعه", value: 5 }, + ]; + + const validator = useRef( + new SimpleReactValidator({ + messages: { + required: "پر کردن این فیلد الزامی میباشد", + }, + element: (message) => ( + <> +@@ -22,100 +149,162 @@ const BottomSheetCreateShifts = (props) => {
+ {week?.find((b) => b.value == e).key} +
+شنبه
-بستن
-{ +const DatePickerIran = ({ datePickerEvent, date, zindex }) => { const CTX = useContext(AppContext); const [selectedDay, setSelectedDay] = useState(null); @@ -22,7 +22,9 @@ const DatePickerIran = ({ datePickerEvent, date }) => { return (
تاریخ تولد
+
+
+
- ساعت شروع :
-
-
- ساعت شروع :
-
-
- {" "} - 21 نفر در این شیفت قرار دارند -
-- {" "} - 40 تسک فهال{" "} -
-- {" "} - 21 نفر در این شیفت قرار دارند -
-
- ساعت شروع :
-
-
- ساعت شروع :
-
-
- {" "} - 21 نفر در این شیفت قرار دارند -
-- {" "} - 40 تسک فهال{" "} -
-- {" "} - 21 نفر در این شیفت قرار دارند -
-