Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
Person (#15)
Brad Barbinb91af84c7487
diff --git a/.env.example b/.env.exampleindex 074ce52d4d..8f9ddb0456 100644--- a/.env.example+++ b/.env.example@@ -1,4 +1,3 @@-DB_URL="postgresql://postgres:postgres@localhost:54322/postgres"REDIS_URL="redis://localhost:6379"SESSION_SECRET="super-duper-s3cret"SUPABASE_ANON_PUBLIC="************"diff --git a/.github/FUNDING.yml b/.github/FUNDING.ymlnew file mode 100644index 0000000000..cc3800ae16--- /dev/null+++ b/.github/FUNDING.yml@@ -0,0 +1 @@+github: barbinbraddiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 0000000000..ee6caba5e6--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,27 @@+name: Release++on:+ push:+ branches:+ - main+ workflow_dispatch:++jobs:+ deploy:+ name: 🚀 supabase+ runs-on: ubuntu-latest++ env:+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}+ SUPABASE_DB_PASSWORD: ${{ secrets.PRODUCTION_DB_PASSWORD }}+ PROJECT_ID: rzthuiobyixniufffipe++ steps:+ - uses: actions/checkout@v3++ - uses: supabase/setup-cli@v1+ with:+ version: latest++ - run: supabase link --project-ref $PROJECT_ID+ - run: supabase db pushdiff --git a/README.md b/README.mdindex 5823fd62c0..2f9cd6a819 100644--- a/README.md+++ b/README.md@@ -86,8 +86,8 @@ $ cp ./.env.example ./.envAfter you've set the enviroment variables to the output of `db:start` you can run```bash-$ yarn db:rebuild # run db migrations and seed script-$ yarn build # build the packages+$ yarn db:build # run db migrations and seed script+$ yarn build # build the packages```Finally, start the apps and packages:@@ -105,7 +105,7 @@ $ yarn db:kill # stop and delete all database containersTo restart and reseed the database, you can run:```bash-$ yarn db:rebuild # runs db:kill, db:start, and setup+$ yarn db:build # runs db:kill, db:start, and setup```To run a particular application, use the `yarn workspace` command.diff --git a/SCHEMA.md b/SCHEMA.mdindex 495551ea32..bd9973ccbe 100644--- a/SCHEMA.md+++ b/SCHEMA.md@@ -2078,3 +2078,185 @@ CREATE POLICY "Employees with resources_delete can delete employeeAbilities" ON```+++## `shifts`++```sql+CREATE TABLE "location" (+ "id" TEXT NOT NULL DEFAULT xid(),+ "name" TEXT NOT NULL,+ "timezone" TEXT NOT NULL,+ "latitude" NUMERIC,+ "longitude" NUMERIC,++ CONSTRAINT "location_pkey" PRIMARY KEY ("id")+);++ALTER TABLE "location" ENABLE ROW LEVEL SECURITY;++CREATE POLICY "Employees can view locations" ON "location"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert locations" ON "location"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update locations" ON "location"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete locations" ON "location"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+++CREATE TABLE "shift" (+ "id" TEXT NOT NULL DEFAULT xid(),+ "name" TEXT NOT NULL,+ "startTime" TIME NOT NULL,+ "endTime" TIME NOT NULL,+ "locationId" TEXT NOT NULL,+ "sunday" BOOLEAN NOT NULL DEFAULT false,+ "monday" BOOLEAN NOT NULL DEFAULT false,+ "tuesday" BOOLEAN NOT NULL DEFAULT false,+ "wednesday" BOOLEAN NOT NULL DEFAULT false,+ "thursday" BOOLEAN NOT NULL DEFAULT false,+ "friday" BOOLEAN NOT NULL DEFAULT false,+ "saturday" BOOLEAN NOT NULL DEFAULT false,+ "active" BOOLEAN NOT NULL DEFAULT true,++ CONSTRAINT "shifts_pkey" PRIMARY KEY ("id"),+ CONSTRAINT "shifts_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "location"("id") ON DELETE CASCADE ON UPDATE CASCADE+);++ALTER TABLE "shift" ENABLE ROW LEVEL SECURITY;++CREATE POLICY "Employees can view shifts" ON "shift"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert shifts" ON "shift"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update shifts" ON "shift"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete shifts" ON "shift"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+++CREATE TABLE "employeeShift" (+ "id" TEXT NOT NULL DEFAULT xid(),+ "employeeId" TEXT NOT NULL,+ "shiftId" TEXT NOT NULL,++ CONSTRAINT "employeeShift_pkey" PRIMARY KEY ("id"),+ CONSTRAINT "employeeShift_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeShift_shiftId_fkey" FOREIGN KEY ("shiftId") REFERENCES "shift"("id") ON DELETE CASCADE ON UPDATE CASCADE,++ CONSTRAINT uq_employeeShift_employeeId_shiftId UNIQUE ( "employeeId", "shiftId")+);++ALTER TABLE "employeeShift" ENABLE ROW LEVEL SECURITY;++CREATE POLICY "Employees can view employee shifts" ON "employeeShift"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert employee shifts" ON "employeeShift"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update employee shifts" ON "employeeShift"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete employee shifts" ON "employeeShift"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+++CREATE TABLE "employeeJob" (+ "id" TEXT NOT NULL,+ "locationId" TEXT,+ "shiftId" TEXT,+ "managerId" TEXT,+ "title" TEXT,++ CONSTRAINT "employeeJob_pkey" PRIMARY KEY ("id"),+ CONSTRAINT "employeeJob_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeJob_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "location"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeJob_shiftId_fkey" FOREIGN KEY ("shiftId") REFERENCES "shift"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeJob_managerId_fkey" FOREIGN KEY ("managerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE+);++CREATE POLICY "Employees can view employee jobs" ON "employeeJob"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert employee jobs" ON "employeeJob"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update employee jobs" ON "employeeJob"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete employee jobs" ON "employeeJob"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+```+diff --git a/apps/carbon/app/components/Form/Location.tsx b/apps/carbon/app/components/Form/Location.tsxnew file mode 100644index 0000000000..01968c2e6a--- /dev/null+++ b/apps/carbon/app/components/Form/Location.tsx@@ -0,0 +1,88 @@+import { Select } from "@carbon/react";+import {+ Box,+ FormControl,+ FormErrorMessage,+ FormHelperText,+ FormLabel,+} from "@chakra-ui/react";+import { useFetcher } from "@remix-run/react";+import { useEffect, useMemo } from "react";+import { useField } from "remix-validated-form";+import type { getLocationsList } from "~/services/resources";+import { mapRowsToOptions } from "~/utils/form";+import type { SelectProps } from "./Select";++type LocationSelectProps = Omit<SelectProps, "options">;++const Location = ({+ name,+ label = "Location",+ helperText,+ isLoading,+ isReadOnly,+ placeholder,+ onChange,+ ...props+}: LocationSelectProps) => {+ const { getInputProps, error, defaultValue } = useField(name);++ const locationFetcher =+ useFetcher<Awaited<ReturnType<typeof getLocationsList>>>();++ useEffect(() => {+ if (locationFetcher.type === "init") {+ locationFetcher.load("/resource/resources/locations");+ }+ }, [locationFetcher]);++ const options = useMemo(+ () =>+ mapRowsToOptions({+ data: locationFetcher.data?.data,+ value: "id",+ label: "name",+ }),+ [locationFetcher.data]+ );++ const initialValue = useMemo(+ () => options.filter((option) => option.value === defaultValue),+ [defaultValue, options]+ );++ // TODO: hack for default value+ return locationFetcher.state !== "loading" ? (+ <FormControl isInvalid={!!error}>+ {label && <FormLabel htmlFor={name}>{label}</FormLabel>}+ <Select+ {...getInputProps({+ // @ts-ignore+ id: name,+ })}+ {...props}+ defaultValue={initialValue}+ isReadOnly={isReadOnly}+ isLoading={isLoading}+ options={options}+ placeholder={placeholder}+ // @ts-ignore+ onChange={onChange ?? undefined}+ />+ {error ? (+ <FormErrorMessage>{error}</FormErrorMessage>+ ) : (+ helperText && <FormHelperText>{helperText}</FormHelperText>+ )}+ </FormControl>+ ) : (+ <Box>+ {label && <FormLabel>{label}</FormLabel>}+ <Select isDisabled isLoading options={[]} />+ </Box>+ );+};++Location.displayName = "Location";++export default Location;diff --git a/apps/carbon/app/components/Form/Radios.tsx b/apps/carbon/app/components/Form/Radios.tsxindex 4087954014..b7312001dc 100644--- a/apps/carbon/app/components/Form/Radios.tsx+++ b/apps/carbon/app/components/Form/Radios.tsx@@ -12,7 +12,7 @@ import { useField } from "remix-validated-form";type RadiosProps = {name: string;label?: string;- options: { label: string; value: string | number }[];+ options: { label: string; value: string }[];direction?: StackDirection;};diff --git a/apps/carbon/app/components/Form/TimePicker.tsx b/apps/carbon/app/components/Form/TimePicker.tsxnew file mode 100644index 0000000000..5a4689b0ac--- /dev/null+++ b/apps/carbon/app/components/Form/TimePicker.tsx@@ -0,0 +1,47 @@+import { TimePicker as CarbonTimePicker } from "@carbon/react";+import type {+ CalendarDateTime,+ Time,+ ZonedDateTime,+} from "@internationalized/date";+import { parseTime } from "@internationalized/date";+import { FormControl, FormErrorMessage, FormLabel } from "@chakra-ui/react";+import { useState } from "react";+import { useField } from "remix-validated-form";++type TimePickerProps = {+ name: string;+ label?: string;+ minValue?: TimeValue;+ maxValue?: TimeValue;+ onChange?: (date: TimeValue) => void;+};+type TimeValue = Time | CalendarDateTime | ZonedDateTime;++const TimePicker = ({ name, label, onChange }: TimePickerProps) => {+ const { error, defaultValue, validate } = useField(name);+ const [date, setDate] = useState<TimeValue | null>(+ defaultValue ? parseTime(defaultValue) : null+ );++ const handleChange = (date: TimeValue) => {+ setDate(date);+ validate();+ onChange?.(date);+ };++ return (+ <FormControl isInvalid={!!error}>+ {label && <FormLabel htmlFor={name}>{label}</FormLabel>}+ <input type="hidden" name={name} value={date?.toString()} />+ <CarbonTimePicker+ value={date ?? undefined}+ //@ts-ignore+ onChange={handleChange}+ />+ {error && <FormErrorMessage>{error}</FormErrorMessage>}+ </FormControl>+ );+};++export default TimePicker;diff --git a/apps/carbon/app/components/Form/Timezone.tsx b/apps/carbon/app/components/Form/Timezone.tsxnew file mode 100644index 0000000000..39615ba18b--- /dev/null+++ b/apps/carbon/app/components/Form/Timezone.tsx@@ -0,0 +1,75 @@+import { createFilter, Select as CarbonSelect } from "@carbon/react";+import {+ FormControl,+ FormErrorMessage,+ FormHelperText,+ FormLabel,+} from "@chakra-ui/react";+import { useMemo } from "react";+import { useField } from "remix-validated-form";+import { timezonesGroupedByCountry } from "~/lib/timezones";++export type TimezoneProps = {+ name: string;+ label?: string;+ helperText?: string;+ isReadOnly?: boolean;+ isLoading?: boolean;+ placeholder?: string;+ onChange?: (newValue: { value: string | number; label: string }) => void;+};++const Timezone = ({+ name,+ label,+ helperText,+ isLoading,+ isReadOnly,+ placeholder,+ onChange,+ ...props+}: TimezoneProps) => {+ const { getInputProps, error, defaultValue } = useField(name);+ const initialValue = useMemo(+ () =>+ timezonesGroupedByCountry+ .flatMap((group) => group.options)+ .find((option) => option.value === defaultValue),+ [defaultValue]+ );++ // TODO: hack for default value+ return (+ <FormControl isInvalid={!!error}>+ {label && <FormLabel htmlFor={name}>{label}</FormLabel>}+ <CarbonSelect+ {...getInputProps({+ // @ts-ignore+ id: name,+ })}+ {...props}+ defaultValue={initialValue}+ isReadOnly={isReadOnly}+ isLoading={isLoading}+ options={timezonesGroupedByCountry}+ // Only search the labels (not the values)+ filterOption={createFilter({+ matchFrom: "any",+ stringify: (option) => `${option.label}`,+ })}+ placeholder={placeholder ?? "Select a timezone"}+ // @ts-ignore+ onChange={onChange ?? undefined}+ />+ {error ? (+ <FormErrorMessage>{error}</FormErrorMessage>+ ) : (+ helperText && <FormHelperText>{helperText}</FormHelperText>+ )}+ </FormControl>+ );+};++Timezone.displayName = "Timezone";++export default Timezone;diff --git a/apps/carbon/app/components/Form/index.ts b/apps/carbon/app/components/Form/index.tsindex e99f0d97fd..956daa5f46 100644--- a/apps/carbon/app/components/Form/index.ts+++ b/apps/carbon/app/components/Form/index.ts@@ -6,8 +6,9 @@ import CustomerContact from "./CustomerContact";import DatePicker from "./DatePicker";import Employee from "./Employee";import Employees from "./Employees";-import Input from "./Input";import Hidden from "./Hidden";+import Input from "./Input";+import Location from "./Location";import Number from "./Number";import Password from "./Password";import Phone from "./Phone";@@ -18,6 +19,8 @@ import Submit from "./Submit";import Supplier from "./Supplier";import SupplierContact from "./SupplierContact";import TextArea from "./Textarea";+import TimePicker from "./TimePicker";+import Timezone from "./Timezone";import User from "./User";import Users from "./Users";@@ -30,8 +33,9 @@ export {DatePicker,Employee,Employees,- Input,Hidden,+ Input,+ Location,Number,Password,Phone,@@ -42,6 +46,8 @@ export {Supplier,SupplierContact,TextArea,+ TimePicker,+ Timezone,User,Users,};diff --git a/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx b/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsxindex 895281b34d..b3d4e1478e 100644--- a/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx+++ b/apps/carbon/app/components/Layout/Sidebar/IconSidebar.tsx@@ -1,6 +1,7 @@import { useColor } from "@carbon/react";import { Box, IconButton, Tooltip, VStack } from "@chakra-ui/react";import { Link, useMatches } from "@remix-run/react";+import { BsFillHexagonFill } from "react-icons/bs";import { useSidebar } from "./useSidebar";const IconSidebar = () => {@@ -10,11 +11,20 @@ const IconSidebar = () => {return (<Boxh="full"- bg={useColor("white")}borderRight={1}borderRightColor={useColor("gray.200")}borderRightStyle="solid">+ <IconButton+ aria-label="Home"+ as={Link}+ to="/"+ variant="ghost"+ size="lg"+ icon={<BsFillHexagonFill />}+ mb={4}+ />+<VStack spacing={0} top={50} position="sticky">{links.map((link) => {const isActive = matchedPaths.includes(link.to);@@ -23,6 +33,7 @@ const IconSidebar = () => {<IconButtonas={Link}to={link.to}+ colorScheme={isActive ? link.color ?? "brand" : undefined}variant={isActive ? "solid" : "outline"}size="lg"borderRadius={0}diff --git a/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx b/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsxindex 70edf4c45c..67356c0398 100644--- a/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx+++ b/apps/carbon/app/components/Layout/Topbar/useBreadcrumbs.tsx@@ -1,5 +1,5 @@import { useMatches } from "@remix-run/react";-import { IoHomeSharp } from "react-icons/io5";+import type { Route } from "~/types";export default function useBreadcrumbs(): Route[] {@@ -7,8 +7,6 @@ export default function useBreadcrumbs(): Route[] {const result = matches.reduce<Route[]>((acc, match) => {switch (match.id) {- case "root":- return acc.concat({ to: "/x", name: "Home", icon: <IoHomeSharp /> });case "routes/x+/account":return acc.concat({name: "Account",diff --git a/apps/carbon/app/components/Table/Table.tsx b/apps/carbon/app/components/Table/Table.tsxindex 35d5734f9b..10c101e23f 100644--- a/apps/carbon/app/components/Table/Table.tsx+++ b/apps/carbon/app/components/Table/Table.tsx@@ -8,9 +8,6 @@ import {Grid,Table as ChakraTable,Tbody,- Td,- Th,- Tr,Thead,chakra,} from "@chakra-ui/react";@@ -18,7 +15,6 @@ import type {ColumnDef,ColumnOrderState,ColumnPinningState,- Row as RowType,RowSelectionState,} from "@tanstack/react-table";import {@@ -26,18 +22,16 @@ import {getCoreRowModel,useReactTable,} from "@tanstack/react-table";-// import { AnimatePresence } from "framer-motion";+import { AnimatePresence } from "framer-motion";import { useCallback, useEffect, useMemo, useRef, useState } from "react";-import { useVirtual } from "react-virtual";-import { AiFillCaretUp, AiFillCaretDown } from "react-icons/ai";+import { FaSort, FaSortUp, FaSortDown } from "react-icons/fa";import {TableHeader,IndeterminateCheckbox,Pagination,- // Td,- // Th,- // Tr,- // spring,+ Th,+ Tr,+ spring,usePagination,useSort,Row,@@ -379,29 +373,6 @@ const Table = <T extends object>({const rows = table.getRowModel().rows;const rowsAreClickable = !editMode && typeof onRowClick === "function";- const rowVirtualizer = useVirtual({- parentRef: tableContainerRef,- size: rows.length,- overscan: 10,- });-- // const columnVirtualizer = useVirtual({- // horizontal: true,- // size: table.getVisibleLeafColumns().length,- // parentRef: tableContainerRef,- // estimateSize: useCallback(() => 250, []),- // overscan: 5,- // });-- const { virtualItems: virtualRows, totalSize: totalRows } = rowVirtualizer;-- const virtualPaddingTop =- virtualRows.length > 0 ? virtualRows?.[0]?.start || 0 : 0;- const virutalPaddingBottom =- virtualRows.length > 0- ? totalRows - (virtualRows?.[virtualRows.length - 1]?.end || 0)- : 0;-const defaultBackground = useColor("white");const borderColor = useColor("gray.200");const rowBackground = useColor("gray.50");@@ -459,7 +430,10 @@ const Table = <T extends object>({const sortable =withSimpleSorting &&accessorKey &&+ accessorKey !== "id" &&+ !accessorKey.endsWith(".id") &&header.column.columnDef.enableSorting !== false;+const sorted = isSorted(accessorKey ?? "");return (@@ -472,7 +446,7 @@ const Table = <T extends object>({: undefined}cursor={sortable ? "pointer" : undefined}- // transition={spring}+ transition={spring}colSpan={header.colSpan}px={4}py={2}@@ -492,10 +466,12 @@ const Table = <T extends object>({<chakra.span pl="4">{sorted ? (sorted === -1 ? (- <AiFillCaretDown aria-label="sorted descending" />+ <FaSortDown aria-label="sorted descending" />) : (- <AiFillCaretUp aria-label="sorted ascending" />+ <FaSortUp aria-label="sorted ascending" />)+ ) : sortable ? (+ <FaSort aria-label="sort" />) : null}</chakra.span></Flex>@@ -507,44 +483,32 @@ const Table = <T extends object>({))}</Thead><Tbody>- {virtualPaddingTop > 0 && (- <Tr>- <Td style={{ height: `${virtualPaddingTop}px` }} />- </Tr>- )}- {/* <AnimatePresence> */}- {virtualRows.map((virtualRow) => {- const row = rows[virtualRow.index] as RowType<T>;-- return (- <Row- key={row.id}- borderColor={borderColor}- backgroundColor={rowBackground}- editableComponents={editableComponents}- isEditing={isEditing}- isEditMode={editMode}- isFrozenColumn- selectedCell={selectedCell}- // @ts-ignore- row={row}- withColumnOrdering={withColumnOrdering}- onCellClick={onCellClick}- onCellUpdate={onCellEditUpdate}- onRowClick={- rowsAreClickable- ? () => onRowClick(row.original)- : undefined- }- />- );- })}- {/* </AnimatePresence> */}- {virutalPaddingBottom > 0 && (- <Tr>- <Td style={{ height: `${virutalPaddingBottom}px` }} />- </Tr>- )}+ <AnimatePresence>+ {rows.map((row) => {+ return (+ <Row+ key={row.id}+ borderColor={borderColor}+ backgroundColor={rowBackground}+ editableComponents={editableComponents}+ isEditing={isEditing}+ isEditMode={editMode}+ isFrozenColumn+ selectedCell={selectedCell}+ // @ts-ignore+ row={row}+ withColumnOrdering={withColumnOrdering}+ onCellClick={onCellClick}+ onCellUpdate={onCellEditUpdate}+ onRowClick={+ rowsAreClickable+ ? () => onRowClick(row.original)+ : undefined+ }+ />+ );+ })}+ </AnimatePresence></Tbody></ChakraTable>) : null}@@ -559,9 +523,12 @@ const Table = <T extends object>({<Tr key={headerGroup.id} h={10}>{headerGroup.headers.map((header) => {const accessorKey = getAccessorKey(header.column.columnDef);+const sortable =withSimpleSorting &&accessorKey &&+ accessorKey !== "id" &&+ !accessorKey.endsWith(".id") &&header.column.columnDef.enableSorting !== false;const sorted = isSorted(accessorKey ?? "");@@ -578,8 +545,8 @@ const Table = <T extends object>({borderRightStyle="solid"borderRightWidth={editMode ? 1 : undefined}cursor={sortable ? "pointer" : undefined}- // layout- // transition={spring}+ layout+ transition={spring}px={4}py={3}w={header.getSize()}@@ -599,10 +566,15 @@ const Table = <T extends object>({<chakra.span pl="4">{sorted ? (sorted === -1 ? (- <AiFillCaretDown aria-label="sorted descending" />+ <FaSortDown aria-label="sorted descending" />) : (- <AiFillCaretUp aria-label="sorted ascending" />+ <FaSortUp aria-label="sorted ascending" />)+ ) : sortable ? (+ <FaSort+ aria-label="sort"+ style={{ opacity: 0.4 }}+ />) : null}</chakra.span></Flex>@@ -614,51 +586,39 @@ const Table = <T extends object>({))}</Thead><Tbody>- {virtualPaddingTop > 0 && (- <Tr>- <Td style={{ height: `${virtualPaddingTop}px` }} />- </Tr>- )}- {/* <AnimatePresence> */}- {virtualRows.map((virtualRow) => {- const row = rows[virtualRow.index] as RowType<T>;-- return (- <Row- key={row.id}- borderColor={borderColor}- backgroundColor={rowBackground}- // @ts-ignore- editableComponents={editableComponents}- isEditing={isEditing}- isEditMode={editMode}- pinnedColumns={- columnPinning?.left- ? columnPinning.left?.length -- (withSelectableRows ? 1 : 0)- : 0- }- selectedCell={selectedCell}- // @ts-ignore- row={row}- rowIsClickable={rowsAreClickable}- withColumnOrdering={withColumnOrdering}- onCellClick={onCellClick}- onCellUpdate={onCellEditUpdate}- onRowClick={- rowsAreClickable- ? () => onRowClick(row.original)- : undefined- }- />- );- })}- {/* </AnimatePresence> */}- {virutalPaddingBottom > 0 && (- <Tr>- <Td style={{ height: `${virutalPaddingBottom}px` }} />- </Tr>- )}+ <AnimatePresence>+ {rows.map((row) => {+ return (+ <Row+ key={row.id}+ borderColor={borderColor}+ backgroundColor={rowBackground}+ // @ts-ignore+ editableComponents={editableComponents}+ isEditing={isEditing}+ isEditMode={editMode}+ pinnedColumns={+ columnPinning?.left+ ? columnPinning.left?.length -+ (withSelectableRows ? 1 : 0)+ : 0+ }+ selectedCell={selectedCell}+ // @ts-ignore+ row={row}+ rowIsClickable={rowsAreClickable}+ withColumnOrdering={withColumnOrdering}+ onCellClick={onCellClick}+ onCellUpdate={onCellEditUpdate}+ onRowClick={+ rowsAreClickable+ ? () => onRowClick(row.original)+ : undefined+ }+ />+ );+ })}+ </AnimatePresence></Tbody></ChakraTable></Grid>diff --git a/apps/carbon/app/components/Table/components/Cell/Cell.tsx b/apps/carbon/app/components/Table/components/Cell/Cell.tsxindex 4606528adf..cef8dead51 100644--- a/apps/carbon/app/components/Table/components/Cell/Cell.tsx+++ b/apps/carbon/app/components/Table/components/Cell/Cell.tsx@@ -5,13 +5,12 @@ import {PopoverAnchor,PopoverBody,PopoverContent,- Td,} from "@chakra-ui/react";import type { Cell as CellType } from "@tanstack/react-table";import { flexRender } from "@tanstack/react-table";import { useMovingCellRef } from "../../hooks/useMovingCellRef";import { memo } from "react";-// import { Td, spring } from "../Animations";+import { Td, spring } from "../Animations";import type { EditableTableCellComponent } from "../../types";import { getAccessorKey } from "../../utils";@@ -49,8 +48,8 @@ const Cell = <T extends object>({ref={ref}data-row={cell.row.index}data-column={columnIndex}- // layout- // transition={spring}+ layout+ transition={spring}tabIndex={tabIndex}bgColor={isEditMode && !hasEditableTableCellComponent ? "gray.50" : undefineddiff --git a/apps/carbon/app/components/Table/components/Row/Row.tsx b/apps/carbon/app/components/Table/components/Row/Row.tsxindex 11aab2d15c..0b02bea452 100644--- a/apps/carbon/app/components/Table/components/Row/Row.tsx+++ b/apps/carbon/app/components/Table/components/Row/Row.tsx@@ -1,6 +1,5 @@import type { Row as RowType } from "@tanstack/react-table";-import { Tr } from "@chakra-ui/react";-// import { Tr, spring } from "../Animations";+import { Tr, spring } from "../Animations";import Cell from "../Cell";import type { EditableTableCellComponent, Position } from "../../types";import { useColor } from "@carbon/react";@@ -43,9 +42,9 @@ const Row = <T extends object>({<Trkey={row.id}bg={isFrozenColumn ? frozenBackgroundColor : undefined}- // exit={{ opacity: 0 }}- // layout- // transition={spring}+ exit={{ opacity: 0 }}+ layout+ transition={spring}onClick={onRowClick}_hover={{cursor: rowIsClickable ? "pointer" : undefined,diff --git a/apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsx b/apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsxindex bf334b5aba..0452fda498 100644--- a/apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsx+++ b/apps/carbon/app/interfaces/Account/Profile/ProfileForm/ProfileForm.tsx@@ -1,4 +1,5 @@import { Box, Grid, VStack } from "@chakra-ui/react";+import { useParams } from "@remix-run/react";import { ValidatedForm } from "remix-validated-form";import { Hidden, Input, Submit, TextArea } from "~/components/Form";import { SectionTitle } from "~/components/Layout";@@ -10,12 +11,17 @@ type ProfileFormProps = {};const ProfileForm = ({ user }: ProfileFormProps) => {+ const { personId } = useParams();+ const isSelf = !personId;+return (<Box w="full"><SectionTitle title="Basic Information" /><ValidatedFormmethod="post"- action="/x/account/profile"+ action={+ isSelf ? "/x/account/profile" : `/x/resources/person/${user.id}`+ }validator={accountProfileValidator}defaultValues={user}>diff --git a/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx b/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsxindex 1c9ee32b86..ed0199ae48 100644--- a/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx+++ b/apps/carbon/app/interfaces/Account/UserAttributes/UserAttributesForm.tsx@@ -10,7 +10,7 @@ import {VStack,} from "@chakra-ui/react";import { parseDate } from "@internationalized/date";-import { useFetcher } from "@remix-run/react";+import { useFetcher, useParams } from "@remix-run/react";import { useState } from "react";import { ValidatedForm } from "remix-validated-form";import {@@ -24,7 +24,7 @@ import {Select,} from "~/components/Form";import { UserSelect } from "~/components/Selectors";-import { useUser } from "~/hooks";+import { usePermissions, useUser } from "~/hooks";import type { PublicAttributes } from "~/interfaces/Account/types";import { DataType } from "~/interfaces/Users/types";import {@@ -40,12 +40,20 @@ type UserAttributesFormProps = {};const UserAttributesForm = ({ attributeCategory }: UserAttributesFormProps) => {+ const { personId } = useParams();+ const permissions = usePermissions();const user = useUser();const updateFetcher = useFetcher<{}>();const [optimisticUpdates, setOptimisticUpdates] = useState<- Record<string, boolean | string | number>+ Record<string, boolean | string | number | undefined>>({});+ const isAuthorized = !personId;+ if (!isAuthorized && !permissions.can("update", "resources"))+ throw new Error("Unauthorized");++ const userId = isAuthorized ? user.id : personId;+if (!attributeCategory ||!attributeCategory.userAttribute ||@@ -67,7 +75,10 @@ const UserAttributesForm = ({ attributeCategory }: UserAttributesFormProps) => {<GenericAttributeRowkey={attribute.id}attribute={attribute}- setOptimisticUpdate={(value: boolean | string | number) =>+ isAuthorized={isAuthorized}+ setOptimisticUpdate={(+ value: boolean | string | number | undefined+ ) =>setOptimisticUpdates((prev) => ({...prev,[attribute.id]: value,@@ -75,7 +86,7 @@ const UserAttributesForm = ({ attributeCategory }: UserAttributesFormProps) => {}// @ts-ignoreupdateFetcher={updateFetcher}- userId={user.id}+ userId={userId}{...genericProps}/>);@@ -93,13 +104,14 @@ type GenericAttributeRowProps = {listOptions: string[] | null;};displayValue: string | number | boolean;+ isAuthorized: boolean;type: DataType;updateFetcher: ReturnType<typeof useFetcher>;userAttributeId: string;userAttributeValueId?: string;userId: string;value: Date | string | number | boolean | null;- setOptimisticUpdate: (value: boolean | string | number) => void;+ setOptimisticUpdate: (value: boolean | string | number | undefined) => void;};const GenericAttributeRow = (props: GenericAttributeRowProps) => {@@ -419,8 +431,16 @@ function renderTypedDisplay({borderColor,...props}: GenericAttributeRowProps & { borderColor: string; onOpen: () => void }) {- const { attribute, displayValue, type, userAttributeValueId, value, onOpen } =- props;+ const {+ attribute,+ displayValue,+ isAuthorized,+ type,+ userAttributeValueId,+ value,+ onOpen,+ setOptimisticUpdate,+ } = props;switch (type) {case DataType.Boolean:return (@@ -442,7 +462,7 @@ function renderTypedDisplay({)}<HStack justifyContent="end" w="full" alignSelf="center"><Button- isDisabled={!attribute.canSelfManage ?? true}+ isDisabled={!isAuthorized && (!attribute.canSelfManage ?? true)}variant="ghost"onClick={onOpen}>@@ -469,12 +489,14 @@ function renderTypedDisplay({<Text alignSelf="center">{displayValue}</Text><UpdateRemoveButtonscanRemove={- attribute.canSelfManage === true &&- !!value &&- !!userAttributeValueId+ !isAuthorized ||+ (attribute.canSelfManage === true &&+ !!value &&+ !!userAttributeValueId)}- canUpdate={attribute.canSelfManage ?? false}+ canUpdate={!isAuthorized || (attribute.canSelfManage ?? false)}{...props}+ onSubmit={setOptimisticUpdate}/></Grid>);@@ -493,9 +515,12 @@ function renderTypedDisplay({</Text><Text alignSelf="center">{displayValue.toLocaleString("en-US")}</Text><UpdateRemoveButtons- canRemove={attribute.canSelfManage === true && !!value}- canUpdate={attribute.canSelfManage ?? false}+ canRemove={+ !isAuthorized || (attribute.canSelfManage === true && !!value)+ }+ canUpdate={!isAuthorized || (attribute.canSelfManage ?? false)}{...props}+ onSubmit={setOptimisticUpdate}/></Grid>);@@ -519,9 +544,12 @@ function renderTypedDisplay({)}<UpdateRemoveButtons- canRemove={attribute.canSelfManage === true && !!value}- canUpdate={attribute.canSelfManage ?? false}+ canRemove={+ !isAuthorized || (attribute.canSelfManage === true && !!value)+ }+ canUpdate={!isAuthorized || (attribute.canSelfManage ?? false)}{...props}+ onSubmit={setOptimisticUpdate}/></Grid>);@@ -617,6 +645,7 @@ function UpdateRemoveButtons({userAttributeId,userAttributeValueId,onOpen,+ onSubmit,}: {canRemove: boolean;canUpdate: boolean;@@ -625,6 +654,7 @@ function UpdateRemoveButtons({userAttributeId: string;userAttributeValueId?: string;onOpen: () => void;+ onSubmit: (value: string | boolean | number | undefined) => void;}) {return (<HStack justifyContent="end" w="full" alignSelf="center">@@ -638,6 +668,7 @@ function UpdateRemoveButtons({userAttributeValueId,}}fetcher={updateFetcher}+ onSubmit={() => onSubmit(undefined)}><Hidden name="userAttributeId" /><Hidden name="userAttributeValueId" />diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsxindex 2cede83c5a..e7d85dd1c6 100644--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityEmployeesTable/AbilityEmployeesTable.tsx@@ -157,7 +157,7 @@ const AbilityEmployeesTable = ({),},];- }, []);+ }, [abilityId, navigate, permissions]);if (!abilityId) return null;diff --git a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx b/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsxindex 2131cf3b08..22f2155d91 100644--- a/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx+++ b/apps/carbon/app/interfaces/Resources/Abilities/AbilityForm/AbilityForm.tsx@@ -14,6 +14,7 @@ import { useNavigate } from "@remix-run/react";import { useState } from "react";import { ValidatedForm } from "remix-validated-form";import {+ Boolean,Employees,Hidden,Input,@@ -39,6 +40,7 @@ const AbilityForm = ({ initialValues }: AbilityFormProps) => {const navigate = useNavigate();const onClose = () => navigate(-1);const [maxShadowWeeks, setMaxShadowWeeks] = useState(initialValues.weeks);+ // const [equipmentRequired, setEquipmentRequired] = useState(initialValues.equipmentType !== undefined);const onWeekChange = (_: string, value: number) => {setMaxShadowWeeks(value);@@ -62,6 +64,12 @@ const AbilityForm = ({ initialValues }: AbilityFormProps) => {<Hidden name="id" /><VStack spacing={4} alignItems="start"><Input name="name" label="Name" />+ {/* <Boolean+ name="machineOperator"+ label="Equipment Required"+ description="This ability requires specific equipment"++ /> */}<Selectname="startingPoint"label="Learning Curve"diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationForm/LocationForm.tsx b/apps/carbon/app/interfaces/Resources/Locations/LocationForm/LocationForm.tsxnew file mode 100644index 0000000000..0098865052--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/LocationForm/LocationForm.tsx@@ -0,0 +1,83 @@+import {+ Button,+ Drawer,+ DrawerBody,+ DrawerCloseButton,+ DrawerContent,+ DrawerFooter,+ DrawerHeader,+ DrawerOverlay,+ HStack,+ VStack,+} from "@chakra-ui/react";+import { useNavigate } from "@remix-run/react";+import { ValidatedForm } from "remix-validated-form";+import { Hidden, Input, Number, Submit, Timezone } from "~/components/Form";+import { usePermissions } from "~/hooks";+import { locationValidator } from "~/services/resources";++type LocationFormProps = {+ initialValues: {+ id?: string;+ name: string;+ timezone: string;+ latitude?: number;+ longitude?: number;+ };+};++const LocationForm = ({ initialValues }: LocationFormProps) => {+ const permissions = usePermissions();+ const navigate = useNavigate();+ const onClose = () => navigate(-1);++ const isEditing = initialValues.id !== undefined;+ const isDisabled = isEditing+ ? !permissions.can("update", "resources")+ : !permissions.can("create", "resources");++ return (+ <Drawer onClose={onClose} isOpen={true} size="sm">+ <ValidatedForm+ validator={locationValidator}+ method="post"+ action={+ isEditing+ ? `/x/resources/locations/${initialValues.id}`+ : "/x/resources/locations/new"+ }+ defaultValues={initialValues}+ >+ <DrawerOverlay />+ <DrawerContent>+ <DrawerCloseButton />+ <DrawerHeader>{isEditing ? "Edit" : "New"} Location</DrawerHeader>+ <DrawerBody pb={8}>+ <Hidden name="id" />+ <VStack spacing={4} alignItems="start">+ <Input name="name" label="Location Name" />+ <Timezone name="timezone" label="Timezone" />+ <Number name="latitude" label="Latitude" min={-90} max={90} />+ <Number name="longitude" label="Longitude" min={-180} max={180} />+ </VStack>+ </DrawerBody>+ <DrawerFooter>+ <HStack spacing={2}>+ <Submit isDisabled={isDisabled}>Save</Submit>+ <Button+ size="md"+ colorScheme="gray"+ variant="solid"+ onClick={onClose}+ >+ Cancel+ </Button>+ </HStack>+ </DrawerFooter>+ </DrawerContent>+ </ValidatedForm>+ </Drawer>+ );+};++export default LocationForm;diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationForm/index.ts b/apps/carbon/app/interfaces/Resources/Locations/LocationForm/index.tsnew file mode 100644index 0000000000..cc681fea4b--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/LocationForm/index.ts@@ -0,0 +1,3 @@+import LocationForm from "./LocationForm";++export default LocationForm;diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/LocationsTable.tsx b/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/LocationsTable.tsxnew file mode 100644index 0000000000..d81326f939--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/LocationsTable.tsx@@ -0,0 +1,83 @@+import { ActionMenu } from "@carbon/react";+import { Flex, MenuItem, VisuallyHidden } from "@chakra-ui/react";+import { useNavigate } from "@remix-run/react";+import type { ColumnDef } from "@tanstack/react-table";+import { memo, useMemo } from "react";+import { BsPencilSquare } from "react-icons/bs";+import { IoMdTrash } from "react-icons/io";+import { Table } from "~/components";+import { usePermissions } from "~/hooks";+import type { ShiftLocation } from "~/interfaces/Resources/types";++type LocationsTableProps = {+ data: ShiftLocation[];+ count: number;+};++const LocationsTable = memo(({ data, count }: LocationsTableProps) => {+ const navigate = useNavigate();+ const permissions = usePermissions();++ const rows = data.map((row) => ({+ ...row,+ }));++ const columns = useMemo<ColumnDef<typeof rows[number]>[]>(() => {+ return [+ {+ accessorKey: "name",+ header: "Location",+ cell: (item) => item.getValue(),+ },+ {+ accessorKey: "timezone",+ header: "Timezone",+ cell: (item) => item.getValue(),+ },+ {+ accessorKey: "latitude",+ header: "Latitude",+ cell: (item) => item.getValue(),+ },+ {+ accessorKey: "longitude",+ header: "Longitude",+ cell: (item) => item.getValue(),+ },+ {+ accessorKey: "id",+ header: () => <VisuallyHidden>Actions</VisuallyHidden>,+ cell: ({ row }) => (+ <Flex justifyContent="end">+ <ActionMenu>+ <MenuItem+ icon={<BsPencilSquare />}+ onClick={() => {+ navigate(`/x/resources/locations/${row.original.id}`);+ }}+ >+ Edit Location+ </MenuItem>+ <MenuItem+ isDisabled={!permissions.can("delete", "resources")}+ icon={<IoMdTrash />}+ onClick={() => {+ navigate(`/x/resources/locations/delete/${row.original.id}`);+ }}+ >+ Delete Location+ </MenuItem>+ </ActionMenu>+ </Flex>+ ),+ },+ ];+ }, [navigate, permissions]);++ return (+ <Table<typeof rows[number]> data={rows} count={count} columns={columns} />+ );+});++LocationsTable.displayName = "LocationsTable";+export default LocationsTable;diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/index.ts b/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/index.tsnew file mode 100644index 0000000000..1434ab470d--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/LocationsTable/index.ts@@ -0,0 +1,3 @@+import LocationsTable from "./LocationsTable";++export default LocationsTable;diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/LocationsTableFilters.tsx b/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/LocationsTableFilters.tsxnew file mode 100644index 0000000000..358a9d0181--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/LocationsTableFilters.tsx@@ -0,0 +1,47 @@+import { useColor } from "@carbon/react";+import { Button, HStack } from "@chakra-ui/react";+import { Link } from "@remix-run/react";+import { IoMdAdd } from "react-icons/io";+import { DebouncedInput } from "~/components/Search";+import { usePermissions, useUrlParams } from "~/hooks";++const LocationsTableFilters = () => {+ const [params] = useUrlParams();+ const permissions = usePermissions();+ const borderColor = useColor("gray.200");++ return (+ <HStack+ borderBottomColor={borderColor}+ borderBottomStyle="solid"+ borderBottomWidth={1}+ justifyContent="space-between"+ px={4}+ py={3}+ w="full"+ >+ <HStack spacing={2}>+ <DebouncedInput+ param="name"+ size="sm"+ minW={180}+ placeholder="Search by name"+ />+ </HStack>+ <HStack spacing={2}>+ {permissions.can("create", "resources") && (+ <Button+ as={Link}+ to={`new?${params.toString()}`}+ colorScheme="brand"+ leftIcon={<IoMdAdd />}+ >+ New Location+ </Button>+ )}+ </HStack>+ </HStack>+ );+};++export default LocationsTableFilters;diff --git a/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/index.ts b/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/index.tsnew file mode 100644index 0000000000..917f62228f--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/LocationsTableFilters/index.ts@@ -0,0 +1,3 @@+import LocationsTableFilters from "./LocationsTableFilters";++export default LocationsTableFilters;diff --git a/apps/carbon/app/interfaces/Resources/Locations/index.ts b/apps/carbon/app/interfaces/Resources/Locations/index.tsnew file mode 100644index 0000000000..aa42917741--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Locations/index.ts@@ -0,0 +1,5 @@+import LocationsTable from "./LocationsTable";+import LocationsTableFilters from "./LocationsTableFilters";+import LocationForm from "./LocationForm";++export { LocationsTable, LocationsTableFilters, LocationForm };diff --git a/apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsx b/apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsxindex 2b29442180..acb88398c0 100644--- a/apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsx+++ b/apps/carbon/app/interfaces/Resources/People/PeopleTable/PeopleTable.tsx@@ -1,5 +1,12 @@import { ActionMenu } from "@carbon/react";-import { Flex, HStack, MenuItem, Text, VisuallyHidden } from "@chakra-ui/react";+import {+ Flex,+ HStack,+ Link,+ MenuItem,+ Text,+ VisuallyHidden,+} from "@chakra-ui/react";import { useNavigate } from "@remix-run/react";import type { ColumnDef } from "@tanstack/react-table";import { memo, useCallback, useMemo } from "react";@@ -106,12 +113,19 @@ const PeopleTable = memo(path={row.original.user?.avatarUrl}/>- <span>+ <Link+ onClick={() => {+ navigate(+ // @ts-ignore+ `/x/resources/person/${row?.original.user.id}`+ );+ }}+ >{// @ts-ignore- `${row.original.user?.firstName} ${row.original.user?.lastName}`+ row.original.user?.fullName}- </span>+ </Link></HStack>),},@@ -213,15 +227,6 @@ const PeopleTable = memo(defaultColumnPinning={{left: ["Select", "User"],}}- onRowClick={(row) => {- // @ts-ignore- row?.user?.id- ? navigate(- // @ts-ignore- `/x/resources/person/${row?.user.id}?${params.toString()}`- )- : console.error("Expected user id to be defined");- }}withColumnOrdering// withInlineEditingwithFiltersdiff --git a/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsxindex c74fac1b53..b0505ed881 100644--- a/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsx+++ b/apps/carbon/app/interfaces/Resources/Person/PersonAbilities/PersonAbilities.tsx@@ -1,12 +1,131 @@-import { Card, CardBody, CardHeader, Heading } from "@chakra-ui/react";+import { formatDate } from "@carbon/utils";+import {+ Box,+ Card,+ CardBody,+ CardHeader,+ Center,+ Heading,+ Grid,+ Icon,+ Text,+ Flex,+ List,+ ListItem,+} from "@chakra-ui/react";+import { Link } from "@remix-run/react";+import type { IconType } from "react-icons";-const PersonAbilities = () => {+import { BsCheckLg, BsBarChartFill } from "react-icons/bs";+import { FaThumbsUp } from "react-icons/fa";+import type { EmployeeAbility } from "~/interfaces/Resources/types";+import { getTrainingStatus } from "~/interfaces/Resources/types";+import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";++type PersonAbilitiesProps = {+ abilities: EmployeeAbility[];+};++const AbilityIcons: Record<+ AbilityEmployeeStatus,+ {+ color: string;+ bg: string;+ icon: IconType;+ description: string;+ }+> = {+ [AbilityEmployeeStatus.Complete]: {+ color: "white",+ bg: "green.500",+ icon: BsCheckLg,+ description: "Fully trained for",+ },+ [AbilityEmployeeStatus.InProgress]: {+ color: "white",+ bg: "blue.400",+ icon: BsBarChartFill,+ description: "Currently training for",+ },+ [AbilityEmployeeStatus.NotStarted]: {+ color: "gray.700",+ bg: "gray.200",+ icon: FaThumbsUp,+ description: "Not started training for",+ },+};++const PersonAbilities = ({ abilities }: PersonAbilitiesProps) => {return (<Card w="full"><CardHeader><Heading size="md">Abilities</Heading></CardHeader>- <CardBody></CardBody>+ <CardBody>+ {abilities?.length > 0 ? (+ <List spacing={4}>+ {abilities.map((employeeAbility) => {+ const abilityStatus =+ getTrainingStatus(employeeAbility) ??+ AbilityEmployeeStatus.NotStarted;++ const { color, bg, icon, description } =+ AbilityIcons[abilityStatus];++ if (+ !employeeAbility.ability ||+ Array.isArray(employeeAbility.ability)+ ) {+ return null;+ }++ return (+ <ListItem key={employeeAbility.id}>+ <Grid+ key={employeeAbility.id}+ gridTemplateColumns="auto 1fr auto"+ gridColumnGap={4}+ >+ <Center+ bg={bg}+ borderRadius="full"+ color={color}+ h={10}+ w={10}+ >+ <Icon as={icon} w={5} h={5} />+ </Center>+ <Flex h="full" alignItems="center">+ <Text>+ {description}{" "}+ <Text+ as={Link}+ fontWeight="bold"+ to={`/x/resources/ability/${employeeAbility.ability.id}/employee/${employeeAbility.id}`}+ >+ {employeeAbility.ability.name}+ </Text>+ </Text>+ </Flex>+ <Flex h="full" alignItems="center">+ <Text color="gray.500" fontSize="sm">+ {formatDate(employeeAbility.lastTrainingDate, {+ month: "short",+ year: "numeric",+ })}+ </Text>+ </Flex>+ </Grid>+ </ListItem>+ );+ })}+ </List>+ ) : (+ <Box color="gray.500" p={4} w="full" textAlign="center">+ No abilities added+ </Box>+ )}+ </CardBody></Card>);};diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/PersonDaysOff.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/PersonDaysOff.tsxnew file mode 100644index 0000000000..17c289cf9a--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/PersonDaysOff.tsx@@ -0,0 +1,20 @@+import { Box, Card, CardBody, CardHeader, Heading } from "@chakra-ui/react";++type PersonDaysOffProps = {};++const PersonDaysOff = (props: PersonDaysOffProps) => {+ return (+ <Card w="full">+ <CardHeader>+ <Heading size="md">Days Off</Heading>+ </CardHeader>+ <CardBody>+ <Box color="gray.500" p={4} w="full" textAlign="center">+ No days off scheduled+ </Box>+ </CardBody>+ </Card>+ );+};++export default PersonDaysOff;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/index.ts b/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/index.tsnew file mode 100644index 0000000000..ea3616d18e--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Person/PersonDaysOff/index.ts@@ -0,0 +1,3 @@+import PersonDaysOff from "./PersonDaysOff";++export default PersonDaysOff;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonJob/PersonJob.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonJob/PersonJob.tsxnew file mode 100644index 0000000000..7a7cbf19c2--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Person/PersonJob/PersonJob.tsx@@ -0,0 +1,125 @@+import { Select } from "@carbon/react";+import {+ Box,+ FormControl,+ FormErrorMessage,+ FormLabel,+ VStack,+} from "@chakra-ui/react";+import { useFetcher } from "@remix-run/react";+import { useEffect, useMemo, useState } from "react";+import { useControlField, useField, ValidatedForm } from "remix-validated-form";+import { Employee, Hidden, Input, Location, Submit } from "~/components/Form";+import { SectionTitle } from "~/components/Layout";+import type { EmployeeJob } from "~/interfaces/Resources/types";+import type { getShiftsList } from "~/services/resources";+import { employeeJobValidator } from "~/services/resources";+import { mapRowsToOptions } from "~/utils/form";++type PersonJobProps = {+ job: EmployeeJob;+};++const PersonJob = ({ job }: PersonJobProps) => {+ console.log(job);+ const shiftFetcher = useFetcher<Awaited<ReturnType<typeof getShiftsList>>>();+ const [location, setLocation] = useState<string | null>(+ job.locationId ?? null+ );++ const onLocationChange = ({ value }: { value: string | number }) => {+ setLocation(value as string);+ };++ useEffect(() => {+ shiftFetcher.load(`/resource/resources/shifts?location=${location}`);+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [location]);++ const shifts = useMemo(+ () =>+ mapRowsToOptions({+ data: shiftFetcher.data?.data ?? [],+ value: "id",+ label: "name",+ }),+ [shiftFetcher.data]+ );++ return (+ <Box w="full">+ <ValidatedForm+ validator={employeeJobValidator}+ method="post"+ defaultValues={{+ locationId: job.locationId ?? undefined,+ title: job.title ?? undefined,+ managerId: job.managerId ?? undefined,+ shiftId: job.shiftId ?? undefined,+ }}+ >+ <SectionTitle title="Job" />+ <VStack w="full" alignItems="start" spacing={4}>+ <Input name="title" label="Title" />+ <Location+ name="locationId"+ label="Location"+ onChange={onLocationChange}+ />+ <ShiftByLocation+ shifts={shifts}+ initialShift={job.shiftId ?? undefined}+ />+ <Employee name="managerId" label="Manager" />+ <Hidden name="intent" value="job" />+ <Submit size="sm">Save</Submit>+ </VStack>+ </ValidatedForm>+ </Box>+ );+};++const SHIFT_FIELD = "shiftId";++const ShiftByLocation = ({+ shifts,+ initialShift,+}: {+ shifts: { value: string | number; label: string }[];+ initialShift?: string;+}) => {+ const { error, getInputProps } = useField(SHIFT_FIELD);++ const [shift, setShift] = useControlField<{+ value: string | number;+ label: string;+ } | null>(SHIFT_FIELD);++ useEffect(() => {+ // if the initial value is in the options, set it, otherwise set to null+ if (shifts) {+ setShift(shifts.find((s) => s.value === initialShift) ?? null);+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [shifts, initialShift]);++ return (+ <FormControl isInvalid={!!error}>+ <FormLabel htmlFor={SHIFT_FIELD}>Shift</FormLabel>+ <Select+ {...getInputProps({+ // @ts-ignore+ id: SHIFT_FIELD,+ })}+ options={shifts}+ value={shift}+ onChange={setShift}+ // @ts-ignore+ w="full"+ />+ {error && <FormErrorMessage>{error}</FormErrorMessage>}+ </FormControl>+ );+};++export default PersonJob;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonJob/index.ts b/apps/carbon/app/interfaces/Resources/Person/PersonJob/index.tsnew file mode 100644index 0000000000..813374a8ce--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Person/PersonJob/index.ts@@ -0,0 +1,3 @@+import PersonJob from "./PersonJob";++export default PersonJob;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsxindex 34770faacc..1cf7fdc561 100644--- a/apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsx+++ b/apps/carbon/app/interfaces/Resources/Person/PersonNotes/PersonNotes.tsx@@ -1,14 +1,10 @@+import { useColor } from "@carbon/react";import { formatTimeAgo } from "@carbon/utils";import {Box,Button,- Card,- CardBody,- CardFooter,- CardHeader,Flex,Grid,- Heading,HStack,Text,VStack,@@ -18,6 +14,7 @@ import { Fragment } from "react";import { ValidatedForm } from "remix-validated-form";import { Avatar } from "~/components";import { Submit, TextArea } from "~/components/Form";+import { SectionTitle } from "~/components/Layout";import { usePermissions, useUser } from "~/hooks";import type { Note } from "~/interfaces/Resources/types";import { noteValidator } from "~/services/resources";@@ -37,64 +34,69 @@ const PersonNotes = ({ notes }: PersonNoteProps) => {const canUpdate = permissions.can("update", "resources");const canDelete = permissions.can("delete", "resources");+ const borderColor = useColor("gray.200");+return (- <Card w="full">- <CardHeader>- <Heading size="md">Notes</Heading>- </CardHeader>- <CardBody>- {notes.length > 0 ? (- <Grid- gridTemplateColumns="auto 1fr"- gridColumnGap={4}- gridRowGap={8}- w="full"- >- {notes.map((note) => {- if (Array.isArray(note.user)) throw new Error("Invalid user");- return (- <Fragment key={note.id}>- <Avatar path={user.avatarUrl} />- <VStack spacing={1} w="full" alignItems="start">- <Text fontWeight="bold">{note.user?.fullName}</Text>- <Text>{note.note}</Text>- <HStack spacing={4}>- <Text color="gray.500">- {formatTimeAgo(note.createdAt)}- </Text>- {(canDelete || canUpdate) &&- user.id === note.user?.id && (- <Form- method="post"- action={`/x/resources/person/${personId}/notes/delete/${note.id}`}- >- <Button- type="submit"- variant="link"- fontWeight="normal"- size="md"- >- Delete- </Button>- </Form>- )}- </HStack>- </VStack>- </Fragment>- );- })}- </Grid>- ) : (- <Box color="gray.500" p={4} w="full" textAlign="center">- No notes- </Box>- )}- </CardBody>+ <Box w="full">+ <SectionTitle title="Notes" />+ {notes.length > 0 ? (+ <Grid+ gridTemplateColumns="auto 1fr"+ gridColumnGap={4}+ gridRowGap={8}+ w="full"+ >+ {notes.map((note) => {+ if (Array.isArray(note.user)) throw new Error("Invalid user");+ return (+ <Fragment key={note.id}>+ <Avatar path={user.avatarUrl} />+ <VStack spacing={1} w="full" alignItems="start">+ <Text fontWeight="bold">{note.user?.fullName}</Text>+ <Text>{note.note}</Text>+ <HStack spacing={4}>+ <Text color="gray.500">+ {formatTimeAgo(note.createdAt)}+ </Text>+ {(canDelete || canUpdate) && user.id === note.user?.id && (+ <Form+ method="post"+ action={`/x/resources/person/${personId}/notes/delete/${note.id}`}+ >+ <Button+ type="submit"+ variant="link"+ fontWeight="normal"+ size="md"+ >+ Delete+ </Button>+ </Form>+ )}+ </HStack>+ </VStack>+ </Fragment>+ );+ })}+ </Grid>+ ) : (+ <Box color="gray.500" p={4} w="full" textAlign="center">+ No notes+ </Box>+ )}{canCreate && (- <CardFooter>+ <Box+ borderTopColor={borderColor}+ borderTopStyle="solid"+ borderTopWidth={1}+ mt={8}+ pt={8}+ w="full"+ ><ValidatedFormmethod="post"action={`/x/resources/person/${personId}/notes/new`}+ resetAfterSubmitvalidator={noteValidator}><VStack spacing={3} w="full">@@ -107,9 +109,9 @@ const PersonNotes = ({ notes }: PersonNoteProps) => {</Flex></VStack></ValidatedForm>- </CardFooter>+ </Box>)}- </Card>+ </Box>);};diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/PersonOvertime.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/PersonOvertime.tsxnew file mode 100644index 0000000000..327b945f64--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/PersonOvertime.tsx@@ -0,0 +1,20 @@+import { Box, Card, CardBody, CardHeader, Heading } from "@chakra-ui/react";++type PersonOvertimeProps = {};++const PersonOvertime = (props: PersonOvertimeProps) => {+ return (+ <Card w="full">+ <CardHeader>+ <Heading size="md">Overtime</Heading>+ </CardHeader>+ <CardBody>+ <Box color="gray.500" p={4} w="full" textAlign="center">+ No overtime scheduled+ </Box>+ </CardBody>+ </Card>+ );+};++export default PersonOvertime;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/index.ts b/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/index.tsnew file mode 100644index 0000000000..d2cee756d4--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Person/PersonOvertime/index.ts@@ -0,0 +1,3 @@+import PersonOvertime from "./PersonOvertime";++export default PersonOvertime;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/PersonSchedule.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/PersonSchedule.tsxdeleted file mode 100644index 48aa473773..0000000000--- a/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/PersonSchedule.tsx+++ /dev/null@@ -1,14 +0,0 @@-import { Card, CardBody, CardHeader, Heading } from "@chakra-ui/react";--const PersonSchedule = () => {- return (- <Card w="full">- <CardHeader>- <Heading size="md">Schedule</Heading>- </CardHeader>- <CardBody></CardBody>- </Card>- );-};--export default PersonSchedule;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/index.ts b/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/index.tsdeleted file mode 100644index 95c9408f0f..0000000000--- a/apps/carbon/app/interfaces/Resources/Person/PersonSchedule/index.ts+++ /dev/null@@ -1,3 +0,0 @@-import PersonSchedule from "./PersonSchedule";--export default PersonSchedule;diff --git a/apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsx b/apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsxindex f5e8cfd813..dbb2ef8bab 100644--- a/apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsx+++ b/apps/carbon/app/interfaces/Resources/Person/PersonTabs/PersonTabs.tsx@@ -6,28 +6,90 @@ import {TabList,TabPanel,TabPanels,+ Box,+ Icon,+ VStack,} from "@chakra-ui/react";+import { BiLockAlt } from "react-icons/bi";+import { SectionTitle } from "~/components/Layout";+import { ProfileForm } from "~/interfaces/Account/Profile";+import type {+ PublicAttributes,+ PrivateAttributes,+} from "~/interfaces/Account/types";+import { UserAttributesForm } from "~/interfaces/Account/UserAttributes";+import type { User } from "~/interfaces/Users/types";+import { PersonJob, PersonNotes } from "~/interfaces/Resources/Person";+import type { EmployeeJob, Note } from "~/interfaces/Resources/types";-const PersonsTabs = () => {+type PersonTabsProps = {+ user: User;+ job: EmployeeJob;+ publicAttributes: PublicAttributes[];+ privateAttributes: PrivateAttributes[];+ notes: Note[];+};++const PersonsTabs = ({+ user,+ job,+ publicAttributes,+ privateAttributes,+ notes,+}: PersonTabsProps) => {return (<Card w="full"><CardBody><Tabs colorScheme="gray"><TabList><Tab>Profile</Tab>- <Tab>Attributes</Tab><Tab>Job</Tab>+ <Tab>Public</Tab>+ <Tab>+ <Icon as={BiLockAlt} h={4} w={4} mr={2} /> Private+ </Tab>+ <Tab>+ <Icon as={BiLockAlt} h={4} w={4} mr={2} /> Notes+ </Tab></TabList><TabPanels><TabPanel>- <p>Profile</p>+ <ProfileForm user={user} />+ </TabPanel>+ <TabPanel>+ <PersonJob job={job} />+ </TabPanel>+ <TabPanel>+ {publicAttributes.length ? (+ publicAttributes.map((category: PublicAttributes) => (+ <Box key={category.id} mb={8} w="full">+ <SectionTitle title={category.name} />+ <UserAttributesForm attributeCategory={category} />+ </Box>+ ))+ ) : (+ <Box color="gray.500" p={4} w="full" textAlign="center">+ No public attributes+ </Box>+ )}</TabPanel><TabPanel>- <p>Personal attributes</p>+ {privateAttributes.length ? (+ privateAttributes.map((category: PrivateAttributes) => (+ <Box key={category.id} mb={8} w="full">+ <SectionTitle title={category.name} />+ <UserAttributesForm attributeCategory={category} />+ </Box>+ ))+ ) : (+ <Box color="gray.500" p={4} w="full" textAlign="center">+ No private attributes+ </Box>+ )}</TabPanel><TabPanel>- <p>Work center and shift</p>+ <PersonNotes notes={notes} /></TabPanel></TabPanels></Tabs>diff --git a/apps/carbon/app/interfaces/Resources/Person/index.ts b/apps/carbon/app/interfaces/Resources/Person/index.tsindex e8a053187a..607a4e6de9 100644--- a/apps/carbon/app/interfaces/Resources/Person/index.ts+++ b/apps/carbon/app/interfaces/Resources/Person/index.ts@@ -1,13 +1,17 @@import PersonAbilities from "./PersonAbilities";+import PersonDaysOff from "./PersonDaysOff";import PersonHeader from "./PersonHeader";+import PersonJob from "./PersonJob";import PersonNotes from "./PersonNotes";+import PersonOvertime from "./PersonOvertime";import PersonTabs from "./PersonTabs";-import PersonSchedule from "./PersonSchedule";export {PersonAbilities,+ PersonDaysOff,PersonHeader,+ PersonJob,PersonNotes,+ PersonOvertime,PersonTabs,- PersonSchedule,};diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/ShiftForm.tsx b/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/ShiftForm.tsxnew file mode 100644index 0000000000..760704b47e--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/ShiftForm.tsx@@ -0,0 +1,115 @@+import {+ Button,+ Checkbox as ChakraCheckbox,+ CheckboxGroup,+ Drawer,+ DrawerBody,+ DrawerCloseButton,+ DrawerContent,+ DrawerFooter,+ DrawerHeader,+ DrawerOverlay,+ FormControl,+ FormLabel,+ HStack,+ Stack,+ VStack,+} from "@chakra-ui/react";+import { useNavigate } from "@remix-run/react";+import { useControlField, useField, ValidatedForm } from "remix-validated-form";+import {+ Boolean,+ Hidden,+ Input,+ Location,+ Submit,+ TimePicker,+} from "~/components/Form";+import { usePermissions } from "~/hooks";+import { shiftValidator } from "~/services/resources";++type ShiftFormProps = {+ initialValues: {+ id?: string;+ name: string;+ startTime?: string;+ endTime?: string;+ locationId?: string;+ monday?: boolean;+ tuesday?: boolean;+ wednesday?: boolean;+ thursday?: boolean;+ friday?: boolean;+ saturday?: boolean;+ sunday?: boolean;+ };+};++const ShiftForm = ({ initialValues }: ShiftFormProps) => {+ const permissions = usePermissions();+ const navigate = useNavigate();+ const onClose = () => navigate(-1);++ const isEditing = initialValues.id !== undefined;+ const isDisabled = isEditing+ ? !permissions.can("update", "resources")+ : !permissions.can("create", "resources");++ return (+ <Drawer onClose={onClose} isOpen={true} size="sm">+ <ValidatedForm+ validator={shiftValidator}+ method="post"+ action={+ isEditing+ ? `/x/resources/shifts/${initialValues.id}`+ : "/x/resources/shifts/new"+ }+ defaultValues={initialValues}+ >+ <DrawerOverlay />+ <DrawerContent>+ <DrawerCloseButton />+ <DrawerHeader>{isEditing ? "Edit" : "New"} Shift</DrawerHeader>+ <DrawerBody pb={8}>+ <Hidden name="id" />+ <VStack spacing={4} alignItems="start">+ <Input name="name" label="Shift Name" />+ <Location name="locationId" label="Location" />+ <TimePicker name="startTime" label="Start Time" />+ <TimePicker name="endTime" label="End Time" />++ <FormControl>+ <FormLabel>Days</FormLabel>+ <VStack w="full" alignItems="start">+ <Boolean name="monday" description="Monday" />+ <Boolean name="tuesday" description="Tuesday" />+ <Boolean name="wednesday" description="Wednesday" />+ <Boolean name="thursday" description="Thursday" />+ <Boolean name="friday" description="Friday" />+ <Boolean name="saturday" description="Saturday" />+ <Boolean name="sunday" description="Sunday" />+ </VStack>+ </FormControl>+ </VStack>+ </DrawerBody>+ <DrawerFooter>+ <HStack spacing={2}>+ <Submit isDisabled={isDisabled}>Save</Submit>+ <Button+ size="md"+ colorScheme="gray"+ variant="solid"+ onClick={onClose}+ >+ Cancel+ </Button>+ </HStack>+ </DrawerFooter>+ </DrawerContent>+ </ValidatedForm>+ </Drawer>+ );+};++export default ShiftForm;diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/index.ts b/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/index.tsnew file mode 100644index 0000000000..0355f4858a--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/ShiftForm/index.ts@@ -0,0 +1,3 @@+import ShiftForm from "./ShiftForm";++export default ShiftForm;diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/ShiftsTable.tsx b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/ShiftsTable.tsxnew file mode 100644index 0000000000..9992c3d8c1--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/ShiftsTable.tsx@@ -0,0 +1,173 @@+import { ActionMenu } from "@carbon/react";+import {+ AvatarGroup,+ Badge,+ Flex,+ MenuItem,+ VisuallyHidden,+} from "@chakra-ui/react";+import { useNavigate } from "@remix-run/react";+import type { ColumnDef } from "@tanstack/react-table";+import { memo, useMemo } from "react";+import { BsPencilSquare } from "react-icons/bs";+import { IoMdTrash } from "react-icons/io";+import { Avatar } from "~/components";+import { Table } from "~/components";+import { usePermissions } from "~/hooks";+import type { Shift } from "~/interfaces/Resources/types";++type ShiftsTableProps = {+ data: Shift[];+ count: number;+};++const ShiftsTable = memo(({ data, count }: ShiftsTableProps) => {+ const navigate = useNavigate();+ const permissions = usePermissions();++ const rows = data.map((row) => ({+ id: row.id,+ name: row.name,+ startTime: row.startTime,+ endTime: row.endTime,+ monday: row.monday,+ tuesday: row.tuesday,+ wednesday: row.wednesday,+ thursday: row.thursday,+ friday: row.friday,+ saturday: row.saturday,+ sunday: row.sunday,+ location: {+ name: Array.isArray(row.location)+ ? row.location[0].name+ : row.location?.name,+ },+ // TODO: extract this to a utils function - also used by AblitiesTable+ employees: Array.isArray(row.employeeShift)+ ? row.employeeShift.reduce<{ name: string; avatarUrl: string | null }[]>(+ (acc, curr) => {+ if (curr.user) {+ if (Array.isArray(curr.user)) {+ curr.user.forEach((user) => {+ acc.push({+ name: user.fullName ?? "",+ avatarUrl: user.avatarUrl,+ });+ });+ } else {+ acc.push({+ name: curr.user.fullName ?? "",+ avatarUrl: curr.user.avatarUrl,+ });+ }+ }+ return acc;+ },+ []+ )+ : row.employeeShift?.user && Array.isArray(row.employeeShift?.user)+ ? row.employeeShift.user.map((user) => ({+ name: user.fullName ?? "",+ avatarUrl: user.avatarUrl,+ }))+ : [],+ }));++ const columns = useMemo<ColumnDef<typeof rows[number]>[]>(() => {+ return [+ {+ accessorKey: "name",+ header: "Shift",+ cell: (item) => item.getValue(),+ },+ {+ header: "Employees",+ // accessorKey: undefined, // makes the column unsortable+ cell: ({ row }) => (+ <AvatarGroup max={5} size="sm" spacing={-2}>+ {row.original.employees.map((employee, index: number) => (+ <Avatar+ key={index}+ name={employee.name ?? undefined}+ title={employee.name ?? undefined}+ path={employee.avatarUrl}+ />+ ))}+ </AvatarGroup>+ ),+ },+ {+ accessorKey: "startTime",+ header: "Start Time",+ cell: (item) => item.getValue(),+ },+ {+ accessorKey: "endTime",+ header: "End Time",+ cell: (item) => item.getValue(),+ },+ {+ accessorKey: "location.name",+ header: "Location",+ cell: (item) => item.getValue(),+ },+ {+ header: "Days",+ cell: ({ row }) => renderDays(row.original),+ },+ {+ accessorKey: "id",+ header: () => <VisuallyHidden>Actions</VisuallyHidden>,+ cell: ({ row }) => (+ <Flex justifyContent="end">+ <ActionMenu>+ <MenuItem+ icon={<BsPencilSquare />}+ onClick={() => {+ navigate(`/x/resources/shifts/${row.original.id}`);+ }}+ >+ Edit Shift+ </MenuItem>+ <MenuItem+ isDisabled={!permissions.can("delete", "resources")}+ icon={<IoMdTrash />}+ onClick={() => {+ navigate(`/x/resources/shifts/delete/${row.original.id}`);+ }}+ >+ Delete Shift+ </MenuItem>+ </ActionMenu>+ </Flex>+ ),+ },+ ];+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [navigate, permissions]);++ const renderDays = (row: typeof rows[number]) => {+ const days = [+ row.monday && "M",+ row.tuesday && "Tu",+ row.wednesday && "W",+ row.thursday && "Th",+ row.friday && "F",+ row.saturday && "Sa",+ row.sunday && "Su",+ ].filter(Boolean);++ return days.map((day) => (+ <Badge key={day as string} mr={0.5}>+ {day}+ </Badge>+ ));+ };++ return (+ <Table<typeof rows[number]> data={rows} count={count} columns={columns} />+ );+});++ShiftsTable.displayName = "ShiftsTable";+export default ShiftsTable;diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/index.ts b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/index.tsnew file mode 100644index 0000000000..ad11d6ab3d--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTable/index.ts@@ -0,0 +1,3 @@+import ShiftsTable from "./ShiftsTable";++export default ShiftsTable;diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsxnew file mode 100644index 0000000000..bcbd90cf02--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/ShiftsTableFilters.tsx@@ -0,0 +1,72 @@+import { Select, useColor } from "@carbon/react";+import { Button, HStack } from "@chakra-ui/react";+import { Link } from "@remix-run/react";+import { IoMdAdd } from "react-icons/io";+import { DebouncedInput } from "~/components/Search";+import { usePermissions, useUrlParams } from "~/hooks";+import type { ShiftLocation } from "~/interfaces/Resources/types";+import { mapRowsToOptions } from "~/utils/form";++type ShiftsTableFiltersProps = {+ locations: Partial<ShiftLocation>[];+};++const ShiftsTableFilters = ({ locations }: ShiftsTableFiltersProps) => {+ const [params, setParams] = useUrlParams();+ const permissions = usePermissions();+ const borderColor = useColor("gray.200");+ const locationOptions = mapRowsToOptions({+ data: locations,+ value: "id",+ label: "name",+ });+ return (+ <HStack+ borderBottomColor={borderColor}+ borderBottomStyle="solid"+ borderBottomWidth={1}+ justifyContent="space-between"+ px={4}+ py={3}+ w="full"+ >+ <HStack spacing={2}>+ <DebouncedInput+ param="name"+ size="sm"+ minW={180}+ placeholder="Search by name"+ />+ <Select+ // @ts-ignore+ size="sm"+ value={locationOptions.filter(+ (type) => type.value === params.get("location")+ )}+ isClearable+ options={locationOptions}+ onChange={(selected) => {+ setParams({ location: selected?.value });+ }}+ aria-label="Location"+ minW={180}+ placeholder="Location"+ />+ </HStack>+ <HStack spacing={2}>+ {permissions.can("create", "resources") && (+ <Button+ as={Link}+ to={`new?${params.toString()}`}+ colorScheme="brand"+ leftIcon={<IoMdAdd />}+ >+ New Shift+ </Button>+ )}+ </HStack>+ </HStack>+ );+};++export default ShiftsTableFilters;diff --git a/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/index.ts b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/index.tsnew file mode 100644index 0000000000..58685e9ad8--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/ShiftsTableFilters/index.ts@@ -0,0 +1,3 @@+import ShiftsTableFilters from "./ShiftsTableFilters";++export default ShiftsTableFilters;diff --git a/apps/carbon/app/interfaces/Resources/Shifts/index.ts b/apps/carbon/app/interfaces/Resources/Shifts/index.tsnew file mode 100644index 0000000000..f5af231872--- /dev/null+++ b/apps/carbon/app/interfaces/Resources/Shifts/index.ts@@ -0,0 +1,5 @@+import ShiftsTable from "./ShiftsTable";+import ShiftsTableFilters from "./ShiftsTableFilters";+import ShiftForm from "./ShiftForm";++export { ShiftsTable, ShiftsTableFilters, ShiftForm };diff --git a/apps/carbon/app/interfaces/Resources/types.ts b/apps/carbon/app/interfaces/Resources/types.tsindex 3d49c6aa16..2f236286bb 100644--- a/apps/carbon/app/interfaces/Resources/types.ts+++ b/apps/carbon/app/interfaces/Resources/types.ts@@ -6,6 +6,10 @@ import type {getNotes,getAbility,getAbilities,+ getEmployeeAbilities,+ getShifts,+ getLocations,+ getEmployeeJob,} from "~/services/resources";export type Ability = NonNullable<@@ -31,6 +35,19 @@ export enum AbilityEmployeeStatus {Complete = "Complete",}+export function getTrainingStatus(+ employeeAbility: {+ lastTrainingDate: string | null;+ trainingDays: number;+ trainingCompleted: boolean | null;+ } | null+) {+ if (!employeeAbility) return undefined;+ if (employeeAbility.trainingCompleted) return AbilityEmployeeStatus.Complete;+ if (employeeAbility.trainingDays > 0) return AbilityEmployeeStatus.InProgress;+ return AbilityEmployeeStatus.NotStarted;+}+export type Attribute = NonNullable<Awaited<ReturnType<typeof getAttribute>>["data"]>;@@ -53,6 +70,14 @@ export type AttributeDataType = {isText: boolean;};+export type EmployeeAbility = NonNullable<+ Awaited<ReturnType<typeof getEmployeeAbilities>>["data"]+>[number];++export type EmployeeJob = NonNullable<+ Awaited<ReturnType<typeof getEmployeeJob>>["data"]+>;+export type Note = NonNullable<Awaited<ReturnType<typeof getNotes>>["data"]>[number];@@ -60,3 +85,11 @@ export type Note = NonNullable<export type Person = NonNullable<Awaited<ReturnType<typeof getPeople>>["data"]>[number];++export type Shift = NonNullable<+ Awaited<ReturnType<typeof getShifts>>["data"]+>[number];++export type ShiftLocation = NonNullable<+ Awaited<ReturnType<typeof getLocations>>["data"]+>[number];diff --git a/apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsx b/apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsxindex 5178979a8f..d04f867649 100644--- a/apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsx+++ b/apps/carbon/app/interfaces/Resources/useResourcesSidebar.tsx@@ -31,7 +31,7 @@ const resourcesRoutes: RouteGroup[] = [],},{- name: "Configuration",+ name: "People",routes: [{name: "Abilities",@@ -41,10 +41,36 @@ const resourcesRoutes: RouteGroup[] = [name: "Attributes",to: "/x/resources/attributes",},+ {+ name: "Holidays",+ to: "/x/resources/holidays",+ },{name: "Shifts",to: "/x/resources/shifts",},+ ],+ },+ {+ name: "Equipment",+ routes: [+ {+ name: "Eqiupment Types",+ to: "/x/resources/equipment-types",+ },+ {+ name: "Maintenance",+ to: "/x/resources/maintenance",+ },+ ],+ },+ {+ name: "Locations",+ routes: [+ {+ name: "Locations",+ to: "/x/resources/locations",+ },{name: "Work Centers",to: "/x/resources/work-centers",diff --git a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx b/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsxindex 7bbc23db16..1078c60b19 100644--- a/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx+++ b/apps/carbon/app/interfaces/Users/Customers/CustomerAccountsTable/CustomerAccountsTable.tsx@@ -6,7 +6,6 @@ import {VisuallyHidden,useDisclosure,} from "@chakra-ui/react";-import { useNavigate } from "@remix-run/react";import type { ColumnDef } from "@tanstack/react-table";import { memo, useMemo, useState } from "react";import { BsEnvelope } from "react-icons/bs";diff --git a/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsx b/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsxindex 1b8459ca17..ea96a679ae 100644--- a/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsx+++ b/apps/carbon/app/interfaces/Users/Employees/EmployeesTable/EmployeesTable.tsx@@ -44,7 +44,7 @@ const EmployeesTable = memo(const rows = useMemo(() =>data.map((d) => {- // we should only have one user and employee per employee id+ // we should have one user and employee per employee idif (d.user === null ||d.employeeType === null ||diff --git a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx b/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsxindex 34fde2b8b5..04026582ff 100644--- a/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx+++ b/apps/carbon/app/interfaces/Users/Suppliers/SupplierAccountsTable/SuppliersAccountsTable.tsx@@ -6,7 +6,6 @@ import {useDisclosure,VisuallyHidden,} from "@chakra-ui/react";-import { useNavigate } from "@remix-run/react";import type { ColumnDef } from "@tanstack/react-table";import { memo, useMemo, useState } from "react";import { BsEnvelope } from "react-icons/bs";diff --git a/apps/carbon/app/lib/timezones.ts b/apps/carbon/app/lib/timezones.tsnew file mode 100644index 0000000000..b65bd8dc9e--- /dev/null+++ b/apps/carbon/app/lib/timezones.ts@@ -0,0 +1,2902 @@+import type { OptionBase, GroupBase } from "@carbon/react";++export interface TimeZoneSelection extends OptionBase {+ label: string;+ value: string;+}++export const timezonesGroupedByCountry: GroupBase<TimeZoneSelection>[] = [+ {+ label: "Afghanistan",+ options: [+ {+ value: "Asia/Kabul",+ label: "Kabul",+ },+ ],+ },+ {+ label: "Albania",+ options: [+ {+ value: "Europe/Tirane",+ label: "Tirane",+ },+ ],+ },+ {+ label: "Algeria",+ options: [+ {+ value: "Africa/Algiers",+ label: "Algiers",+ },+ ],+ },+ {+ label: "Andorra",+ options: [+ {+ value: "Europe/Andorra",+ label: "Andorra",+ },+ ],+ },+ {+ label: "Angola",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Anguilla",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Antarctica",+ options: [+ {+ value: "Pacific/Auckland",+ label: "Auckland",+ },+ {+ value: "Antarctica/Davis",+ label: "Davis",+ },+ {+ value: "Antarctica/DumontDUrville",+ label: "DumontDUrville",+ },+ {+ value: "Antarctica/Mawson",+ label: "Mawson",+ },+ {+ value: "Antarctica/Palmer",+ label: "Palmer",+ },+ {+ value: "Antarctica/Rothera",+ label: "Rothera",+ },+ {+ value: "Antarctica/Syowa",+ label: "Syowa",+ },+ {+ value: "Antarctica/Troll",+ label: "Troll",+ },+ {+ value: "Antarctica/Vostok",+ label: "Vostok",+ },+ ],+ },+ {+ label: "Antigua & Barbuda",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Argentina",+ options: [+ {+ value: "America/Argentina/Buenos_Aires",+ label: "Buenos Aires",+ },+ {+ value: "America/Argentina/Catamarca",+ label: "Catamarca",+ },+ {+ value: "America/Argentina/Cordoba",+ label: "Cordoba",+ },+ {+ value: "America/Argentina/Jujuy",+ label: "Jujuy",+ },+ {+ value: "America/Argentina/La_Rioja",+ label: "La Rioja",+ },+ {+ value: "America/Argentina/Mendoza",+ label: "Mendoza",+ },+ {+ value: "America/Argentina/Rio_Gallegos",+ label: "Rio Gallegos",+ },+ {+ value: "America/Argentina/Salta",+ label: "Salta",+ },+ {+ value: "America/Argentina/San_Juan",+ label: "San Juan",+ },+ {+ value: "America/Argentina/San_Luis",+ label: "San Luis",+ },+ {+ value: "America/Argentina/Tucuman",+ label: "Tucuman",+ },+ {+ value: "America/Argentina/Ushuaia",+ label: "Ushuaia",+ },+ ],+ },+ {+ label: "Armenia",+ options: [+ {+ value: "Asia/Yerevan",+ label: "Yerevan",+ },+ ],+ },+ {+ label: "Aruba",+ options: [+ {+ value: "America/Curacao",+ label: "Curacao",+ },+ ],+ },+ {+ label: "Australia",+ options: [+ {+ value: "Australia/Adelaide",+ label: "Adelaide",+ },+ {+ value: "Australia/Brisbane",+ label: "Brisbane",+ },+ {+ value: "Australia/Broken_Hill",+ label: "Broken Hill",+ },+ {+ value: "Australia/Currie",+ label: "Currie",+ },+ {+ value: "Australia/Darwin",+ label: "Darwin",+ },+ {+ value: "Australia/Eucla",+ label: "Eucla",+ },+ {+ value: "Australia/Hobart",+ label: "Hobart",+ },+ {+ value: "Australia/Lindeman",+ label: "Lindeman",+ },+ {+ value: "Australia/Lord_Howe",+ label: "Lord Howe",+ },+ {+ value: "Antarctica/Macquarie",+ label: "Macquarie",+ },+ {+ value: "Australia/Melbourne",+ label: "Melbourne",+ },+ {+ value: "Australia/Perth",+ label: "Perth",+ },+ {+ value: "Australia/Sydney",+ label: "Sydney",+ },+ ],+ },+ {+ label: "Austria",+ options: [+ {+ value: "Europe/Vienna",+ label: "Vienna",+ },+ ],+ },+ {+ label: "Azerbaijan",+ options: [+ {+ value: "Asia/Baku",+ label: "Baku",+ },+ ],+ },+ {+ label: "Bahamas",+ options: [+ {+ value: "America/Nassau",+ label: "Nassau",+ },+ ],+ },+ {+ label: "Bahrain",+ options: [+ {+ value: "Asia/Qatar",+ label: "Qatar",+ },+ ],+ },+ {+ label: "Bangladesh",+ options: [+ {+ value: "Asia/Dhaka",+ label: "Dhaka",+ },+ ],+ },+ {+ label: "Barbados",+ options: [+ {+ value: "America/Barbados",+ label: "Barbados",+ },+ ],+ },+ {+ label: "Belarus",+ options: [+ {+ value: "Europe/Minsk",+ label: "Minsk",+ },+ ],+ },+ {+ label: "Belgium",+ options: [+ {+ value: "Europe/Brussels",+ label: "Brussels",+ },+ ],+ },+ {+ label: "Belize",+ options: [+ {+ value: "America/Belize",+ label: "Belize",+ },+ ],+ },+ {+ label: "Benin",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Bermuda",+ options: [+ {+ value: "Atlantic/Bermuda",+ label: "Bermuda",+ },+ ],+ },+ {+ label: "Bhutan",+ options: [+ {+ value: "Asia/Thimphu",+ label: "Thimphu",+ },+ ],+ },+ {+ label: "Bolivia",+ options: [+ {+ value: "America/La_Paz",+ label: "La Paz",+ },+ ],+ },+ {+ label: "Bosnia & Herzegovina",+ options: [+ {+ value: "Europe/Belgrade",+ label: "Belgrade",+ },+ ],+ },+ {+ label: "Botswana",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Brazil",+ options: [+ {+ value: "America/Araguaina",+ label: "Araguaina",+ },+ {+ value: "America/Bahia",+ label: "Bahia",+ },+ {+ value: "America/Belem",+ label: "Belem",+ },+ {+ value: "America/Boa_Vista",+ label: "Boa Vista",+ },+ {+ value: "America/Campo_Grande",+ label: "Campo Grande",+ },+ {+ value: "America/Cuiaba",+ label: "Cuiaba",+ },+ {+ value: "America/Eirunepe",+ label: "Eirunepe",+ },+ {+ value: "America/Fortaleza",+ label: "Fortaleza",+ },+ {+ value: "America/Maceio",+ label: "Maceio",+ },+ {+ value: "America/Manaus",+ label: "Manaus",+ },+ {+ value: "America/Noronha",+ label: "Noronha",+ },+ {+ value: "America/Porto_Velho",+ label: "Porto Velho",+ },+ {+ value: "America/Recife",+ label: "Recife",+ },+ {+ value: "America/Rio_Branco",+ label: "Rio Branco",+ },+ {+ value: "America/Santarem",+ label: "Santarem",+ },+ {+ value: "America/Sao_Paulo",+ label: "Sao Paulo",+ },+ ],+ },+ {+ label: "Britain (UK)",+ options: [+ {+ value: "Europe/London",+ label: "London",+ },+ ],+ },+ {+ label: "British Indian Ocean Territory",+ options: [+ {+ value: "Indian/Chagos",+ label: "Chagos",+ },+ ],+ },+ {+ label: "Brunei",+ options: [+ {+ value: "Asia/Brunei",+ label: "Brunei",+ },+ ],+ },+ {+ label: "Bulgaria",+ options: [+ {+ value: "Europe/Sofia",+ label: "Sofia",+ },+ ],+ },+ {+ label: "Burkina Faso",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Burundi",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Cambodia",+ options: [+ {+ value: "Asia/Bangkok",+ label: "Bangkok",+ },+ ],+ },+ {+ label: "Cameroon",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Canada",+ options: [+ {+ value: "America/Atikokan",+ label: "Atikokan",+ },+ {+ value: "America/Blanc-Sablon",+ label: "Blanc-Sablon",+ },+ {+ value: "America/Cambridge_Bay",+ label: "Cambridge Bay",+ },+ {+ value: "America/Creston",+ label: "Creston",+ },+ {+ value: "America/Dawson",+ label: "Dawson",+ },+ {+ value: "America/Dawson_Creek",+ label: "Dawson Creek",+ },+ {+ value: "America/Edmonton",+ label: "Edmonton",+ },+ {+ value: "America/Glace_Bay",+ label: "Glace Bay",+ },+ {+ value: "America/Goose_Bay",+ label: "Goose Bay",+ },+ {+ value: "America/Halifax",+ label: "Halifax",+ },+ {+ value: "America/Inuvik",+ label: "Inuvik",+ },+ {+ value: "America/Iqaluit",+ label: "Iqaluit",+ },+ {+ value: "America/Moncton",+ label: "Moncton",+ },+ {+ value: "America/Nipigon",+ label: "Nipigon",+ },+ {+ value: "America/Pangnirtung",+ label: "Pangnirtung",+ },+ {+ value: "America/Rainy_River",+ label: "Rainy River",+ },+ {+ value: "America/Rankin_Inlet",+ label: "Rankin Inlet",+ },+ {+ value: "America/Regina",+ label: "Regina",+ },+ {+ value: "America/Resolute",+ label: "Resolute",+ },+ {+ value: "America/St_Johns",+ label: "St Johns",+ },+ {+ value: "America/Swift_Current",+ label: "Swift Current",+ },+ {+ value: "America/Thunder_Bay",+ label: "Thunder Bay",+ },+ {+ value: "America/Toronto",+ label: "Toronto",+ },+ {+ value: "America/Vancouver",+ label: "Vancouver",+ },+ {+ value: "America/Whitehorse",+ label: "Whitehorse",+ },+ {+ value: "America/Winnipeg",+ label: "Winnipeg",+ },+ {+ value: "America/Yellowknife",+ label: "Yellowknife",+ },+ ],+ },+ {+ label: "Cape Verde",+ options: [+ {+ value: "Atlantic/Cape_Verde",+ label: "Cape Verde",+ },+ ],+ },+ {+ label: "Caribbean NL",+ options: [+ {+ value: "America/Curacao",+ label: "Curacao",+ },+ ],+ },+ {+ label: "Cayman Islands",+ options: [+ {+ value: "America/Panama",+ label: "Panama",+ },+ ],+ },+ {+ label: "Central African Rep.",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Chad",+ options: [+ {+ value: "Africa/Ndjamena",+ label: "Ndjamena",+ },+ ],+ },+ {+ label: "Chile",+ options: [+ {+ value: "Pacific/Easter",+ label: "Easter",+ },+ {+ value: "America/Santiago",+ label: "Santiago",+ },+ ],+ },+ {+ label: "China",+ options: [+ {+ value: "Asia/Shanghai",+ label: "Shanghai",+ },+ {+ value: "Asia/Urumqi",+ label: "Urumqi",+ },+ ],+ },+ {+ label: "Christmas Island",+ options: [+ {+ value: "Indian/Christmas",+ label: "Christmas",+ },+ ],+ },+ {+ label: "Cocos (Keeling) Islands",+ options: [+ {+ value: "Indian/Cocos",+ label: "Cocos",+ },+ ],+ },+ {+ label: "Colombia",+ options: [+ {+ value: "America/Bogota",+ label: "Bogota",+ },+ ],+ },+ {+ label: "Comoros",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Congo (Dem. Rep.)",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Congo (Rep.)",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Cook Islands",+ options: [+ {+ value: "Pacific/Rarotonga",+ label: "Rarotonga",+ },+ ],+ },+ {+ label: "Costa Rica",+ options: [+ {+ value: "America/Costa_Rica",+ label: "Costa Rica",+ },+ ],+ },+ {+ label: "Croatia",+ options: [+ {+ value: "Europe/Belgrade",+ label: "Belgrade",+ },+ ],+ },+ {+ label: "Cuba",+ options: [+ {+ value: "America/Havana",+ label: "Havana",+ },+ ],+ },+ {+ label: "Curaçao",+ options: [+ {+ value: "America/Curacao",+ label: "Curacao",+ },+ ],+ },+ {+ label: "Cyprus",+ options: [+ {+ value: "Asia/Nicosia",+ label: "Nicosia",+ },+ ],+ },+ {+ label: "Czech Republic",+ options: [+ {+ value: "Europe/Prague",+ label: "Prague",+ },+ ],+ },+ {+ label: "Côte d'Ivoire",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Denmark",+ options: [+ {+ value: "Europe/Copenhagen",+ label: "Copenhagen",+ },+ ],+ },+ {+ label: "Djibouti",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Dominica",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Dominican Republic",+ options: [+ {+ value: "America/Santo_Domingo",+ label: "Santo Domingo",+ },+ ],+ },+ {+ label: "East Timor",+ options: [+ {+ value: "Asia/Dili",+ label: "Dili",+ },+ ],+ },+ {+ label: "Ecuador",+ options: [+ {+ value: "Pacific/Galapagos",+ label: "Galapagos",+ },+ {+ value: "America/Guayaquil",+ label: "Guayaquil",+ },+ ],+ },+ {+ label: "Egypt",+ options: [+ {+ value: "Africa/Cairo",+ label: "Cairo",+ },+ ],+ },+ {+ label: "El Salvador",+ options: [+ {+ value: "America/El_Salvador",+ label: "El Salvador",+ },+ ],+ },+ {+ label: "Equatorial Guinea",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Eritrea",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Estonia",+ options: [+ {+ value: "Europe/Tallinn",+ label: "Tallinn",+ },+ ],+ },+ {+ label: "Ethiopia",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Falkland Islands",+ options: [+ {+ value: "Atlantic/Stanley",+ label: "Stanley",+ },+ ],+ },+ {+ label: "Faroe Islands",+ options: [+ {+ value: "Atlantic/Faroe",+ label: "Faroe",+ },+ ],+ },+ {+ label: "Fiji",+ options: [+ {+ value: "Pacific/Fiji",+ label: "Fiji",+ },+ ],+ },+ {+ label: "Finland",+ options: [+ {+ value: "Europe/Helsinki",+ label: "Helsinki",+ },+ ],+ },+ {+ label: "France",+ options: [+ {+ value: "Europe/Paris",+ label: "Paris",+ },+ ],+ },+ {+ label: "French Guiana",+ options: [+ {+ value: "America/Cayenne",+ label: "Cayenne",+ },+ ],+ },+ {+ label: "French Polynesia",+ options: [+ {+ value: "Pacific/Gambier",+ label: "Gambier",+ },+ {+ value: "Pacific/Marquesas",+ label: "Marquesas",+ },+ {+ value: "Pacific/Tahiti",+ label: "Tahiti",+ },+ ],+ },+ {+ label: "French Southern & Antarctic Lands",+ options: [+ {+ value: "Indian/Kerguelen",+ label: "Kerguelen",+ },+ {+ value: "Indian/Reunion",+ label: "Reunion",+ },+ ],+ },+ {+ label: "Gabon",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Gambia",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Georgia",+ options: [+ {+ value: "Asia/Tbilisi",+ label: "Tbilisi",+ },+ ],+ },+ {+ label: "Germany",+ options: [+ {+ value: "Europe/Berlin",+ label: "Berlin",+ },+ {+ value: "Europe/Zurich",+ label: "Zurich",+ },+ ],+ },+ {+ label: "Ghana",+ options: [+ {+ value: "Africa/Accra",+ label: "Accra",+ },+ ],+ },+ {+ label: "Gibraltar",+ options: [+ {+ value: "Europe/Gibraltar",+ label: "Gibraltar",+ },+ ],+ },+ {+ label: "Greece",+ options: [+ {+ value: "Europe/Athens",+ label: "Athens",+ },+ ],+ },+ {+ label: "Greenland",+ options: [+ {+ value: "America/Danmarkshavn",+ label: "Danmarkshavn",+ },+ {+ value: "America/Godthab",+ label: "Godthab",+ },+ {+ value: "America/Scoresbysund",+ label: "Scoresbysund",+ },+ {+ value: "America/Thule",+ label: "Thule",+ },+ ],+ },+ {+ label: "Grenada",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Guadeloupe",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Guam",+ options: [+ {+ value: "Pacific/Guam",+ label: "Guam",+ },+ ],+ },+ {+ label: "Guatemala",+ options: [+ {+ value: "America/Guatemala",+ label: "Guatemala",+ },+ ],+ },+ {+ label: "Guernsey",+ options: [+ {+ value: "Europe/London",+ label: "London",+ },+ ],+ },+ {+ label: "Guinea",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Guinea-Bissau",+ options: [+ {+ value: "Africa/Bissau",+ label: "Bissau",+ },+ ],+ },+ {+ label: "Guyana",+ options: [+ {+ value: "America/Guyana",+ label: "Guyana",+ },+ ],+ },+ {+ label: "Haiti",+ options: [+ {+ value: "America/Port-au-Prince",+ label: "Port-au-Prince",+ },+ ],+ },+ {+ label: "Honduras",+ options: [+ {+ value: "America/Tegucigalpa",+ label: "Tegucigalpa",+ },+ ],+ },+ {+ label: "Hong Kong",+ options: [+ {+ value: "Asia/Hong_Kong",+ label: "Hong Kong",+ },+ ],+ },+ {+ label: "Hungary",+ options: [+ {+ value: "Europe/Budapest",+ label: "Budapest",+ },+ ],+ },+ {+ label: "Iceland",+ options: [+ {+ value: "Atlantic/Reykjavik",+ label: "Reykjavik",+ },+ ],+ },+ {+ label: "India",+ options: [+ {+ value: "Asia/Kolkata",+ label: "Kolkata",+ },+ ],+ },+ {+ label: "Indonesia",+ options: [+ {+ value: "Asia/Jakarta",+ label: "Jakarta",+ },+ {+ value: "Asia/Jayapura",+ label: "Jayapura",+ },+ {+ value: "Asia/Makassar",+ label: "Makassar",+ },+ {+ value: "Asia/Pontianak",+ label: "Pontianak",+ },+ ],+ },+ {+ label: "Iran",+ options: [+ {+ value: "Asia/Tehran",+ label: "Tehran",+ },+ ],+ },+ {+ label: "Iraq",+ options: [+ {+ value: "Asia/Baghdad",+ label: "Baghdad",+ },+ ],+ },+ {+ label: "Ireland",+ options: [+ {+ value: "Europe/Dublin",+ label: "Dublin",+ },+ ],+ },+ {+ label: "Isle of Man",+ options: [+ {+ value: "Europe/London",+ label: "London",+ },+ ],+ },+ {+ label: "Israel",+ options: [+ {+ value: "Asia/Jerusalem",+ label: "Jerusalem",+ },+ ],+ },+ {+ label: "Italy",+ options: [+ {+ value: "Europe/Rome",+ label: "Rome",+ },+ ],+ },+ {+ label: "Jamaica",+ options: [+ {+ value: "America/Jamaica",+ label: "Jamaica",+ },+ ],+ },+ {+ label: "Japan",+ options: [+ {+ value: "Asia/Tokyo",+ label: "Tokyo",+ },+ ],+ },+ {+ label: "Jersey",+ options: [+ {+ value: "Europe/London",+ label: "London",+ },+ ],+ },+ {+ label: "Jordan",+ options: [+ {+ value: "Asia/Amman",+ label: "Amman",+ },+ ],+ },+ {+ label: "Kazakhstan",+ options: [+ {+ value: "Asia/Almaty",+ label: "Almaty",+ },+ {+ value: "Asia/Aqtau",+ label: "Aqtau",+ },+ {+ value: "Asia/Aqtobe",+ label: "Aqtobe",+ },+ {+ value: "Asia/Oral",+ label: "Oral",+ },+ {+ value: "Asia/Qyzylorda",+ label: "Qyzylorda",+ },+ ],+ },+ {+ label: "Kenya",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Kiribati",+ options: [+ {+ value: "Pacific/Enderbury",+ label: "Enderbury",+ },+ {+ value: "Pacific/Kiritimati",+ label: "Kiritimati",+ },+ {+ value: "Pacific/Tarawa",+ label: "Tarawa",+ },+ ],+ },+ {+ label: "Korea (North)",+ options: [+ {+ value: "Asia/Pyongyang",+ label: "Pyongyang",+ },+ ],+ },+ {+ label: "Korea (South)",+ options: [+ {+ value: "Asia/Seoul",+ label: "Seoul",+ },+ ],+ },+ {+ label: "Kuwait",+ options: [+ {+ value: "Asia/Riyadh",+ label: "Riyadh",+ },+ ],+ },+ {+ label: "Kyrgyzstan",+ options: [+ {+ value: "Asia/Bishkek",+ label: "Bishkek",+ },+ ],+ },+ {+ label: "Laos",+ options: [+ {+ value: "Asia/Bangkok",+ label: "Bangkok",+ },+ ],+ },+ {+ label: "Latvia",+ options: [+ {+ value: "Europe/Riga",+ label: "Riga",+ },+ ],+ },+ {+ label: "Lebanon",+ options: [+ {+ value: "Asia/Beirut",+ label: "Beirut",+ },+ ],+ },+ {+ label: "Lesotho",+ options: [+ {+ value: "Africa/Johannesburg",+ label: "Johannesburg",+ },+ ],+ },+ {+ label: "Liberia",+ options: [+ {+ value: "Africa/Monrovia",+ label: "Monrovia",+ },+ ],+ },+ {+ label: "Libya",+ options: [+ {+ value: "Africa/Tripoli",+ label: "Tripoli",+ },+ ],+ },+ {+ label: "Liechtenstein",+ options: [+ {+ value: "Europe/Zurich",+ label: "Zurich",+ },+ ],+ },+ {+ label: "Lithuania",+ options: [+ {+ value: "Europe/Vilnius",+ label: "Vilnius",+ },+ ],+ },+ {+ label: "Luxembourg",+ options: [+ {+ value: "Europe/Luxembourg",+ label: "Luxembourg",+ },+ ],+ },+ {+ label: "Macau",+ options: [+ {+ value: "Asia/Macau",+ label: "Macau",+ },+ ],+ },+ {+ label: "Macedonia",+ options: [+ {+ value: "Europe/Belgrade",+ label: "Belgrade",+ },+ ],+ },+ {+ label: "Madagascar",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Malawi",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Malaysia",+ options: [+ {+ value: "Asia/Kuala_Lumpur",+ label: "Kuala Lumpur",+ },+ {+ value: "Asia/Kuching",+ label: "Kuching",+ },+ ],+ },+ {+ label: "Maldives",+ options: [+ {+ value: "Indian/Maldives",+ label: "Maldives",+ },+ ],+ },+ {+ label: "Mali",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Malta",+ options: [+ {+ value: "Europe/Malta",+ label: "Malta",+ },+ ],+ },+ {+ label: "Marshall Islands",+ options: [+ {+ value: "Pacific/Kwajalein",+ label: "Kwajalein",+ },+ {+ value: "Pacific/Majuro",+ label: "Majuro",+ },+ ],+ },+ {+ label: "Martinique",+ options: [+ {+ value: "America/Martinique",+ label: "Martinique",+ },+ ],+ },+ {+ label: "Mauritania",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Mauritius",+ options: [+ {+ value: "Indian/Mauritius",+ label: "Mauritius",+ },+ ],+ },+ {+ label: "Mayotte",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Mexico",+ options: [+ {+ value: "America/Bahia_Banderas",+ label: "Bahia Banderas",+ },+ {+ value: "America/Cancun",+ label: "Cancun",+ },+ {+ value: "America/Chihuahua",+ label: "Chihuahua",+ },+ {+ value: "America/Hermosillo",+ label: "Hermosillo",+ },+ {+ value: "America/Matamoros",+ label: "Matamoros",+ },+ {+ value: "America/Mazatlan",+ label: "Mazatlan",+ },+ {+ value: "America/Merida",+ label: "Merida",+ },+ {+ value: "America/Mexico_City",+ label: "Mexico City",+ },+ {+ value: "America/Monterrey",+ label: "Monterrey",+ },+ {+ value: "America/Ojinaga",+ label: "Ojinaga",+ },+ {+ value: "America/Tijuana",+ label: "Tijuana",+ },+ ],+ },+ {+ label: "Micronesia",+ options: [+ {+ value: "Pacific/Chuuk",+ label: "Chuuk",+ },+ {+ value: "Pacific/Kosrae",+ label: "Kosrae",+ },+ {+ value: "Pacific/Pohnpei",+ label: "Pohnpei",+ },+ ],+ },+ {+ label: "Moldova",+ options: [+ {+ value: "Europe/Chisinau",+ label: "Chisinau",+ },+ ],+ },+ {+ label: "Monaco",+ options: [+ {+ value: "Europe/Monaco",+ label: "Monaco",+ },+ ],+ },+ {+ label: "Mongolia",+ options: [+ {+ value: "Asia/Choibalsan",+ label: "Choibalsan",+ },+ {+ value: "Asia/Hovd",+ label: "Hovd",+ },+ {+ value: "Asia/Ulaanbaatar",+ label: "Ulaanbaatar",+ },+ ],+ },+ {+ label: "Montenegro",+ options: [+ {+ value: "Europe/Belgrade",+ label: "Belgrade",+ },+ ],+ },+ {+ label: "Montserrat",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Morocco",+ options: [+ {+ value: "Africa/Casablanca",+ label: "Casablanca",+ },+ ],+ },+ {+ label: "Mozambique",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Myanmar (Burma)",+ options: [],+ },+ {+ label: "Namibia",+ options: [+ {+ value: "Africa/Windhoek",+ label: "Windhoek",+ },+ ],+ },+ {+ label: "Nauru",+ options: [+ {+ value: "Pacific/Nauru",+ label: "Nauru",+ },+ ],+ },+ {+ label: "Nepal",+ options: [+ {+ value: "Asia/Kathmandu",+ label: "Kathmandu",+ },+ ],+ },+ {+ label: "Netherlands",+ options: [+ {+ value: "Europe/Amsterdam",+ label: "Amsterdam",+ },+ ],+ },+ {+ label: "New Caledonia",+ options: [+ {+ value: "Pacific/Noumea",+ label: "Noumea",+ },+ ],+ },+ {+ label: "New Zealand",+ options: [+ {+ value: "Pacific/Auckland",+ label: "Auckland",+ },+ {+ value: "Pacific/Chatham",+ label: "Chatham",+ },+ ],+ },+ {+ label: "Nicaragua",+ options: [+ {+ value: "America/Managua",+ label: "Managua",+ },+ ],+ },+ {+ label: "Niger",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Nigeria",+ options: [+ {+ value: "Africa/Lagos",+ label: "Lagos",+ },+ ],+ },+ {+ label: "Niue",+ options: [+ {+ value: "Pacific/Niue",+ label: "Niue",+ },+ ],+ },+ {+ label: "Norfolk Island",+ options: [+ {+ value: "Pacific/Norfolk",+ label: "Norfolk",+ },+ ],+ },+ {+ label: "Northern Mariana Islands",+ options: [+ {+ value: "Pacific/Guam",+ label: "Guam",+ },+ ],+ },+ {+ label: "Norway",+ options: [+ {+ value: "Europe/Oslo",+ label: "Oslo",+ },+ ],+ },+ {+ label: "Oman",+ options: [+ {+ value: "Asia/Dubai",+ label: "Dubai",+ },+ ],+ },+ {+ label: "Pakistan",+ options: [+ {+ value: "Asia/Karachi",+ label: "Karachi",+ },+ ],+ },+ {+ label: "Palau",+ options: [+ {+ value: "Pacific/Palau",+ label: "Palau",+ },+ ],+ },+ {+ label: "Palestine",+ options: [+ {+ value: "Asia/Gaza",+ label: "Gaza",+ },+ {+ value: "Asia/Hebron",+ label: "Hebron",+ },+ ],+ },+ {+ label: "Panama",+ options: [+ {+ value: "America/Panama",+ label: "Panama",+ },+ ],+ },+ {+ label: "Papua New Guinea",+ options: [+ {+ value: "Pacific/Bougainville",+ label: "Bougainville",+ },+ {+ value: "Pacific/Port_Moresby",+ label: "Port Moresby",+ },+ ],+ },+ {+ label: "Paraguay",+ options: [+ {+ value: "America/Asuncion",+ label: "Asuncion",+ },+ ],+ },+ {+ label: "Peru",+ options: [+ {+ value: "America/Lima",+ label: "Lima",+ },+ ],+ },+ {+ label: "Philippines",+ options: [+ {+ value: "Asia/Manila",+ label: "Manila",+ },+ ],+ },+ {+ label: "Pitcairn",+ options: [+ {+ value: "Pacific/Pitcairn",+ label: "Pitcairn",+ },+ ],+ },+ {+ label: "Poland",+ options: [+ {+ value: "Europe/Warsaw",+ label: "Warsaw",+ },+ ],+ },+ {+ label: "Portugal",+ options: [+ {+ value: "Atlantic/Azores",+ label: "Azores",+ },+ {+ value: "Europe/Lisbon",+ label: "Lisbon",+ },+ {+ value: "Atlantic/Madeira",+ label: "Madeira",+ },+ ],+ },+ {+ label: "Puerto Rico",+ options: [+ {+ value: "America/Puerto_Rico",+ label: "Puerto Rico",+ },+ ],+ },+ {+ label: "Qatar",+ options: [+ {+ value: "Asia/Qatar",+ label: "Qatar",+ },+ ],+ },+ {+ label: "Romania",+ options: [+ {+ value: "Europe/Bucharest",+ label: "Bucharest",+ },+ ],+ },+ {+ label: "Russia",+ options: [+ {+ value: "Asia/Anadyr",+ label: "Anadyr",+ },+ {+ value: "Asia/Chita",+ label: "Chita",+ },+ {+ value: "Asia/Irkutsk",+ label: "Irkutsk",+ },+ {+ value: "Europe/Kaliningrad",+ label: "Kaliningrad",+ },+ {+ value: "Asia/Kamchatka",+ label: "Kamchatka",+ },+ {+ value: "Asia/Khandyga",+ label: "Khandyga",+ },+ {+ value: "Asia/Krasnoyarsk",+ label: "Krasnoyarsk",+ },+ {+ value: "Asia/Magadan",+ label: "Magadan",+ },+ {+ value: "Europe/Moscow",+ label: "Moscow",+ },+ {+ value: "Asia/Novokuznetsk",+ label: "Novokuznetsk",+ },+ {+ value: "Asia/Novosibirsk",+ label: "Novosibirsk",+ },+ {+ value: "Asia/Omsk",+ label: "Omsk",+ },+ {+ value: "Asia/Sakhalin",+ label: "Sakhalin",+ },+ {+ value: "Europe/Samara",+ label: "Samara",+ },+ {+ value: "Europe/Simferopol",+ label: "Simferopol",+ },+ {+ value: "Asia/Srednekolymsk",+ label: "Srednekolymsk",+ },+ {+ value: "Asia/Ust-Nera",+ label: "Ust-Nera",+ },+ {+ value: "Asia/Vladivostok",+ label: "Vladivostok",+ },+ {+ value: "Europe/Volgograd",+ label: "Volgograd",+ },+ {+ value: "Asia/Yakutsk",+ label: "Yakutsk",+ },+ {+ value: "Asia/Yekaterinburg",+ label: "Yekaterinburg",+ },+ ],+ },+ {+ label: "Rwanda",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Réunion",+ options: [+ {+ value: "Indian/Reunion",+ label: "Reunion",+ },+ ],+ },+ {+ label: "Samoa (American)",+ options: [+ {+ value: "Pacific/Pago_Pago",+ label: "Pago Pago",+ },+ ],+ },+ {+ label: "Samoa (western)",+ options: [+ {+ value: "Pacific/Apia",+ label: "Apia",+ },+ ],+ },+ {+ label: "San Marino",+ options: [+ {+ value: "Europe/Rome",+ label: "Rome",+ },+ ],+ },+ {+ label: "Sao Tome & Principe",+ options: [+ {+ value: "Africa/Sao_Tome",+ label: "Sao Tome",+ },+ ],+ },+ {+ label: "Saudi Arabia",+ options: [+ {+ value: "Asia/Riyadh",+ label: "Riyadh",+ },+ ],+ },+ {+ label: "Senegal",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Serbia",+ options: [+ {+ value: "Europe/Belgrade",+ label: "Belgrade",+ },+ ],+ },+ {+ label: "Seychelles",+ options: [+ {+ value: "Indian/Mahe",+ label: "Mahe",+ },+ ],+ },+ {+ label: "Sierra Leone",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Singapore",+ options: [+ {+ value: "Asia/Singapore",+ label: "Singapore",+ },+ ],+ },+ {+ label: "Slovakia",+ options: [+ {+ value: "Europe/Prague",+ label: "Prague",+ },+ ],+ },+ {+ label: "Slovenia",+ options: [+ {+ value: "Europe/Belgrade",+ label: "Belgrade",+ },+ ],+ },+ {+ label: "Solomon Islands",+ options: [+ {+ value: "Pacific/Guadalcanal",+ label: "Guadalcanal",+ },+ ],+ },+ {+ label: "Somalia",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "South Africa",+ options: [+ {+ value: "Africa/Johannesburg",+ label: "Johannesburg",+ },+ ],+ },+ {+ label: "South Georgia & the South Sandwich Islands",+ options: [+ {+ value: "Atlantic/South_Georgia",+ label: "South Georgia",+ },+ ],+ },+ {+ label: "South Sudan",+ options: [+ {+ value: "Africa/Juba",+ label: "Juba",+ },+ ],+ },+ {+ label: "Spain",+ options: [+ {+ value: "Atlantic/Canary",+ label: "Canary",+ },+ {+ value: "Africa/Ceuta",+ label: "Ceuta",+ },+ {+ value: "Europe/Madrid",+ label: "Madrid",+ },+ ],+ },+ {+ label: "Sri Lanka",+ options: [+ {+ value: "Asia/Colombo",+ label: "Colombo",+ },+ ],+ },+ {+ label: "St Barthelemy",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "St Helena",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "St Kitts & Nevis",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "St Lucia",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "St Maarten (Dutch)",+ options: [+ {+ value: "America/Curacao",+ label: "Curacao",+ },+ ],+ },+ {+ label: "St Martin (French)",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "St Pierre & Miquelon",+ options: [+ {+ value: "America/Miquelon",+ label: "Miquelon",+ },+ ],+ },+ {+ label: "St Vincent",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Sudan",+ options: [+ {+ value: "Africa/Khartoum",+ label: "Khartoum",+ },+ ],+ },+ {+ label: "Suriname",+ options: [+ {+ value: "America/Paramaribo",+ label: "Paramaribo",+ },+ ],+ },+ {+ label: "Svalbard & Jan Mayen",+ options: [+ {+ value: "Europe/Oslo",+ label: "Oslo",+ },+ ],+ },+ {+ label: "Swaziland",+ options: [+ {+ value: "Africa/Johannesburg",+ label: "Johannesburg",+ },+ ],+ },+ {+ label: "Sweden",+ options: [+ {+ value: "Europe/Stockholm",+ label: "Stockholm",+ },+ ],+ },+ {+ label: "Switzerland",+ options: [+ {+ value: "Europe/Zurich",+ label: "Zurich",+ },+ ],+ },+ {+ label: "Syria",+ options: [+ {+ value: "Asia/Damascus",+ label: "Damascus",+ },+ ],+ },+ {+ label: "Taiwan",+ options: [+ {+ value: "Asia/Taipei",+ label: "Taipei",+ },+ ],+ },+ {+ label: "Tajikistan",+ options: [+ {+ value: "Asia/Dushanbe",+ label: "Dushanbe",+ },+ ],+ },+ {+ label: "Tanzania",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Thailand",+ options: [+ {+ value: "Asia/Bangkok",+ label: "Bangkok",+ },+ ],+ },+ {+ label: "Togo",+ options: [+ {+ value: "Africa/Abidjan",+ label: "Abidjan",+ },+ ],+ },+ {+ label: "Tokelau",+ options: [+ {+ value: "Pacific/Fakaofo",+ label: "Fakaofo",+ },+ ],+ },+ {+ label: "Tonga",+ options: [+ {+ value: "Pacific/Tongatapu",+ label: "Tongatapu",+ },+ ],+ },+ {+ label: "Trinidad & Tobago",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Tunisia",+ options: [+ {+ value: "Africa/Tunis",+ label: "Tunis",+ },+ ],+ },+ {+ options: [+ {+ value: "Europe/Istanbul",+ label: "Istanbul",+ },+ ],+ },+ {+ label: "Turkmenistan",+ options: [+ {+ value: "Asia/Ashgabat",+ label: "Ashgabat",+ },+ ],+ },+ {+ label: "Turks & Caicos Is",+ options: [+ {+ value: "America/Grand_Turk",+ label: "Grand Turk",+ },+ ],+ },+ {+ label: "Tuvalu",+ options: [+ {+ value: "Pacific/Funafuti",+ label: "Funafuti",+ },+ ],+ },+ {+ label: "US minor outlying islands",+ options: [+ {+ value: "Pacific/Honolulu",+ label: "Hawaii",+ },+ {+ value: "Pacific/Pago_Pago",+ label: "Pago Pago",+ },+ {+ value: "Pacific/Wake",+ label: "Wake",+ },+ ],+ },+ {+ label: "Uganda",+ options: [+ {+ value: "Africa/Nairobi",+ label: "Nairobi",+ },+ ],+ },+ {+ label: "Ukraine",+ options: [+ {+ value: "Europe/Kiev",+ label: "Kiev",+ },+ {+ value: "Europe/Uzhgorod",+ label: "Uzhgorod",+ },+ {+ value: "Europe/Zaporozhye",+ label: "Zaporozhye",+ },+ ],+ },+ {+ label: "United Arab Emirates",+ options: [+ {+ value: "Asia/Dubai",+ label: "Dubai",+ },+ ],+ },+ {+ label: "United States",+ options: [+ {+ value: "America/Adak",+ label: "Adak",+ },+ {+ value: "America/Anchorage",+ label: "Alaska",+ },+ {+ value: "America/North_Dakota/Beulah",+ label: "Beulah",+ },+ {+ value: "America/Boise",+ label: "Boise",+ },+ {+ value: "America/North_Dakota/Center",+ label: "Center",+ },+ {+ value: "America/Chicago",+ label: "Central",+ },+ {+ value: "America/Detroit",+ label: "Detroit",+ },+ {+ value: "America/New_York",+ label: "Eastern",+ },+ {+ value: "Pacific/Honolulu",+ label: "Hawaii",+ },+ {+ value: "America/Indiana/Indianapolis",+ label: "Indianapolis",+ },+ {+ value: "America/Juneau",+ label: "Juneau",+ },+ {+ value: "America/Indiana/Knox",+ label: "Knox",+ },+ {+ value: "America/Kentucky/Louisville",+ label: "Louisville",+ },+ {+ value: "America/Indiana/Marengo",+ label: "Marengo",+ },+ {+ value: "America/Menominee",+ label: "Menominee",+ },+ {+ value: "America/Metlakatla",+ label: "Metlakatla",+ },+ {+ value: "America/Kentucky/Monticello",+ label: "Monticello",+ },+ {+ value: "America/Denver",+ label: "Mountain",+ },+ {+ value: "America/Phoenix",+ label: "Mountain - Arizona",+ },+ {+ value: "America/North_Dakota/New_Salem",+ label: "New Salem",+ },+ {+ value: "America/Nome",+ label: "Nome",+ },+ {+ value: "America/Los_Angeles",+ label: "Pacific",+ },+ {+ value: "America/Indiana/Petersburg",+ label: "Petersburg",+ },+ {+ value: "America/Sitka",+ label: "Sitka",+ },+ {+ value: "America/Indiana/Tell_City",+ label: "Tell City",+ },+ {+ value: "America/Indiana/Vevay",+ label: "Vevay",+ },+ {+ value: "America/Indiana/Vincennes",+ label: "Vincennes",+ },+ {+ value: "America/Indiana/Winamac",+ label: "Winamac",+ },+ {+ value: "America/Yakutat",+ label: "Yakutat",+ },+ ],+ },+ {+ label: "Uruguay",+ options: [+ {+ value: "America/Montevideo",+ label: "Montevideo",+ },+ ],+ },+ {+ label: "Uzbekistan",+ options: [+ {+ value: "Asia/Samarkand",+ label: "Samarkand",+ },+ {+ value: "Asia/Tashkent",+ label: "Tashkent",+ },+ ],+ },+ {+ label: "Vanuatu",+ options: [+ {+ value: "Pacific/Efate",+ label: "Efate",+ },+ ],+ },+ {+ label: "Vatican City",+ options: [+ {+ value: "Europe/Rome",+ label: "Rome",+ },+ ],+ },+ {+ label: "Venezuela",+ options: [+ {+ value: "America/Caracas",+ label: "Caracas",+ },+ ],+ },+ {+ label: "Vietnam",+ options: [+ {+ value: "Asia/Bangkok",+ label: "Bangkok",+ },+ {+ value: "Asia/Ho_Chi_Minh",+ label: "Ho Chi Minh",+ },+ ],+ },+ {+ label: "Virgin Islands (UK)",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Virgin Islands (US)",+ options: [+ {+ value: "America/Port_of_Spain",+ label: "Port of Spain",+ },+ ],+ },+ {+ label: "Wallis & Futuna",+ options: [+ {+ value: "Pacific/Wallis",+ label: "Wallis",+ },+ ],+ },+ {+ label: "Western Sahara",+ options: [+ {+ value: "Africa/El_Aaiun",+ label: "El Aaiun",+ },+ ],+ },+ {+ label: "Yemen",+ options: [+ {+ value: "Asia/Riyadh",+ label: "Riyadh",+ },+ ],+ },+ {+ label: "Zambia",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Zimbabwe",+ options: [+ {+ value: "Africa/Maputo",+ label: "Maputo",+ },+ ],+ },+ {+ label: "Åland Islands",+ options: [+ {+ value: "Europe/Helsinki",+ label: "Helsinki",+ },+ ],+ },+];diff --git a/apps/carbon/app/root.tsx b/apps/carbon/app/root.tsxindex 299b953e5a..f1aeeb7643 100644--- a/apps/carbon/app/root.tsx+++ b/apps/carbon/app/root.tsx@@ -1,5 +1,5 @@// root.tsx-import React, { useContext, useEffect } from "react";+import { ThemeProvider } from "@carbon/react";import { SkipNavLink } from "@chakra-ui/skip-nav";import { withEmotionCache } from "@emotion/react";import {@@ -12,8 +12,8 @@ import {useLoaderData,} from "@remix-run/react";import { json } from "@remix-run/node";-import type { MetaFunction, LoaderArgs } from "@remix-run/node";-import { ThemeProvider } from "@carbon/react";+import type { MetaFunction } from "@remix-run/node";+import React, { useContext, useEffect } from "react";import { getBrowserEnv } from "~/config/env";import { ServerStyleContext, ClientStyleContext } from "~/lib/emotion";import Background from "~/styles/background.css";@@ -32,7 +32,7 @@ interface DocumentProps {children: React.ReactNode;}-export async function loader({ request }: LoaderArgs) {+export async function loader() {const { SUPABASE_API_URL, SUPABASE_ANON_PUBLIC } = getBrowserEnv();return json({env: {diff --git a/apps/carbon/app/routes/resource+/resources.locations.tsx b/apps/carbon/app/routes/resource+/resources.locations.tsxnew file mode 100644index 0000000000..0ca78bea10--- /dev/null+++ b/apps/carbon/app/routes/resource+/resources.locations.tsx@@ -0,0 +1,12 @@+import type { LoaderArgs } from "@remix-run/node";+import { json } from "@remix-run/node";+import { requirePermissions } from "~/services/auth";+import { getLocationsList } from "~/services/resources";++export async function loader({ request }: LoaderArgs) {+ const authorized = await requirePermissions(request, {+ view: "resources",+ });++ return json(await getLocationsList(authorized.client));+}diff --git a/apps/carbon/app/routes/resource+/resources.shifts.tsx b/apps/carbon/app/routes/resource+/resources.shifts.tsxnew file mode 100644index 0000000000..0583fecf8f--- /dev/null+++ b/apps/carbon/app/routes/resource+/resources.shifts.tsx@@ -0,0 +1,15 @@+import type { LoaderArgs } from "@remix-run/node";+import { json } from "@remix-run/node";+import { requirePermissions } from "~/services/auth";+import { getShiftsList } from "~/services/resources";++export async function loader({ request }: LoaderArgs) {+ const authorized = await requirePermissions(request, {+ view: "resources",+ });++ const url = new URL(request.url);+ const location = url.searchParams.get("location");++ return json(await getShiftsList(authorized.client, location));+}diff --git a/apps/carbon/app/routes/x+/account.$userId.delete.attribute.tsx b/apps/carbon/app/routes/x+/account.$userId.delete.attribute.tsxindex 7c9824183d..ea42cc99f5 100644--- a/apps/carbon/app/routes/x+/account.$userId.delete.attribute.tsx+++ b/apps/carbon/app/routes/x+/account.$userId.delete.attribute.tsx@@ -27,7 +27,8 @@ export async function action({ request, params }: ActionArgs) {if (!userAttributeValueId) throw new Error("No attribute value id provided");const clientClaims = await getUserClaims(request, client);- const canUpdateAnyUser = clientClaims.permissions["users"]?.update === true;+ const canUpdateAnyUser =+ clientClaims.permissions["resources"]?.update === true;if (!canUpdateAnyUser && userId !== targetUserId) {return json(@@ -59,7 +60,7 @@ export async function action({ request, params }: ActionArgs) {}const removeAttributeValue = await deleteUserAttributeValue(client, {- userId,+ userId: targetUserId,userAttributeId: userAttributeId,userAttributeValueId: userAttributeValueId,});diff --git a/apps/carbon/app/routes/x+/resources.abilities.tsx b/apps/carbon/app/routes/x+/resources.abilities.tsxindex fad1710853..9268afdb6b 100644--- a/apps/carbon/app/routes/x+/resources.abilities.tsx+++ b/apps/carbon/app/routes/x+/resources.abilities.tsx@@ -15,7 +15,7 @@ import { error } from "~/utils/result";export async function loader({ request }: LoaderArgs) {const { client } = await requirePermissions(request, {- view: "users",+ view: "resources",role: "employee",});diff --git a/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsx b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsxindex 19c7a53d89..c9490cdad9 100644--- a/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsx+++ b/apps/carbon/app/routes/x+/resources.ability.$abilityId.employee.$id.tsx@@ -5,6 +5,7 @@ import { validationError } from "remix-validated-form";import { useRouteData } from "~/hooks";import { EmployeeAbilityForm } from "~/interfaces/Resources/Abilities";import type { Ability } from "~/interfaces/Resources/types";+import { getTrainingStatus } from "~/interfaces/Resources/types";import { AbilityEmployeeStatus } from "~/interfaces/Resources/types";import { requirePermissions } from "~/services/auth";import {@@ -122,19 +123,6 @@ export default function EmployeeAbilityRoute() {);}-function getTrainingStatus(- employeeAbility: {- lastTrainingDate: string | null;- trainingDays: number;- trainingCompleted: boolean | null;- } | null-) {- if (!employeeAbility) return undefined;- if (employeeAbility.trainingCompleted) return AbilityEmployeeStatus.Complete;- if (employeeAbility.trainingDays > 0) return AbilityEmployeeStatus.InProgress;- return AbilityEmployeeStatus.NotStarted;-}-function getTrainingPercent(traniningDays?: number, weeks?: number) {if (!traniningDays || !weeks) return 0;return (traniningDays / 5 / weeks) * 100;diff --git a/apps/carbon/app/routes/x+/resources.locations.$locationId.tsx b/apps/carbon/app/routes/x+/resources.locations.$locationId.tsxnew file mode 100644index 0000000000..9e9bf2e56e--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.locations.$locationId.tsx@@ -0,0 +1,90 @@+import type { ActionArgs, LoaderArgs } from "@remix-run/node";+import { json } from "@remix-run/node";+import { redirect } from "@remix-run/node";+import { useLoaderData } from "@remix-run/react";+import { validationError } from "remix-validated-form";+import { LocationForm } from "~/interfaces/Resources/Locations";+import { requirePermissions } from "~/services/auth";+import { flash } from "~/services/session";+import {+ getLocation,+ locationValidator,+ upsertLocation,+} from "~/services/resources";+import { assertIsPost, notFound } from "~/utils/http";+import { error, success } from "~/utils/result";+import { getLocalTimeZone } from "@internationalized/date";++export async function loader({ request, params }: LoaderArgs) {+ const { client } = await requirePermissions(request, {+ view: "resources",+ });++ const { locationId } = params;+ if (!locationId) throw notFound("Location ID was not found");++ const location = await getLocation(client, locationId);++ if (location.error) {+ return redirect(+ "/x/resources/locations",+ await flash(request, error(location.error, "Failed to get location"))+ );+ }++ return json({+ location: location.data,+ });+}++export async function action({ request }: ActionArgs) {+ assertIsPost(request);+ const { client } = await requirePermissions(request, {+ create: "resources",+ });++ const validation = await locationValidator.validate(await request.formData());++ if (validation.error) {+ return validationError(validation.error);+ }++ const { id, name, timezone, latitude, longitude } = validation.data;++ const createLocation = await upsertLocation(client, {+ id,+ name,+ timezone,+ latitude: latitude ?? null,+ longitude: longitude ?? null,+ });++ if (createLocation.error) {+ return redirect(+ "/x/resources/locations",+ await flash(+ request,+ error(createLocation.error, "Failed to create location.")+ )+ );+ }++ return redirect(+ "/x/resources/locations",+ await flash(request, success("Location updated."))+ );+}++export default function LocationRoute() {+ const { location } = useLoaderData<typeof loader>();++ const initialValues = {+ id: location.id,+ name: location.name,+ timezone: location.timezone ?? getLocalTimeZone(),+ latitude: location.latitude ?? undefined,+ longitude: location.longitude ?? undefined,+ };++ return <LocationForm initialValues={initialValues} />;+}diff --git a/apps/carbon/app/routes/x+/resources.locations.delete.$locationId.tsx b/apps/carbon/app/routes/x+/resources.locations.delete.$locationId.tsxnew file mode 100644index 0000000000..ef18e865bd--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.locations.delete.$locationId.tsx@@ -0,0 +1,83 @@+import type { ActionArgs, LoaderArgs } from "@remix-run/node";+import { json, redirect } from "@remix-run/node";+import { useLoaderData, useNavigate, useParams } from "@remix-run/react";+import { ConfirmDelete } from "~/components/Modals";+import { requirePermissions } from "~/services/auth";+import { deleteLocation, getLocation } from "~/services/resources";+import { flash } from "~/services/session";+import { error, success } from "~/utils/result";+import { notFound } from "~/utils/http";++export async function loader({ request, params }: LoaderArgs) {+ const { client } = await requirePermissions(request, {+ view: "resources",+ role: "employee",+ });++ const { locationId } = params;+ if (!locationId) throw notFound("locationId not found");++ const location = await getLocation(client, locationId);+ if (location.error) {+ return redirect(+ "/x/resources/locations",+ await flash(request, error(location.error, "Failed to get location"))+ );+ }++ return json({+ location: location.data,+ });+}++export async function action({ request, params }: ActionArgs) {+ const { client } = await requirePermissions(request, {+ delete: "resources",+ });++ const { locationId } = params;+ if (!locationId) {+ return redirect(+ "/x/resources/locations",+ await flash(request, error(params, "Failed to get location id"))+ );+ }++ const { error: deleteLocationError } = await deleteLocation(+ client,+ locationId+ );+ if (deleteLocationError) {+ return redirect(+ "/x/resources/locations",+ await flash(+ request,+ error(deleteLocationError, "Failed to delete location")+ )+ );+ }++ return redirect(+ "/x/resources/locations",+ await flash(request, success("Successfully deleted location"))+ );+}++export default function DeleteLocationRoute() {+ const { locationId } = useParams();+ const { location } = useLoaderData<typeof loader>();+ const navigate = useNavigate();++ if (!locationId || !location) return null;++ const onCancel = () => navigate("/x/resources/locations");++ return (+ <ConfirmDelete+ action={`/x/resources/locations/delete/${locationId}`}+ name={location.name}+ text={`Are you sure you want to delete the location: ${location.name}? This cannot be undone.`}+ onCancel={onCancel}+ />+ );+}diff --git a/apps/carbon/app/routes/x+/resources.locations.new.tsx b/apps/carbon/app/routes/x+/resources.locations.new.tsxnew file mode 100644index 0000000000..0203eabb60--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.locations.new.tsx@@ -0,0 +1,56 @@+import { getLocalTimeZone } from "@internationalized/date";+import type { ActionArgs } from "@remix-run/node";+import { redirect } from "@remix-run/node";+import { validationError } from "remix-validated-form";+import { LocationForm } from "~/interfaces/Resources/Locations";+import { requirePermissions } from "~/services/auth";+import { locationValidator, upsertLocation } from "~/services/resources";+import { flash } from "~/services/session";+import { assertIsPost } from "~/utils/http";+import { error, success } from "~/utils/result";++export async function action({ request }: ActionArgs) {+ assertIsPost(request);+ const { client } = await requirePermissions(request, {+ create: "resources",+ });++ const validation = await locationValidator.validate(await request.formData());++ if (validation.error) {+ return validationError(validation.error);+ }++ const { name, timezone, latitude, longitude } = validation.data;++ const createLocation = await upsertLocation(client, {+ name,+ timezone,+ latitude: latitude ?? null,+ longitude: longitude ?? null,+ });++ if (createLocation.error) {+ return redirect(+ "/x/resources/locations",+ await flash(+ request,+ error(createLocation.error, "Failed to create location.")+ )+ );+ }++ return redirect(+ "/x/resources/locations",+ await flash(request, success("Location created."))+ );+}++export default function NewLocationRoute() {+ const initialValues = {+ name: "",+ timezone: getLocalTimeZone(),+ };++ return <LocationForm initialValues={initialValues} />;+}diff --git a/apps/carbon/app/routes/x+/resources.locations.tsx b/apps/carbon/app/routes/x+/resources.locations.tsxnew file mode 100644index 0000000000..8cd5ab53ce--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.locations.tsx@@ -0,0 +1,52 @@+import { VStack } from "@chakra-ui/react";+import type { LoaderArgs } from "@remix-run/node";+import { redirect } from "@remix-run/node";+import { json } from "@remix-run/node";+import { Outlet, useLoaderData } from "@remix-run/react";+import {+ LocationsTable,+ LocationsTableFilters,+} from "~/interfaces/Resources/Locations";+import { requirePermissions } from "~/services/auth";+import { flash } from "~/services/session";+import { getLocations } from "~/services/resources";+import { getGenericQueryFilters } from "~/utils/query";+import { error } from "~/utils/result";++export async function loader({ request }: LoaderArgs) {+ const { client } = await requirePermissions(request, {+ view: "resources",+ role: "employee",+ });++ const url = new URL(request.url);+ const searchParams = new URLSearchParams(url.search);+ const name = searchParams.get("name");+ const { limit, offset, sorts } = getGenericQueryFilters(searchParams);++ const locations = await getLocations(client, { name, limit, offset, sorts });++ if (locations.error) {+ return redirect(+ "/x/resources",+ await flash(request, error(locations.error, "Failed to load locations"))+ );+ }++ return json({+ locations: locations.data ?? [],+ count: locations.count ?? 0,+ });+}++export default function LocationsRoute() {+ const { locations, count } = useLoaderData<typeof loader>();++ return (+ <VStack w="full" h="full" spacing={0}>+ <LocationsTableFilters />+ <LocationsTable data={locations} count={count} />+ <Outlet />+ </VStack>+ );+}diff --git a/apps/carbon/app/routes/x+/resources.person.$personId.tsx b/apps/carbon/app/routes/x+/resources.person.$personId.tsxindex 1d6ba902e3..39ef3f065a 100644--- a/apps/carbon/app/routes/x+/resources.person.$personId.tsx+++ b/apps/carbon/app/routes/x+/resources.person.$personId.tsx@@ -1,24 +1,37 @@-import { Box, Grid } from "@chakra-ui/react";-import type { LoaderArgs } from "@remix-run/node";+import { Box, Grid, VStack } from "@chakra-ui/react";+import type { ActionArgs, LoaderArgs } from "@remix-run/node";import { json } from "@remix-run/node";import { redirect } from "@remix-run/node";import { useLoaderData } from "@remix-run/react";+import { validationError } from "remix-validated-form";import {PersonAbilities,PersonHeader,- PersonNotes,PersonTabs,- PersonSchedule,+ PersonJob,+ PersonDaysOff,+ PersonOvertime,} from "~/interfaces/Resources/Person";+import type { EmployeeJob } from "~/interfaces/Resources/types";+import logger from "~/lib/logger";import {+ accountProfileValidator,getAccount,getPrivateAttributes,getPublicAttributes,+ updatePublicAccount,} from "~/services/account";import { requirePermissions } from "~/services/auth";-import { getNotes } from "~/services/resources";+import {+ employeeJobValidator,+ getEmployeeAbilities,+ getEmployeeJob,+ getNotes,+ upsertEmployeeJob,+} from "~/services/resources";import { flash } from "~/services/session";-import { error } from "~/utils/result";+import { assertIsPost } from "~/utils/http";+import { error, success } from "~/utils/result";export async function loader({ request, params }: LoaderArgs) {const { client } = await requirePermissions(request, {@@ -34,11 +47,20 @@ export async function loader({ request, params }: LoaderArgs) {);}- const [user, notes, publicAttributes, privateAttributes] = await Promise.all([+ const [+ user,+ notes,+ publicAttributes,+ privateAttributes,+ employeeAbilities,+ employeeJob,+ ] = await Promise.all([getAccount(client, personId),getNotes(client, personId),getPublicAttributes(client, personId),getPrivateAttributes(client, personId),+ getEmployeeAbilities(client, personId),+ getEmployeeJob(client, personId),]);if (user.error || !user.data) {@@ -48,45 +70,114 @@ export async function loader({ request, params }: LoaderArgs) {);}- if (publicAttributes.error) {- return redirect(- "/x/resources/people",- await flash(- request,- error(publicAttributes.error, "Failed to get user attributes")- )- );- }+ if (notes.error) logger.error(notes.error);+ if (publicAttributes.error) logger.error(publicAttributes.error);+ if (privateAttributes.error) logger.error(privateAttributes.error);+ if (employeeAbilities.error) logger.error(employeeAbilities.error);+ if (employeeJob.error) logger.error(employeeJob.error);return json({user: user.data,notes: notes.data ?? [],- publicAttributes: publicAttributes.data,+ publicAttributes: publicAttributes.data ?? [],privateAttributes: privateAttributes.data ?? [],+ employeeAbilities: employeeAbilities.data ?? [],+ employeeJob: employeeJob.data ?? ({} as EmployeeJob),});}+export async function action({ request, params }: ActionArgs) {+ assertIsPost(request);+ const { client } = await requirePermissions(request, {+ update: "resources",+ });+ const { personId } = params;+ if (!personId) throw new Error("No person ID provided");++ const formData = await request.formData();+ const intent = formData.get("intent");+ if (intent === "about") {+ const validation = await accountProfileValidator.validate(formData);++ if (validation.error) {+ return validationError(validation.error);+ }++ const { firstName, lastName, about } = validation.data;++ const updateAccount = await updatePublicAccount(client, {+ id: personId,+ firstName,+ lastName,+ about,+ });+ if (updateAccount.error)+ return json(+ {},+ await flash(+ request,+ error(updateAccount.error, "Failed to update profile")+ )+ );++ return json({}, await flash(request, success("Updated profile")));+ }+ if (intent === "job") {+ const validation = await employeeJobValidator.validate(formData);++ if (validation.error) {+ return validationError(validation.error);+ }++ const { title, locationId, shiftId, managerId } = validation.data;++ const updateJob = await upsertEmployeeJob(client, personId, {+ title: title ?? null,+ locationId: locationId ?? null,+ shiftId: shiftId ?? null,+ managerId: managerId ?? null,+ });+ if (updateJob.error) {+ return json(+ {},+ await flash(request, error(updateJob.error, "Failed to update job"))+ );+ }++ return json({}, await flash(request, success("Successfully updated job")));+ }++ return null;+}+export default function PersonRoute() {- const { user, publicAttributes, privateAttributes, notes } =- useLoaderData<typeof loader>();+ const {+ user,+ publicAttributes,+ privateAttributes,+ notes,+ employeeAbilities,+ employeeJob,+ } = useLoaderData<typeof loader>();return (<Box p="4" w="full"><PersonHeader user={user} />- <Grid- gridTemplateColumns="5fr 3fr"- gridColumnGap={4}- gridRowGap={4}- w="full"- >- <PersonTabs- user={user}- publicAttributes={publicAttributes}- privateAttributes={privateAttributes}- />- <PersonSchedule />- <PersonNotes notes={notes} />- <PersonAbilities />+ <Grid gridTemplateColumns="5fr 3fr" gridColumnGap={4} w="full">+ <VStack spacing={4}>+ <PersonTabs+ user={user}+ job={employeeJob}+ publicAttributes={publicAttributes}+ privateAttributes={privateAttributes}+ notes={notes}+ />+ </VStack>+ <VStack spacing={4}>+ <PersonDaysOff />+ <PersonOvertime />+ <PersonAbilities abilities={employeeAbilities} />+ </VStack></Grid></Box>);diff --git a/apps/carbon/app/routes/x+/resources.shifts.$shiftId.tsx b/apps/carbon/app/routes/x+/resources.shifts.$shiftId.tsxnew file mode 100644index 0000000000..b92f54ab68--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.shifts.$shiftId.tsx@@ -0,0 +1,87 @@+import type { ActionArgs, LoaderArgs } from "@remix-run/node";+import { json } from "@remix-run/node";+import { redirect } from "@remix-run/node";+import { useLoaderData } from "@remix-run/react";+import { validationError } from "remix-validated-form";+import { ShiftForm } from "~/interfaces/Resources/Shifts";+import { requirePermissions } from "~/services/auth";+import { flash } from "~/services/session";+import { getShift, shiftValidator, upsertShift } from "~/services/resources";+import { assertIsPost, notFound } from "~/utils/http";+import { error, success } from "~/utils/result";++export async function loader({ request, params }: LoaderArgs) {+ const { client } = await requirePermissions(request, {+ view: "resources",+ });++ const { shiftId } = params;+ if (!shiftId) throw notFound("Shift ID was not found");++ const shift = await getShift(client, shiftId);++ if (shift.error) {+ return redirect(+ "/x/resources/shifts",+ await flash(request, error(shift.error, "Failed to get shift"))+ );+ }++ return json({+ shift: shift.data,+ });+}++export async function action({ request }: ActionArgs) {+ assertIsPost(request);+ const { client } = await requirePermissions(request, {+ create: "resources",+ });++ const validation = await shiftValidator.validate(await request.formData());++ if (validation.error) {+ return validationError(validation.error);+ }++ const createShift = await upsertShift(client, {+ ...validation.data,+ });++ if (createShift.error) {+ return redirect(+ "/x/resources/shifts",+ await flash(request, error(createShift.error, "Failed to create shift."))+ );+ }++ return redirect(+ "/x/resources/shifts",+ await flash(request, success("Shift updated."))+ );+}++export default function ShiftRoute() {+ const { shift } = useLoaderData<typeof loader>();++ if (Array.isArray(shift?.location)) {+ throw new Error("Shift location is an array");+ }++ const initialValues = {+ id: shift.id,+ name: shift.name,+ startTime: shift.startTime,+ endTime: shift.endTime,+ locationId: shift.locationId,+ monday: shift.monday,+ tuesday: shift.tuesday,+ wednesday: shift.wednesday,+ thursday: shift.thursday,+ friday: shift.friday,+ saturday: shift.saturday,+ sunday: shift.sunday,+ };++ return <ShiftForm initialValues={initialValues} />;+}diff --git a/apps/carbon/app/routes/x+/resources.shifts.delete.$shiftId.tsx b/apps/carbon/app/routes/x+/resources.shifts.delete.$shiftId.tsxnew file mode 100644index 0000000000..688c6a0655--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.shifts.delete.$shiftId.tsx@@ -0,0 +1,81 @@+import type { ActionArgs, LoaderArgs } from "@remix-run/node";+import { json, redirect } from "@remix-run/node";+import { useLoaderData, useNavigate, useParams } from "@remix-run/react";+import { ConfirmDelete } from "~/components/Modals";+import { requirePermissions } from "~/services/auth";+import { deleteShift, getShift } from "~/services/resources";+import { flash } from "~/services/session";+import { error, success } from "~/utils/result";+import { notFound } from "~/utils/http";++export async function loader({ request, params }: LoaderArgs) {+ const { client } = await requirePermissions(request, {+ view: "resources",+ role: "employee",+ });++ const { shiftId } = params;+ if (!shiftId) throw notFound("shiftId not found");++ const shift = await getShift(client, shiftId);+ if (shift.error) {+ return redirect(+ "/x/resources/shifts",+ await flash(request, error(shift.error, "Failed to get shift"))+ );+ }++ return json({+ shift: shift.data,+ });+}++export async function action({ request, params }: ActionArgs) {+ const { client } = await requirePermissions(request, {+ delete: "resources",+ });++ const { shiftId } = params;+ if (!shiftId) {+ return redirect(+ "/x/resources/shifts",+ await flash(request, error(params, "Failed to get shift id"))+ );+ }++ const { error: deleteShiftError } = await deleteShift(client, shiftId);+ if (deleteShiftError) {+ return redirect(+ "/x/resources/shifts",+ await flash(request, error(deleteShiftError, "Failed to delete shift"))+ );+ }++ return redirect(+ "/x/resources/shifts",+ await flash(request, success("Successfully deleted shift"))+ );+}++export default function DeleteShiftRoute() {+ const { shiftId } = useParams();+ const { shift } = useLoaderData<typeof loader>();+ const navigate = useNavigate();++ if (!shiftId || !shift) return null; // TODO - handle this better (404?)++ const onCancel = () => navigate("/x/resources/shifts");+ if (Array.isArray(shift.location))+ throw new Error("Shift location is an array");++ return (+ <ConfirmDelete+ action={`/x/resources/shifts/delete/${shiftId}`}+ name={shift.name}+ text={`Are you sure you want to delete the shift: ${shift.name} from ${+ shift.location?.name ?? "unknown location"+ }? This cannot be undone.`}+ onCancel={onCancel}+ />+ );+}diff --git a/apps/carbon/app/routes/x+/resources.shifts.new.tsx b/apps/carbon/app/routes/x+/resources.shifts.new.tsxnew file mode 100644index 0000000000..4e6c9bd82d--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.shifts.new.tsx@@ -0,0 +1,54 @@+import type { ActionArgs } from "@remix-run/node";+import { redirect } from "@remix-run/node";+import { validationError } from "remix-validated-form";+import { ShiftForm } from "~/interfaces/Resources/Shifts";+import { requirePermissions } from "~/services/auth";+import { shiftValidator, upsertShift } from "~/services/resources";+import { flash } from "~/services/session";+import { assertIsPost } from "~/utils/http";+import { error, success } from "~/utils/result";++export async function action({ request }: ActionArgs) {+ assertIsPost(request);+ const { client } = await requirePermissions(request, {+ create: "resources",+ });++ const validation = await shiftValidator.validate(await request.formData());++ if (validation.error) {+ return validationError(validation.error);+ }++ const createShift = await upsertShift(client, {+ ...validation.data,+ });++ if (createShift.error) {+ return redirect(+ "/x/resources/shifts",+ await flash(request, error(createShift.error, "Failed to create shift."))+ );+ }++ return redirect(+ "/x/resources/shifts",+ await flash(request, success("Shift created."))+ );+}++export default function NewShiftRoute() {+ const initialValues = {+ name: "",+ locationId: "",+ monday: true,+ tuesday: true,+ wednesday: true,+ thursday: true,+ friday: true,+ saturday: false,+ sunday: false,+ };++ return <ShiftForm initialValues={initialValues} />;+}diff --git a/apps/carbon/app/routes/x+/resources.shifts.tsx b/apps/carbon/app/routes/x+/resources.shifts.tsxnew file mode 100644index 0000000000..977075a87b--- /dev/null+++ b/apps/carbon/app/routes/x+/resources.shifts.tsx@@ -0,0 +1,54 @@+import { VStack } from "@chakra-ui/react";+import type { LoaderArgs } from "@remix-run/node";+import { redirect } from "@remix-run/node";+import { json } from "@remix-run/node";+import { Outlet, useLoaderData } from "@remix-run/react";+import { ShiftsTable, ShiftsTableFilters } from "~/interfaces/Resources/Shifts";+import { requirePermissions } from "~/services/auth";+import { flash } from "~/services/session";+import { getLocations, getShifts } from "~/services/resources";+import { getGenericQueryFilters } from "~/utils/query";+import { error } from "~/utils/result";++export async function loader({ request }: LoaderArgs) {+ const { client } = await requirePermissions(request, {+ view: "resources",+ role: "employee",+ });++ const url = new URL(request.url);+ const searchParams = new URLSearchParams(url.search);+ const name = searchParams.get("name");+ const location = searchParams.get("location");+ const { limit, offset, sorts } = getGenericQueryFilters(searchParams);++ const [shifts, locations] = await Promise.all([+ getShifts(client, { name, location, limit, offset, sorts }),+ getLocations(client),+ ]);++ if (shifts.error) {+ return redirect(+ "/x/resources",+ await flash(request, error(shifts.error, "Failed to load shifts"))+ );+ }++ return json({+ shifts: shifts.data ?? [],+ locations: locations.data ?? [],+ count: shifts.count ?? 0,+ });+}++export default function ShiftsRoute() {+ const { shifts, locations, count } = useLoaderData<typeof loader>();++ return (+ <VStack w="full" h="full" spacing={0}>+ <ShiftsTableFilters locations={locations} />+ <ShiftsTable data={shifts} count={count} />+ <Outlet />+ </VStack>+ );+}diff --git a/apps/carbon/app/routes/x+/sales.customer-types.$customerTypeId.tsx b/apps/carbon/app/routes/x+/sales.customer-types.$customerTypeId.tsxindex 87e879c0bc..63838a46e3 100644--- a/apps/carbon/app/routes/x+/sales.customer-types.$customerTypeId.tsx+++ b/apps/carbon/app/routes/x+/sales.customer-types.$customerTypeId.tsx@@ -33,7 +33,7 @@ export async function loader({ request, params }: LoaderArgs) {}return json({- customerType,+ customerType: customerType?.data ?? null,});}@@ -79,9 +79,9 @@ export default function EditCustomerTypesRoute() {const { customerType } = useLoaderData<typeof loader>();const initialValues = {- id: customerType.data?.id ?? undefined,- name: customerType.data?.name ?? "",- color: customerType.data?.color ?? "#000000",+ id: customerType?.id ?? undefined,+ name: customerType?.name ?? "",+ color: customerType?.color ?? "#000000",};return <CustomerTypeForm initialValues={initialValues} />;diff --git a/apps/carbon/app/routes/x+/users.groups.tsx b/apps/carbon/app/routes/x+/users.groups.tsxindex fc4eb9aa2e..11a28035f2 100644--- a/apps/carbon/app/routes/x+/users.groups.tsx+++ b/apps/carbon/app/routes/x+/users.groups.tsx@@ -45,6 +45,7 @@ export default function GroupsRoute() {return (<VStack w="full" h="full" spacing={0}><GroupsTableFilters />+ {/* @ts-ignore */}<GroupsTable data={groups} count={count} /><Outlet /></VStack>diff --git a/apps/carbon/app/routes/x.tsx b/apps/carbon/app/routes/x.tsxindex 20c28c570a..f7b6037e77 100644--- a/apps/carbon/app/routes/x.tsx+++ b/apps/carbon/app/routes/x.tsx@@ -67,11 +67,11 @@ export default function AuthenticatedRoute() {return (<SupabaseProvider session={session}>- <Grid h="100vh" w="100vw" templateRows="auto 1fr">- <Topbar />+ <Grid h="100vh" w="100vw" templateColumns="auto 1fr">+ <IconSidebar /><GridItem w="full" h="full">- <Grid templateColumns="auto 1fr" h="full" w="full">- <IconSidebar />+ <Grid templateRows="auto 1fr" h="full" w="full">+ <Topbar /><Flex w="full" h="full"><SkipNavContent /><VStack spacing={0} w="full" bg={useColor("gray.50")}>diff --git a/apps/carbon/app/services/resources/resources.form.ts b/apps/carbon/app/services/resources/resources.form.tsindex 4d62849047..c8ea57b571 100644--- a/apps/carbon/app/services/resources/resources.form.ts+++ b/apps/carbon/app/services/resources/resources.form.ts@@ -83,9 +83,54 @@ export const employeeAbilityValidator = withZod(}));+export const employeeJobValidator = withZod(+ z.object({+ title: z.string().min(1, { message: "Title is required" }),+ locationId: zfd.text(z.string().optional()),+ shiftId: zfd.text(z.string().optional()),+ managerId: zfd.text(z.string().optional()),+ })+);++export const locationValidator = withZod(+ z+ .object({+ id: zfd.text(z.string().optional()),+ name: z.string().min(1, { message: "Name is required" }),+ timezone: z.string().min(1, { message: "Timezone is required" }),+ latitude: zfd.numeric(z.number().optional()),+ longitude: zfd.numeric(z.number().optional()),+ })+ .superRefine(({ latitude, longitude }, ctx) => {+ if ((latitude && !longitude) || (!latitude && longitude)) {+ ctx.addIssue({+ code: "custom",+ message: "Both latitude and longitude are required",+ });+ }+ })+);+export const noteValidator = withZod(z.object({id: zfd.text(z.string().optional()),note: z.string().min(1, { message: "Note is required" }),}));++export const shiftValidator = withZod(+ z.object({+ id: zfd.text(z.string().optional()),+ name: z.string().min(1, { message: "Name is required" }),+ startTime: z.string().min(1, { message: "Start time is required" }),+ endTime: z.string().min(1, { message: "End time is required" }),+ locationId: z.string().min(1, { message: "Location is required" }),+ monday: zfd.checkbox(),+ tuesday: zfd.checkbox(),+ wednesday: zfd.checkbox(),+ thursday: zfd.checkbox(),+ friday: zfd.checkbox(),+ saturday: zfd.checkbox(),+ sunday: zfd.checkbox(),+ })+);diff --git a/apps/carbon/app/services/resources/resources.server.ts b/apps/carbon/app/services/resources/resources.server.tsindex 5f9baeffd0..6071833471 100644--- a/apps/carbon/app/services/resources/resources.server.ts+++ b/apps/carbon/app/services/resources/resources.server.ts@@ -45,6 +45,13 @@ export async function deleteEmployeeAbility(.eq("id", employeeAbilityId);}+export async function deleteLocation(+ client: SupabaseClient<Database>,+ locationId: string+) {+ return client.from("location").delete().eq("id", locationId);+}+export async function deleteNote(client: SupabaseClient<Database>,noteId: string@@ -52,6 +59,14 @@ export async function deleteNote(return client.from("userNote").update({ active: false }).eq("id", noteId);}+export async function deleteShift(+ client: SupabaseClient<Database>,+ shiftId: string+) {+ // TODO: Set all employeeShifts to null+ return client.from("shift").update({ active: false }).eq("id", shiftId);+}+export async function getAbilities(client: SupabaseClient<Database>,args: GenericQueryFilters & { name: string | null }@@ -184,7 +199,7 @@ export async function getAttributeDataTypes(client: SupabaseClient<Database>) {export async function getEmployeeAbility(client: SupabaseClient<Database>,abilityId: string,- employeeId: string+ employeeAbilityId: string) {return client.from("employeeAbility")@@ -192,11 +207,69 @@ export async function getEmployeeAbility(`id, lastTrainingDate, trainingDays, trainingCompleted, user(id, fullName, avatarUrl)`).eq("abilityId", abilityId)- .eq("id", employeeId)+ .eq("id", employeeAbilityId).eq("active", true).single();}+export async function getEmployeeAbilities(+ client: SupabaseClient<Database>,+ employeeId: string+) {+ return client+ .from("employeeAbility")+ .select(+ `id, lastTrainingDate, trainingDays, trainingCompleted, ability(id, name, curve, shadowWeeks)`+ )+ .eq("employeeId", employeeId)+ .eq("active", true);+}++export async function getEmployeeJob(+ client: SupabaseClient<Database>,+ employeeId: string+) {+ return client+ .from("employeeJob")+ .select("title, locationId, shiftId, managerId")+ .eq("id", employeeId)+ .single();+}++export async function getLocation(+ client: SupabaseClient<Database>,+ locationId: string+) {+ return client+ .from("location")+ .select(`id, name, latitude, longitude, timezone`)+ .eq("id", locationId)+ .single();+}++export async function getLocations(+ client: SupabaseClient<Database>,+ args?: GenericQueryFilters & { name: string | null }+) {+ let query = client+ .from("location")+ .select(`id, name, latitude, longitude, timezone`, { count: "exact" });++ if (args?.name) {+ query = query.ilike("name", `%${args.name}%`);+ }++ if (args) {+ query = setGenericQueryFilters(query, args, "name");+ }++ return query;+}++export async function getLocationsList(client: SupabaseClient<Database>) {+ return client.from("location").select(`id, name`);+}+export async function getNotes(client: SupabaseClient<Database>,userId: string@@ -213,6 +286,64 @@ export async function getNotes(.order("createdAt");}+export async function getShift(+ client: SupabaseClient<Database>,+ shiftId: string+) {+ return client+ .from("shift")+ .select(+ `id, name, startTime, endTime, locationId,+ monday, tuesday, wednesday, thursday, friday, saturday, sunday,+ employeeShift(user(id, fullName, avatarUrl)), location(name, timezone)`+ )+ .eq("id", shiftId)+ .eq("active", true)+ .single();+}++export async function getShifts(+ client: SupabaseClient<Database>,+ args: GenericQueryFilters & { name: string | null; location: string | null }+) {+ let query = client+ .from("shift")+ .select(+ `id, name, startTime, endTime, locationId,+ monday, tuesday, wednesday, thursday, friday, saturday, sunday,+ employeeShift(user(id, fullName, avatarUrl)), location(name, timezone)`,+ {+ count: "exact",+ }+ )+ .eq("active", true)+ .eq("employeeShift.user.active", true);++ if (args?.name) {+ query = query.ilike("name", `%${args.name}%`);+ }++ if (args.location) {+ query = query.eq("locationId", args.location);+ }++ query = setGenericQueryFilters(query, args, "locationId");+ return query;+}++export async function getShiftsList(+ client: SupabaseClient<Database>,+ locationId: string | null+) {+ let query = client.from("shift").select(`id, name`).eq("active", true);++ if (locationId) {+ query = query.eq("locationId", locationId);+ }++ return query;+}+type UserAttributeId = string;export type PersonAttributeValue = {@@ -498,3 +629,66 @@ export async function upsertEmployeeAbility(.insert([{ ...update }]).select("id");}++export async function upsertEmployeeJob(+ client: SupabaseClient<Database>,+ employeeId: string,+ employeeJob: {+ title: string | null;+ locationId: string | null;+ shiftId: string | null;+ managerId: string | null;+ }+) {+ return client+ .from("employeeJob")+ .upsert([{ id: employeeId, ...employeeJob }]);+}++export async function upsertLocation(+ client: SupabaseClient<Database>,+ location: {+ id?: string;+ name: string;+ timezone: string;+ latitude: number | null;+ longitude: number | null;+ }+) {+ const { id, ...update } = location;+ if (id) {+ return client+ .from("location")+ .update({ ...update })+ .eq("id", id);+ }+ return client.from("location").insert([update]).select("id");+}++export async function upsertShift(+ client: SupabaseClient<Database>,+ shift: {+ id?: string;+ name: string;+ startTime: string;+ endTime: string;+ locationId: string;+ monday: boolean;+ tuesday: boolean;+ wednesday: boolean;+ thursday: boolean;+ friday: boolean;+ saturday: boolean;+ sunday: boolean;+ }+) {+ const { id, ...update } = shift;+ if (id) {+ return client+ .from("shift")+ .update({ ...update })+ .eq("id", id);+ }++ return client.from("shift").insert([update]).select("id");+}diff --git a/apps/carbon/app/services/users/users.server.ts b/apps/carbon/app/services/users/users.server.tsindex bf9821ffd9..1c5b8997c9 100644--- a/apps/carbon/app/services/users/users.server.ts+++ b/apps/carbon/app/services/users/users.server.ts@@ -296,7 +296,7 @@ export async function getCurrentUser() {const { userId } = await requireAuthSession(request);- const user = await getUserById(client, userId);+ const user = await getUser(client, userId);if (user?.error || user?.data === null) {throw redirect("/x",@@ -491,10 +491,7 @@ export async function getSuppliers(return query;}-export async function getUserById(- client: SupabaseClient<Database>,- id: string-) {+export async function getUser(client: SupabaseClient<Database>, id: string) {return client.from("user").select("*")@@ -776,7 +773,7 @@ export async function resendInvite(client: SupabaseClient<Database>,userId: string): Promise<Result> {- const user = await getUserById(client, userId);+ const user = await getUser(client, userId);if (user.error || !user.data) {return error(user.error, "Failed to get user");}diff --git a/apps/carbon/app/types/index.ts b/apps/carbon/app/types/index.tsindex 49201fb6d4..b02e21d426 100644--- a/apps/carbon/app/types/index.ts+++ b/apps/carbon/app/types/index.ts@@ -20,6 +20,7 @@ export type FormActionData = Promise<export type NavItem = Omit<Route, "icon"> & {icon: ReactElement;+ color?: string;};export type Result = {diff --git a/apps/carbon/package.json b/apps/carbon/package.jsonindex ae74a754c1..bc4aca6a4a 100644--- a/apps/carbon/package.json+++ b/apps/carbon/package.json@@ -6,27 +6,27 @@"scripts": {"build": "remix build","dev": "PORT=3000 remix dev",- "start": "remix-serve api/build",- "clean": "rm -rf .cache && rm -rf node_modules && rm -rf api/build && rm -rf public/build",- "lint": "tsc && TIMING=1 eslint \"app/**/*.ts*\""+ "clean": "rm -rf .cache && rm -rf node_modules && rm -rf public/build",+ "lint": "TIMING=1 eslint \"app/**/*.ts*\"",+ "types": "tsc"},"dependencies": {"@carbon/database": "*","@carbon/logger": "*","@carbon/react": "*","@carbon/utils": "*",- "@chakra-ui/react": "^2.4.9",+ "@chakra-ui/react": "^2.5.1","@chakra-ui/skip-nav": "^2.0.13","@emotion/react": "^11.10.4","@emotion/server": "^11.10.0","@emotion/styled": "^11.10.4",- "@internationalized/date": "^3.0.2",+ "@internationalized/date": "^3.1.0","@remix-run/eslint-config": "1.13.0","@remix-run/node": "1.13.0","@remix-run/react": "1.13.0","@remix-run/vercel": "1.13.0","@remix-validated-form/with-zod": "^2.0.5",- "@supabase/supabase-js": "^2.2.1",+ "@supabase/supabase-js": "^2.8.0","@tanstack/react-table": "^8.7.3","@vercel/node": "^2.9.6","@visx/axis": "^2.18.0",@@ -41,7 +41,7 @@"@visx/shape": "^2.18.0","bullmq": "~3.7.0","d3-array": "^3.2.2",- "framer-motion": "^8.5.2",+ "framer-motion": "^10.0.0","lodash.debounce": "^4.0.8","lodash.words": "^4.2.0","performant-array-to-tree": "1.11.0",@@ -53,7 +53,7 @@"remix-flat-routes": "^0.5.7","remix-validated-form": "^4.6.8","zod": "^3.20.2",- "zod-form-data": "1.3.1"+ "zod-form-data": "2.0.0"},"devDependencies": {"@carbon/tsconfig": "*",diff --git a/apps/carbon/remix.config.js b/apps/carbon/remix.config.jsindex 530556044d..4a4f6736de 100644--- a/apps/carbon/remix.config.js+++ b/apps/carbon/remix.config.js@@ -8,10 +8,7 @@ module.exports = {// so we default back to the standard build output.server: process.env.NODE_ENV === "development" ? undefined : "./server.js",ignoredRouteFiles: ["**/*"],- // appDirectory: "app",- // assetsBuildDirectory: "public/build",- // serverBuildPath: "api/index.js",- // publicPath: "/build/",+ assetsBuildDirectory: "public/build",routes: async (defineRoutes) => {return flatRoutes("routes", defineRoutes, {basePath: "/", // optional base path (defaults to /)diff --git a/package.json b/package.jsonindex 6d517b86ef..0777f2a81c 100755--- a/package.json+++ b/package.json@@ -9,9 +9,9 @@"build": "turbo run build","build:packages": "turbo run build --filter=./packages/*","clean": "turbo run clean && rm -rf node_modules && rm -rf supabase",- "predb:rebuild": "tsx scripts/generate-schema-md.ts",- "db:rebuild": "run-s db:kill db:start setup",- "postdb:rebuild": "tsx scripts/generate-db-types.ts",+ "predb:build": "tsx scripts/generate-schema-md.ts",+ "db:build": "run-s db:kill db:start setup",+ "postdb:build": "tsx scripts/generate-db-types.ts","db:init": "turbo run db:init","db:start": "run-p db:start:database db:start:redis","db:start:database": "yarn workspace @carbon/database supabase start",diff --git a/packages/carbon-database/package.json b/packages/carbon-database/package.jsonindex dadd55e4f9..0a69d755e2 100644--- a/packages/carbon-database/package.json+++ b/packages/carbon-database/package.json@@ -22,11 +22,12 @@"db:setup": "supabase db reset","dev": "tsup --watch","lint": "TIMING=1 eslint \"src/**/*.ts*\"",- "setup": "run-s db:setup db:seed"+ "setup": "run-s db:setup db:seed",+ "deploy": "supabase link --project-ref $SUPABASE_PROJECT_ID && supabase db push"},"devDependencies": {"@carbon/tsconfig": "*",- "@supabase/supabase-js": "^2.2.1",+ "@supabase/supabase-js": "^2.8.0","@types/node": "^16.17.1","@types/uuid": "^8.3.4","dotenv": "16.0.3",diff --git a/packages/carbon-database/src/types.ts b/packages/carbon-database/src/types.tsindex 7ed0593c1f..407337cc06 100644--- a/packages/carbon-database/src/types.ts+++ b/packages/carbon-database/src/types.ts@@ -374,6 +374,46 @@ export interface Database {trainingCompleted?: boolean | null}}+ employeeJob: {+ Row: {+ id: string+ locationId: string | null+ shiftId: string | null+ managerId: string | null+ title: string | null+ }+ Insert: {+ id: string+ locationId?: string | null+ shiftId?: string | null+ managerId?: string | null+ title?: string | null+ }+ Update: {+ id?: string+ locationId?: string | null+ shiftId?: string | null+ managerId?: string | null+ title?: string | null+ }+ }+ employeeShift: {+ Row: {+ employeeId: string+ shiftId: string+ id: string+ }+ Insert: {+ employeeId: string+ shiftId: string+ id?: string+ }+ Update: {+ employeeId?: string+ shiftId?: string+ id?: string+ }+ }employeeType: {Row: {name: string@@ -490,6 +530,29 @@ export interface Database {createdAt?: string}}+ location: {+ Row: {+ name: string+ timezone: string+ latitude: number | null+ longitude: number | null+ id: string+ }+ Insert: {+ name: string+ timezone: string+ latitude?: number | null+ longitude?: number | null+ id?: string+ }+ Update: {+ name?: string+ timezone?: string+ latitude?: number | null+ longitude?: number | null+ id?: string+ }+ }membership: {Row: {groupId: string@@ -539,6 +602,53 @@ export interface Database {fts?: unknown | null}}+ shift: {+ Row: {+ name: string+ startTime: string+ endTime: string+ locationId: string+ id: string+ sunday: boolean+ monday: boolean+ tuesday: boolean+ wednesday: boolean+ thursday: boolean+ friday: boolean+ saturday: boolean+ active: boolean+ }+ Insert: {+ name: string+ startTime: string+ endTime: string+ locationId: string+ id?: string+ sunday?: boolean+ monday?: boolean+ tuesday?: boolean+ wednesday?: boolean+ thursday?: boolean+ friday?: boolean+ saturday?: boolean+ active?: boolean+ }+ Update: {+ name?: string+ startTime?: string+ endTime?: string+ locationId?: string+ id?: string+ sunday?: boolean+ monday?: boolean+ tuesday?: boolean+ wednesday?: boolean+ thursday?: boolean+ friday?: boolean+ saturday?: boolean+ active?: boolean+ }+ }supplier: {Row: {name: stringdiff --git a/packages/carbon-database/supabase/migrations/20230224035103_shifts.sql b/packages/carbon-database/supabase/migrations/20230224035103_shifts.sqlnew file mode 100644index 0000000000..a196789c8d--- /dev/null+++ b/packages/carbon-database/supabase/migrations/20230224035103_shifts.sql@@ -0,0 +1,175 @@+CREATE TABLE "location" (+ "id" TEXT NOT NULL DEFAULT xid(),+ "name" TEXT NOT NULL,+ "timezone" TEXT NOT NULL,+ "latitude" NUMERIC,+ "longitude" NUMERIC,++ CONSTRAINT "location_pkey" PRIMARY KEY ("id")+);++ALTER TABLE "location" ENABLE ROW LEVEL SECURITY;++CREATE POLICY "Employees can view locations" ON "location"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert locations" ON "location"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update locations" ON "location"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete locations" ON "location"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+++CREATE TABLE "shift" (+ "id" TEXT NOT NULL DEFAULT xid(),+ "name" TEXT NOT NULL,+ "startTime" TIME NOT NULL,+ "endTime" TIME NOT NULL,+ "locationId" TEXT NOT NULL,+ "sunday" BOOLEAN NOT NULL DEFAULT false,+ "monday" BOOLEAN NOT NULL DEFAULT false,+ "tuesday" BOOLEAN NOT NULL DEFAULT false,+ "wednesday" BOOLEAN NOT NULL DEFAULT false,+ "thursday" BOOLEAN NOT NULL DEFAULT false,+ "friday" BOOLEAN NOT NULL DEFAULT false,+ "saturday" BOOLEAN NOT NULL DEFAULT false,+ "active" BOOLEAN NOT NULL DEFAULT true,++ CONSTRAINT "shifts_pkey" PRIMARY KEY ("id"),+ CONSTRAINT "shifts_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "location"("id") ON DELETE CASCADE ON UPDATE CASCADE+);++ALTER TABLE "shift" ENABLE ROW LEVEL SECURITY;++CREATE POLICY "Employees can view shifts" ON "shift"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert shifts" ON "shift"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update shifts" ON "shift"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete shifts" ON "shift"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+++CREATE TABLE "employeeShift" (+ "id" TEXT NOT NULL DEFAULT xid(),+ "employeeId" TEXT NOT NULL,+ "shiftId" TEXT NOT NULL,++ CONSTRAINT "employeeShift_pkey" PRIMARY KEY ("id"),+ CONSTRAINT "employeeShift_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeShift_shiftId_fkey" FOREIGN KEY ("shiftId") REFERENCES "shift"("id") ON DELETE CASCADE ON UPDATE CASCADE,++ CONSTRAINT uq_employeeShift_employeeId_shiftId UNIQUE ( "employeeId", "shiftId")+);++ALTER TABLE "employeeShift" ENABLE ROW LEVEL SECURITY;++CREATE POLICY "Employees can view employee shifts" ON "employeeShift"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert employee shifts" ON "employeeShift"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update employee shifts" ON "employeeShift"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete employee shifts" ON "employeeShift"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );+++CREATE TABLE "employeeJob" (+ "id" TEXT NOT NULL,+ "locationId" TEXT,+ "shiftId" TEXT,+ "managerId" TEXT,+ "title" TEXT,++ CONSTRAINT "employeeJob_pkey" PRIMARY KEY ("id"),+ CONSTRAINT "employeeJob_id_fkey" FOREIGN KEY ("id") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeJob_locationId_fkey" FOREIGN KEY ("locationId") REFERENCES "location"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeJob_shiftId_fkey" FOREIGN KEY ("shiftId") REFERENCES "shift"("id") ON DELETE CASCADE ON UPDATE CASCADE,+ CONSTRAINT "employeeJob_managerId_fkey" FOREIGN KEY ("managerId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE CASCADE+);++CREATE POLICY "Employees can view employee jobs" ON "employeeJob"+ FOR SELECT+ USING (+ auth.role() = 'authenticated'+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_create can insert employee jobs" ON "employeeJob"+ FOR INSERT+ WITH CHECK (+ coalesce(get_my_claim('resources_create')::boolean,false)+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+);++CREATE POLICY "Employees with resources_update can update employee jobs" ON "employeeJob"+ FOR UPDATE+ USING (+ coalesce(get_my_claim('resources_update')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );++CREATE POLICY "Employees with resources_delete can delete employee jobs" ON "employeeJob"+ FOR DELETE+ USING (+ coalesce(get_my_claim('resources_delete')::boolean, false) = true+ AND (get_my_claim('role'::text)) = '"employee"'::jsonb+ );\ No newline at end of filediff --git a/packages/carbon-react/package.json b/packages/carbon-react/package.jsonindex d8414c0320..f43a7da810 100644--- a/packages/carbon-react/package.json+++ b/packages/carbon-react/package.json@@ -21,21 +21,21 @@"preset": "@carbon/jest/node"},"dependencies": {- "@chakra-ui/react": "^2.4.9",+ "@chakra-ui/react": "^2.5.1","@emotion/react": "^11.10.4","@emotion/styled": "^11.10.4",- "@internationalized/date": "^3.0.2",- "@react-aria/button": "^3.6.4",- "@react-aria/calendar": "^3.0.5",- "@react-aria/datepicker": "^3.2.1",- "@react-stately/calendar": "^3.0.5",- "@react-stately/datepicker": "^3.2.1",- "@react-types/button": "^3.7.0",- "@react-types/calendar": "^3.0.5",- "@react-types/datepicker": "^3.1.4",- "framer-motion": "^8.5.2",+ "@internationalized/date": "^3.1.0",+ "@react-aria/button": "^3.7.0",+ "@react-aria/calendar": "^3.1.0",+ "@react-aria/datepicker": "^3.3.0",+ "@react-stately/calendar": "^3.1.0",+ "@react-stately/datepicker": "^3.3.0",+ "@react-types/button": "^3.7.1",+ "@react-types/calendar": "^3.1.0",+ "@react-types/datepicker": "^3.2.0",+ "framer-motion": "^10.0.0",+ "is-hotkey": "^0.2.0","react-colorful": "^5.6.1",- "react-hook-form": "^7.37.0","react-icons": "^4.7.1","react-select": "^5.5.1"},diff --git a/packages/carbon-react/src/Inputs/Date/components/DateSegment.tsx b/packages/carbon-react/src/Inputs/Date/components/DateSegment.tsxindex 8775ed80f1..c9c1875ee0 100644--- a/packages/carbon-react/src/Inputs/Date/components/DateSegment.tsx+++ b/packages/carbon-react/src/Inputs/Date/components/DateSegment.tsx@@ -4,7 +4,7 @@ import type {DateSegment as DateSegmentType,useDateFieldState,} from "@react-stately/datepicker";-import { useRef } from "react";+import { useId, useRef } from "react";import { useColor } from "../../../hooks";export const DateSegment = ({@@ -14,9 +14,17 @@ export const DateSegment = ({segment: DateSegmentType;state: ReturnType<typeof useDateFieldState>;}) => {+ const instanceId = useId();const ref = useRef<HTMLDivElement>(null);const { segmentProps } = useDateSegment(segment, state, ref);+ if ("id" in segmentProps && segmentProps.id) {+ segmentProps.id = instanceId;+ }+ if ("aria-describedby" in segmentProps && segmentProps["aria-describedby"]) {+ segmentProps["aria-describedby"] = instanceId;+ }+const lighter = useColor("gray.500");const light = useColor("gray.600");const black = useColor("black");@@ -24,6 +32,7 @@ export const DateSegment = ({return (<Box{...segmentProps}+ id={instanceId}ref={ref}style={{...segmentProps.style,diff --git a/packages/carbon-react/src/Inputs/Date/components/StyledField.tsx b/packages/carbon-react/src/Inputs/Date/components/StyledField.tsxindex efd4b158b2..4d864626a8 100644--- a/packages/carbon-react/src/Inputs/Date/components/StyledField.tsx+++ b/packages/carbon-react/src/Inputs/Date/components/StyledField.tsx@@ -1,5 +1,5 @@import { Box, useColorModeValue } from "@chakra-ui/react";-import { forwardRef } from "react";+import { forwardRef, useId } from "react";import type { HTMLAttributes } from "react";export type StyledFieldProps = HTMLAttributes<HTMLElement> & {@@ -8,6 +8,13 @@ export type StyledFieldProps = HTMLAttributes<HTMLElement> & {export const StyledField = forwardRef<HTMLDivElement, StyledFieldProps>(function Field({ children, ...otherProps }, ref) {+ const instanceId = useId();+ if ("id" in otherProps && otherProps.id) {+ otherProps.id = instanceId;+ }+ if ("aria-describedby" in otherProps && otherProps["aria-describedby"]) {+ otherProps["aria-describedby"] = instanceId;+ }return (<Boxposition="relative"@@ -24,7 +31,7 @@ export const StyledField = forwardRef<HTMLDivElement, StyledFieldProps>(}}_focusWithin={{borderColor: "gray.500",- boxShadow: "0 0 0 1px var(--chakra-colors-blue-500)",+ boxShadow: "0 0 0 2px var(--chakra-ui-focus-ring-color)",}}{...otherProps}ref={ref}diff --git a/packages/carbon-react/src/Inputs/Select/components/input.tsx b/packages/carbon-react/src/Inputs/Select/components/input.tsxindex 9ff073756d..0fcea9e4d7 100644--- a/packages/carbon-react/src/Inputs/Select/components/input.tsx+++ b/packages/carbon-react/src/Inputs/Select/components/input.tsx@@ -70,7 +70,7 @@ const Input = <className={cx({ input: true }, inputClassName)}ref={innerRef}sx={inputSx}- isDisabled={isDisabled}+ disabled={isDisabled}readOnly={isReadOnly ? true : undefined}aria-readonly={isReadOnly ? true : undefined}aria-required={isRequired ? true : undefined}diff --git a/packages/carbon-react/src/Inputs/index.ts b/packages/carbon-react/src/Inputs/index.tsindex 73002ee3b0..7e63782db2 100644--- a/packages/carbon-react/src/Inputs/index.ts+++ b/packages/carbon-react/src/Inputs/index.ts@@ -13,7 +13,7 @@ export {DatePicker,DateTimePicker,DateRangePicker,- TimePicker,Select,+ TimePicker,createFilter,};diff --git a/packages/carbon-react/src/Overlay/ActionMenu/ActionMenu.tsx b/packages/carbon-react/src/Overlay/ActionMenu/ActionMenu.tsxindex 8387926177..6fc527a309 100644--- a/packages/carbon-react/src/Overlay/ActionMenu/ActionMenu.tsx+++ b/packages/carbon-react/src/Overlay/ActionMenu/ActionMenu.tsx@@ -12,7 +12,7 @@ const ActionMenu = ({ children, disabled, icon }: ActionMenuProps) => {<Menu isLazy><MenuButtonas={IconButton}- aria-label="Action context menu for row"+ aria-label="Expand options"icon={icon ? icon : <BsThreeDotsVertical />}colorScheme="gray"isDisabled={disabled}diff --git a/packages/carbon-react/src/Theme/fonts.ts b/packages/carbon-react/src/Theme/fonts.tsnew file mode 100644index 0000000000..095e8fefaf--- /dev/null+++ b/packages/carbon-react/src/Theme/fonts.ts@@ -0,0 +1,4 @@+export const fonts = {+ heading: `'SF Pro Display', Inter var,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'`,+ body: `'SF Pro Display',ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Noto Sans',sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'`,+};diff --git a/packages/carbon-react/src/Theme/theme.ts b/packages/carbon-react/src/Theme/theme.tsindex c1e98a3d70..3679218cf3 100644--- a/packages/carbon-react/src/Theme/theme.ts+++ b/packages/carbon-react/src/Theme/theme.ts@@ -3,9 +3,12 @@ import {focusRingFlushed,focusRingOutlined,} from "./focusRing";+import { fonts } from "./fonts";import { colors } from "./palette";+export const theme = {+ fonts,colors,styles: {global: {diff --git a/packages/carbon-react/src/index.tsx b/packages/carbon-react/src/index.tsxindex f69c89eff9..4c527dc242 100644--- a/packages/carbon-react/src/index.tsx+++ b/packages/carbon-react/src/index.tsx@@ -3,8 +3,8 @@ import {DatePicker,DateTimePicker,DateRangePicker,- TimePicker,Select,+ TimePicker,createFilter,} from "./Inputs";import Loading from "./Loading";diff --git a/packages/carbon-utils/src/date.ts b/packages/carbon-utils/src/date.tsindex 269481ac59..81a5fa0e64 100644--- a/packages/carbon-utils/src/date.ts+++ b/packages/carbon-utils/src/date.ts@@ -12,6 +12,23 @@ const DIVISIONS: { amount: number; name: Intl.RelativeTimeFormatUnit }[] = [{ amount: Number.POSITIVE_INFINITY, name: "years" },];+const defaultFormatOptions: Intl.DateTimeFormatOptions = {+ dateStyle: "medium",+};++export function formatDate(+ isoString?: string | null,+ options?: Intl.DateTimeFormatOptions+) {+ if (!isoString) return "";+ const date = new Date(isoString);++ return new Intl.DateTimeFormat(+ undefined,+ options || defaultFormatOptions+ ).format(date);+}+export function formatTimeAgo(isoString: string) {let duration = (new Date(isoString).getTime() - new Date().getTime()) / 1000;diff --git a/packages/carbon-utils/src/index.ts b/packages/carbon-utils/src/index.tsindex 174510af8a..61a46aa196 100644--- a/packages/carbon-utils/src/index.ts+++ b/packages/carbon-utils/src/index.ts@@ -1,3 +1,5 @@export * from "./date";export * from "./math";export * from "./ssr";+export * from "./types";+export * from "./url";diff --git a/packages/carbon-utils/src/types.ts b/packages/carbon-utils/src/types.tsnew file mode 100644index 0000000000..e33d5a807e--- /dev/null+++ b/packages/carbon-utils/src/types.ts@@ -0,0 +1,2 @@+export type PickPartial<T, K extends keyof T> = Omit<T, K> &+ Partial<Pick<T, K>>;diff --git a/packages/carbon-utils/src/url.ts b/packages/carbon-utils/src/url.tsnew file mode 100644index 0000000000..c6fd283f1d--- /dev/null+++ b/packages/carbon-utils/src/url.ts@@ -0,0 +1,11 @@+export const isUrl = (str: string) => {+ let url;++ try {+ url = new URL(str);+ } catch (_) {+ return false;+ }++ return url.protocol === "http:" || url.protocol === "https:";+};diff --git a/turbo.json b/turbo.jsonindex 5d0edcdcf8..ea2e288aeb 100644--- a/turbo.json+++ b/turbo.json@@ -2,13 +2,7 @@"$schema": "https://turborepo.org/schema.json","pipeline": {"build": {- "outputs": [- "dist/**",- ".next/**",- "build/**",- "api/**",- "public/build/**"- ],+ "outputs": ["dist/**", "build/**", "api/**", "public/build/**"],"dependsOn": ["^build"]},"test": {@@ -20,6 +14,7 @@"outputs": []},"dev": {+ "dependsOn": ["^build"],"cache": false},"clean": {@@ -43,24 +38,20 @@"cache": false},"db:push": {- "outputs": [],- "dependsOn": ["^generate"]+ "outputs": []},"db:pull": {"outputs": []},"db:seed": {"outputs": [],- "dependsOn": ["^generate"],"cache": false},"db:migrate:force": {"outputs": []},- "generate": {- "dependsOn": ["^generate"]- },"setup": {+ "cache": false,"outputs": []}}diff --git a/yarn.lock b/yarn.lockindex 397f71fd7d..2ff04034eb 100644--- a/yarn.lock+++ b/yarn.lock@@ -1160,10 +1160,10 @@resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39"integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==-"@chakra-ui/[email protected]":- version "2.1.8"- resolved "https://registry.yarnpkg.com/@chakra-ui/accordion/-/accordion-2.1.8.tgz#3f957f88c23b3b9a811363094ebf768afbebbcdf"- integrity sha512-RTXYhL85dUSVUEurDicxS76JaCXa/L4FYWPAxPSisbZtFvL+/gvoFMcGtT8ZRsJwFWaevmkD+57EmOYCWlLL1A==+"@chakra-ui/[email protected]":+ version "2.1.9"+ resolved "https://registry.yarnpkg.com/@chakra-ui/accordion/-/accordion-2.1.9.tgz#20fa86d94dc034251df2f7c8595ae4dd541a29d9"+ integrity sha512-a9CKIAUHezc0f5FR/SQ4GVxnWuIb2HbDTxTEKTp58w/J9pecIbJaNrJ5TUZ0MVbDU9jkgO9RsZ29jkja8PomAw==dependencies:"@chakra-ui/descendant" "3.0.13""@chakra-ui/icon" "3.0.16"@@ -1188,10 +1188,10 @@resolved "https://registry.yarnpkg.com/@chakra-ui/anatomy/-/anatomy-2.1.2.tgz#ea66b1841e7195da08ddc862daaa3f3e56e565f5"integrity sha512-pKfOS/mztc4sUXHNc8ypJ1gPWSolWT770jrgVRfolVbYlki8y5Y+As996zMF6k5lewTu6j9DQequ7Cc9a69IVQ==-"@chakra-ui/[email protected]":- version "2.2.4"- resolved "https://registry.yarnpkg.com/@chakra-ui/avatar/-/avatar-2.2.4.tgz#1f96374ab8d981f293051dae633491781f18e802"- integrity sha512-OUuZAhabW0FgmFVt0djH3cVR8p9bKC3vYT3Ol2lrUz3hbf4LrjU5EzmMHmQvcbSs6bNDxS3k9hnswLebOFctJQ==+"@chakra-ui/[email protected]":+ version "2.2.5"+ resolved "https://registry.yarnpkg.com/@chakra-ui/avatar/-/avatar-2.2.5.tgz#50eb7cc5a172d394b301fa0abd5f607b7f5d3563"+ integrity sha512-TEHXuGE79+fEn61qJ7J/A0Ec+WjyNwobrDTATcLg9Zx2/WEMmZNfrWIAlI5ANQAwVbdSWeGVbyoLAK5mbcrE0A==dependencies:"@chakra-ui/image" "2.0.15""@chakra-ui/react-children-utils" "2.0.6"@@ -1207,10 +1207,10 @@"@chakra-ui/react-context" "2.0.7""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.0.7"- resolved "https://registry.yarnpkg.com/@chakra-ui/breakpoint-utils/-/breakpoint-utils-2.0.7.tgz#8f35e45b813f2ea855ea89fcbad4921cd849774c"- integrity sha512-YBwsDPMlaMRZ4fKc2WyIIaUmByzkiP4ozxMJIjJRPhedzSho7FOZuE8532q+97f2SyY8z/yZPJ41q4GdwHI/HQ==+"@chakra-ui/[email protected]":+ version "2.0.8"+ resolved "https://registry.yarnpkg.com/@chakra-ui/breakpoint-utils/-/breakpoint-utils-2.0.8.tgz#750d3712668b69f6e8917b45915cee0e08688eed"+ integrity sha512-Pq32MlEX9fwb5j5xx8s18zJMARNHlQZH2VH1RZgfgRDpp7DcEgtRW5AInfN5CfqdHLO1dGxA7I3MqEuL5JnIsA==dependencies:"@chakra-ui/shared-utils" "2.0.5"@@ -1341,15 +1341,15 @@"@chakra-ui/react-use-merge-refs" "2.0.7""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.1.5"- resolved "https://registry.yarnpkg.com/@chakra-ui/hooks/-/hooks-2.1.5.tgz#9d619194257a653998f66ff4ed8ac63b7e3a2e2b"- integrity sha512-E3bGwxjXvMUc9ev3egctrRi5fnER5xXbWUsivA3iFRdUrkfX+19JLUfP1TURzv7UQG8X1AxKSwfqIsYyeHrdmQ==+"@chakra-ui/[email protected]":+ version "2.1.6"+ resolved "https://registry.yarnpkg.com/@chakra-ui/hooks/-/hooks-2.1.6.tgz#4d829535868148912ef7a4ff274e03b8d1cf7c72"+ integrity sha512-oMSOeoOF6/UpwTVlDFHSROAA4hPY8WgJ0erdHs1ZkuwAwHv7UzjDkvrb6xYzAAH9qHoFzc5RIBm6jVoh3LCc+Q==dependencies:"@chakra-ui/react-utils" "2.0.12""@chakra-ui/utils" "2.0.15"- compute-scroll-into-view "1.0.14"- copy-to-clipboard "3.3.1"+ compute-scroll-into-view "1.0.20"+ copy-to-clipboard "3.3.3""@chakra-ui/[email protected]":version "3.0.16"@@ -1366,10 +1366,10 @@"@chakra-ui/react-use-safe-layout-effect" "2.0.5""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.0.19"- resolved "https://registry.yarnpkg.com/@chakra-ui/input/-/input-2.0.19.tgz#96a479ff17f36bb8ad8e2f39e15c7db1305746ec"- integrity sha512-wV+EG6+F9GngMPpLHBCuxXTNttHihFTT3DpbJnmID9LuAPg7YkWcTNTvpAzC0/Sz9KrcTR9RhSu9a5cvxkkXpw==+"@chakra-ui/[email protected]":+ version "2.0.20"+ resolved "https://registry.yarnpkg.com/@chakra-ui/input/-/input-2.0.20.tgz#8db3ec46b52be901c94599b3659a9003bdb2dd07"+ integrity sha512-ypmsy4n4uNBVgn6Gd24Zrpi+qRf/T9WEzWkysuYC9Qfxo+i7yuf3snp7XmBy8KSGVSiXE11eO8ZN5oCg6Xg0jg==dependencies:"@chakra-ui/form-control" "2.0.17""@chakra-ui/object-utils" "2.0.8"@@ -1377,12 +1377,12 @@"@chakra-ui/react-context" "2.0.7""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.1.15"- resolved "https://registry.yarnpkg.com/@chakra-ui/layout/-/layout-2.1.15.tgz#2238ef7a0c515f0668cefcd9967bb9a179c04714"- integrity sha512-dJYzBm2ywRYNmtadot/5ii+Gztsx8a9Jd+gFXiSLcfQs/QRdboqMyr/0O+6RY2sI7Mwvyo6uo9AvGJBU1djrNQ==+"@chakra-ui/[email protected]":+ version "2.1.16"+ resolved "https://registry.yarnpkg.com/@chakra-ui/layout/-/layout-2.1.16.tgz#9d90f25cf9f0537d19cd36a417f7ddc1461e8591"+ integrity sha512-QFS3feozIGsvB0H74lUocev55aRF26eNrdmhfJifwikZAiq+zzZAMdBdNU9UJhHClnMOU8/iGZ0MF7ti4zQS1A==dependencies:- "@chakra-ui/breakpoint-utils" "2.0.7"+ "@chakra-ui/breakpoint-utils" "2.0.8""@chakra-ui/icon" "3.0.16""@chakra-ui/object-utils" "2.0.8""@chakra-ui/react-children-utils" "2.0.6"@@ -1399,19 +1399,19 @@resolved "https://registry.yarnpkg.com/@chakra-ui/live-region/-/live-region-2.0.13.tgz#1d00a637b74372d1ee0b215c649ebd4a33893e58"integrity sha512-Ja+Slk6ZkxSA5oJzU2VuGU7TpZpbMb/4P4OUhIf2D30ctmIeXkxTWw1Bs1nGJAVtAPcGS5sKA+zb89i8g+0cTQ==-"@chakra-ui/[email protected]":- version "3.2.11"- resolved "https://registry.yarnpkg.com/@chakra-ui/media-query/-/media-query-3.2.11.tgz#8adfabff4a0b9d17fb6d8f9538cc7358326ef00e"- integrity sha512-AylT/qIpbCOvcjvURMdItLvAnaEYZynatvVJUQ8TYcQO2KHBt8BBhQ9umrmNAZFr8y7CRcg7PdvK+g+yOkq22g==+"@chakra-ui/[email protected]":+ version "3.2.12"+ resolved "https://registry.yarnpkg.com/@chakra-ui/media-query/-/media-query-3.2.12.tgz#75e31f3c88818e687a4d90a2993286c2c3ca2453"+ integrity sha512-8pSLDf3oxxhFrhd40rs7vSeIBfvOmIKHA7DJlGUC/y+9irD24ZwgmCtFnn+y3gI47hTJsopbSX+wb8nr7XPswA==dependencies:- "@chakra-ui/breakpoint-utils" "2.0.7"+ "@chakra-ui/breakpoint-utils" "2.0.8""@chakra-ui/react-env" "3.0.0""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.1.8"- resolved "https://registry.yarnpkg.com/@chakra-ui/menu/-/menu-2.1.8.tgz#fdc16ffc57aef14b9d76920923072c66aedfba33"- integrity sha512-3Ysk1HwJTv6mzkT1dgsNObZnuZiySPJwLdmmCdv8+rpto8u0oCN+etenN0s7HQlAddvHxZ2Sm+1yKZOu6Wimrg==+"@chakra-ui/[email protected]":+ version "2.1.9"+ resolved "https://registry.yarnpkg.com/@chakra-ui/menu/-/menu-2.1.9.tgz#2f3239a9b2855fd77fc317d9e6b904c1ad50d7c6"+ integrity sha512-ue5nD4QJcl3H3UwN0zZNJmH89XUebnvEdW6THAUL41hDjJ0J/Fjpg9Sgzwug2aBbBXBNbVMsUuhcCj6x91d+IQ==dependencies:"@chakra-ui/clickable" "2.0.14""@chakra-ui/descendant" "3.0.13"@@ -1526,15 +1526,15 @@dependencies:"@chakra-ui/react-context" "2.0.7"-"@chakra-ui/[email protected]":- version "2.1.0"- resolved "https://registry.yarnpkg.com/@chakra-ui/provider/-/provider-2.1.0.tgz#93fffd1d2c2582555e50a5da8b924c51ceff0597"- integrity sha512-+NUBHOkqWFpi/unwqhUQh1t/S1+TMZBTz+FiTeWycSUicdFsGCcTe6eQNLu6X5C8gYx9FGXG4ESx7HCTNXQj7w==+"@chakra-ui/[email protected]":+ version "2.1.2"+ resolved "https://registry.yarnpkg.com/@chakra-ui/provider/-/provider-2.1.2.tgz#b025cb718826b003b3c9535b6961e8f3be70ebd5"+ integrity sha512-4lLlz8QuJv00BhfyKzWpzfoti9MDOdJ/MqXixJV/EZ02RMBOdE9qy9bSz/WckPC2MVhtRUuwMkxH+0QY21PXuw==dependencies:"@chakra-ui/css-reset" "2.0.12""@chakra-ui/portal" "2.0.15""@chakra-ui/react-env" "3.0.0"- "@chakra-ui/system" "2.4.0"+ "@chakra-ui/system" "2.5.1""@chakra-ui/utils" "2.0.15""@chakra-ui/[email protected]":@@ -1665,12 +1665,12 @@resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-safe-layout-effect/-/react-use-safe-layout-effect-2.0.5.tgz#6cf388c37fd2a42b5295a292e149b32f860a00a7"integrity sha512-MwAQBz3VxoeFLaesaSEN87reVNVbjcQBDex2WGexAg6hUB6n4gc1OWYH/iXp4tzp4kuggBNhEHkk9BMYXWfhJQ==-"@chakra-ui/[email protected]":- version "2.0.8"- resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-size/-/react-use-size-2.0.8.tgz#5f5b8ccf587d864c6311705b1152310e4779b57a"- integrity sha512-OdCxVPm8ekPVn9R6S1OtfLVNRVZ0G1tcfA2/oY1c55aXbm/R0TFZ+twSoy+X+aRFhqydmE7DRsKyW2ysXuuVBw==+"@chakra-ui/[email protected]":+ version "2.0.9"+ resolved "https://registry.yarnpkg.com/@chakra-ui/react-use-size/-/react-use-size-2.0.9.tgz#00717867b98a24c3bdcfaa0c3e70732404193486"+ integrity sha512-Jce7QmO1jlQZq+Y77VKckWzroRnajChzUQ8xhLQZO6VbYvrpg3cu+X2QCz3G+MZzB+1/hnvvAqmZ+uJLd8rEJg==dependencies:- "@zag-js/element-size" "0.3.0"+ "@zag-js/element-size" "0.3.1""@chakra-ui/[email protected]":version "2.0.5"@@ -1691,14 +1691,14 @@dependencies:"@chakra-ui/utils" "2.0.15"-"@chakra-ui/react@^2.4.9":- version "2.4.9"- resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.4.9.tgz#7c80c462aeaec7f1bd91ec6439940e3ef5c66ad9"- integrity sha512-lY++xW+zhLp0zQr2Sf5phjYMIphOmjGV/o5A1oDQPrqwLJFm4mL2+eXvpAFrLnZoh00qa4iBqarxJCW7qpHeiA==+"@chakra-ui/react@^2.5.1":+ version "2.5.1"+ resolved "https://registry.yarnpkg.com/@chakra-ui/react/-/react-2.5.1.tgz#05414db2b512bd4402e42eecc6b915d85102c576"+ integrity sha512-ugkaqfcNMb9L4TkalWiF3rnqfr0TlUUD46JZaDIZiORVisaSwXTZTQrVfG40VghhaJT28rnC5WtiE8kd567ZBQ==dependencies:- "@chakra-ui/accordion" "2.1.8"+ "@chakra-ui/accordion" "2.1.9""@chakra-ui/alert" "2.0.17"- "@chakra-ui/avatar" "2.2.4"+ "@chakra-ui/avatar" "2.2.5""@chakra-ui/breadcrumb" "2.1.4""@chakra-ui/button" "2.0.16""@chakra-ui/card" "2.1.6"@@ -1708,15 +1708,16 @@"@chakra-ui/counter" "2.0.14""@chakra-ui/css-reset" "2.0.12""@chakra-ui/editable" "2.0.19"+ "@chakra-ui/focus-lock" "2.0.16""@chakra-ui/form-control" "2.0.17"- "@chakra-ui/hooks" "2.1.5"+ "@chakra-ui/hooks" "2.1.6""@chakra-ui/icon" "3.0.16""@chakra-ui/image" "2.0.15"- "@chakra-ui/input" "2.0.19"- "@chakra-ui/layout" "2.1.15"+ "@chakra-ui/input" "2.0.20"+ "@chakra-ui/layout" "2.1.16""@chakra-ui/live-region" "2.0.13"- "@chakra-ui/media-query" "3.2.11"- "@chakra-ui/menu" "2.1.8"+ "@chakra-ui/media-query" "3.2.12"+ "@chakra-ui/menu" "2.1.9""@chakra-ui/modal" "2.2.9""@chakra-ui/number-input" "2.0.18""@chakra-ui/pin-input" "2.0.19"@@ -1724,24 +1725,24 @@"@chakra-ui/popper" "3.0.13""@chakra-ui/portal" "2.0.15""@chakra-ui/progress" "2.1.5"- "@chakra-ui/provider" "2.1.0"+ "@chakra-ui/provider" "2.1.2""@chakra-ui/radio" "2.0.19""@chakra-ui/react-env" "3.0.0""@chakra-ui/select" "2.0.18"- "@chakra-ui/skeleton" "2.0.23"- "@chakra-ui/slider" "2.0.20"+ "@chakra-ui/skeleton" "2.0.24"+ "@chakra-ui/slider" "2.0.21""@chakra-ui/spinner" "2.0.13""@chakra-ui/stat" "2.0.17"- "@chakra-ui/styled-system" "2.5.2"+ "@chakra-ui/styled-system" "2.6.1""@chakra-ui/switch" "2.0.22"- "@chakra-ui/system" "2.4.0"+ "@chakra-ui/system" "2.5.1""@chakra-ui/table" "2.0.16""@chakra-ui/tabs" "2.1.8""@chakra-ui/tag" "2.0.17""@chakra-ui/textarea" "2.0.18""@chakra-ui/theme" "2.2.5"- "@chakra-ui/theme-utils" "2.0.9"- "@chakra-ui/toast" "5.0.1"+ "@chakra-ui/theme-utils" "2.0.11"+ "@chakra-ui/toast" "6.0.1""@chakra-ui/tooltip" "2.2.6""@chakra-ui/transition" "2.0.15""@chakra-ui/utils" "2.0.15"@@ -1760,12 +1761,12 @@resolved "https://registry.yarnpkg.com/@chakra-ui/shared-utils/-/shared-utils-2.0.5.tgz#cb2b49705e113853647f1822142619570feba081"integrity sha512-4/Wur0FqDov7Y0nCXl7HbHzCg4aq86h+SXdoUeuCMD3dSj7dpsVnStLYhng1vxvlbUnLpdF4oz5Myt3i/a7N3Q==-"@chakra-ui/[email protected]":- version "2.0.23"- resolved "https://registry.yarnpkg.com/@chakra-ui/skeleton/-/skeleton-2.0.23.tgz#027892ed5a7c7676a40fb49ad553000d35bb293a"- integrity sha512-iMK50PlC9kR52v8tZWSKnZTJsOpZrqXOXaR9r/0Ry3xhdMq5hGkcigA+zKy/ZEglbMZ2CG9Fdtvi2vQurE1VZw==+"@chakra-ui/[email protected]":+ version "2.0.24"+ resolved "https://registry.yarnpkg.com/@chakra-ui/skeleton/-/skeleton-2.0.24.tgz#dc9dcca6fc43005544fabfd38a444943b0a29cad"+ integrity sha512-1jXtVKcl/jpbrJlc/TyMsFyI651GTXY5ma30kWyTXoby2E+cxbV6OR8GB/NMZdGxbQBax8/VdtYVjI0n+OBqWA==dependencies:- "@chakra-ui/media-query" "3.2.11"+ "@chakra-ui/media-query" "3.2.12""@chakra-ui/react-use-previous" "2.0.5""@chakra-ui/shared-utils" "2.0.5"@@ -1774,10 +1775,10 @@resolved "https://registry.yarnpkg.com/@chakra-ui/skip-nav/-/skip-nav-2.0.13.tgz#bd84d035c1ecd8c7c728c5bc368d9b03fe11d6d4"integrity sha512-UmFjGlZhSDkFz7OizweG27bs+Ch9dDiibmXQ20lH6qW8k7aZ9IkdIJz9vsFzpbeECsVC6V5D461BoMGjiok/7A==-"@chakra-ui/[email protected]":- version "2.0.20"- resolved "https://registry.yarnpkg.com/@chakra-ui/slider/-/slider-2.0.20.tgz#db57631686f7f3cf40dfe27ecebad2484eb83290"- integrity sha512-5Q+9s6bIjI8GIp7YRHqt5hT678p7lCIdA/zB6c/fCp+MvOInxx4LiJZvNuaw0HX6z6bC7R/skIhmIjsgSI3MNw==+"@chakra-ui/[email protected]":+ version "2.0.21"+ resolved "https://registry.yarnpkg.com/@chakra-ui/slider/-/slider-2.0.21.tgz#f65b15bf0d5f827699ff9a2d6faee35006e2bfce"+ integrity sha512-Mm76yJxEqJl21+3waEcKg3tM8Y4elJ7mcViN6Brj35PTfzUJfSJxeBGo1nLPJ+X5jLj7o/L4kfBmUk3lY4QYEQ==dependencies:"@chakra-ui/number-utils" "2.0.7""@chakra-ui/react-context" "2.0.7"@@ -1787,7 +1788,7 @@"@chakra-ui/react-use-latest-ref" "2.0.5""@chakra-ui/react-use-merge-refs" "2.0.7""@chakra-ui/react-use-pan-event" "2.0.9"- "@chakra-ui/react-use-size" "2.0.8"+ "@chakra-ui/react-use-size" "2.0.9""@chakra-ui/react-use-update-effect" "2.0.7""@chakra-ui/[email protected]":@@ -1806,10 +1807,10 @@"@chakra-ui/react-context" "2.0.7""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.5.2"- resolved "https://registry.yarnpkg.com/@chakra-ui/styled-system/-/styled-system-2.5.2.tgz#f0dfcc3efac9a4428ca548840062d479d2a909a1"- integrity sha512-FVnSWcj28F2t0R6slslYnhdWL8L3+elzoNt9oXBosS9PS6u6Yh56Dqq2GH2yasOWSmuuXGCPbzOYuc0U+MlCqg==+"@chakra-ui/[email protected]":+ version "2.6.1"+ resolved "https://registry.yarnpkg.com/@chakra-ui/styled-system/-/styled-system-2.6.1.tgz#302d496d34c0b7b30c646a7e3c9b113a2f4588da"+ integrity sha512-jy/1dVi1LxjoRCm+Eo5mqBgvPy5SCWMlIcz6GbIZBDpkGeKZwtqrZLjekxxLBCy8ORY+kJlUB0FT6AzVR/1tjw==dependencies:"@chakra-ui/shared-utils" "2.0.5"csstype "^3.0.11"@@ -1823,16 +1824,16 @@"@chakra-ui/checkbox" "2.2.10""@chakra-ui/shared-utils" "2.0.5"-"@chakra-ui/[email protected]":- version "2.4.0"- resolved "https://registry.yarnpkg.com/@chakra-ui/system/-/system-2.4.0.tgz#5ea28db6b76288e223e3efafee04566be9efe134"- integrity sha512-gUX6OZVvFDMV92NtKLuawIWqvjhYc0u1LCAMeb1k3ktVBjWEYjIM4DBIirEhHjcADa8ownrTEHeW0aGxN7uxjQ==+"@chakra-ui/[email protected]":+ version "2.5.1"+ resolved "https://registry.yarnpkg.com/@chakra-ui/system/-/system-2.5.1.tgz#bc03a11ae31e795966c7618280548d5cd866f47e"+ integrity sha512-4+86OrcSoq7lGkm5fh+sJ3IWXSTzjz+HOllRbCW2Rtnmcg7ritiXVNV2VygEg2DrCcx5+tNqRHDM764zW+AEug==dependencies:"@chakra-ui/color-mode" "2.1.12""@chakra-ui/object-utils" "2.0.8""@chakra-ui/react-utils" "2.0.12"- "@chakra-ui/styled-system" "2.5.2"- "@chakra-ui/theme-utils" "2.0.9"+ "@chakra-ui/styled-system" "2.6.1"+ "@chakra-ui/theme-utils" "2.0.11""@chakra-ui/utils" "2.0.15"react-fast-compare "3.2.0"@@ -1884,13 +1885,13 @@"@chakra-ui/shared-utils" "2.0.5"color2k "^2.0.0"-"@chakra-ui/[email protected]":- version "2.0.9"- resolved "https://registry.yarnpkg.com/@chakra-ui/theme-utils/-/theme-utils-2.0.9.tgz#96c63dd8cb3c0e5ca31e95547d6743889784a43d"- integrity sha512-+Nn1NooFeAr4d/OVU1NjXEMKCKCIfesYw27BoYzFYCWt/+cS/qcVdPJj+uXgK8L8xExhkREipt2r9kGlE+WpTw==+"@chakra-ui/[email protected]":+ version "2.0.11"+ resolved "https://registry.yarnpkg.com/@chakra-ui/theme-utils/-/theme-utils-2.0.11.tgz#c01b1d14fdd63326d1ad11fd8f0872921ea43872"+ integrity sha512-lBAay6Sq3/fl7exd3mFxWAbzgdQowytor0fnlHrpNStn1HgFjXukwsf6356XQOie2Vd8qaMM7qZtMh4AiC0dcg==dependencies:"@chakra-ui/shared-utils" "2.0.5"- "@chakra-ui/styled-system" "2.5.2"+ "@chakra-ui/styled-system" "2.6.1""@chakra-ui/theme" "2.2.5"lodash.mergewith "4.6.2"@@ -1903,10 +1904,10 @@"@chakra-ui/shared-utils" "2.0.5""@chakra-ui/theme-tools" "2.0.17"-"@chakra-ui/[email protected]":- version "5.0.1"- resolved "https://registry.yarnpkg.com/@chakra-ui/toast/-/toast-5.0.1.tgz#e4a8e5d3420fdff6dbaf43b7bb305adc6e8a1029"- integrity sha512-R66broJXhe4cd+o5/r7raF4Jg4J3W3QBHrykV7AV/W0Wiav8tL8jwSq8pMmXVnO3oGwKWZ+VHuSWmjcL65BHmg==+"@chakra-ui/[email protected]":+ version "6.0.1"+ resolved "https://registry.yarnpkg.com/@chakra-ui/toast/-/toast-6.0.1.tgz#726b67a57cdd592320bb3f450c66d007a2a1d902"+ integrity sha512-ej2kJXvu/d2h6qnXU5D8XTyw0qpsfmbiU7hUffo/sPxkz89AUOQ08RUuUmB1ssW/FZcQvNMJ5WgzCTKHGBxtxw==dependencies:"@chakra-ui/alert" "2.0.17""@chakra-ui/close-button" "2.0.17"@@ -1915,7 +1916,7 @@"@chakra-ui/react-use-timeout" "2.0.5""@chakra-ui/react-use-update-effect" "2.0.7""@chakra-ui/shared-utils" "2.0.5"- "@chakra-ui/styled-system" "2.5.2"+ "@chakra-ui/styled-system" "2.6.1""@chakra-ui/theme" "2.2.5""@chakra-ui/[email protected]":@@ -2501,32 +2502,32 @@resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==-"@internationalized/date@^3.0.2":- version "3.0.2"- resolved "https://registry.yarnpkg.com/@internationalized/date/-/date-3.0.2.tgz#1566a0bcbd82dce4dd54a5b26456bb701068cb89"- integrity sha512-9V1IxesP6ASZj/hYyOXOC4yPJvidbbStyWQKLCQSqhhKACMOXoo+BddXZJy47ju9mqOMpWdrJ2rTx4yTxK9oag==+"@internationalized/date@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@internationalized/date/-/date-3.1.0.tgz#da48aeaa971df6ad410cd32597c174d6cab9a3b4"+ integrity sha512-wjeur7K4AecT+YwoBmBXQ/+n5lP69tuZc34hw09s44EozZK7FZHSyfPvRp5/xEb2D6abLboskDY4jG+Nt0TNUQ==dependencies:"@swc/helpers" "^0.4.14"-"@internationalized/message@^3.0.10":- version "3.0.10"- resolved "https://registry.yarnpkg.com/@internationalized/message/-/message-3.0.10.tgz#340dcfd14ace37234e09419427c991a0c466b96e"- integrity sha512-vfLqEop/NH68IgqMcXJNSDqZ5Leg3EEgCxhuuSefU7vvdbptD3pwpUWXaK9igYPa+aZfUU0eqv86yqm76obtsw==+"@internationalized/message@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@internationalized/message/-/message-3.1.0.tgz#b284014cd8bbb430a648b76c87c62bdca968b04c"+ integrity sha512-Oo5m70FcBdADf7G8NkUffVSfuCdeAYVfsvNjZDi9ELpjvkc4YNJVTHt/NyTI9K7FgAVoELxiP9YmN0sJ+HNHYQ==dependencies:"@swc/helpers" "^0.4.14"intl-messageformat "^10.1.0"-"@internationalized/number@^3.1.2":- version "3.1.2"- resolved "https://registry.yarnpkg.com/@internationalized/number/-/number-3.1.2.tgz#4482a6ac573acfb18efd354a42008af20da6c89c"- integrity sha512-Mbys8SGsn0ApXz3hJLNU+d95B8luoUbwnmCpBwl7d63UmYAlcT6TRDyvaS/vwdbElXLcsQJjQCu0gox2cv/Tig==+"@internationalized/number@^3.2.0":+ version "3.2.0"+ resolved "https://registry.yarnpkg.com/@internationalized/number/-/number-3.2.0.tgz#dffb661cacd61a87b814c47b7d5240a286249066"+ integrity sha512-GUXkhXSX1Ee2RURnzl+47uvbOxnlMnvP9Er+QePTjDjOPWuunmLKlEkYkEcLiiJp7y4l9QxGDLOlVr8m69LS5w==dependencies:"@swc/helpers" "^0.4.14"-"@internationalized/string@^3.0.1":- version "3.0.1"- resolved "https://registry.yarnpkg.com/@internationalized/string/-/string-3.0.1.tgz#2c70a81ae5eb84f156f40330369c2469bad6d504"- integrity sha512-2+rHfXZ56YgsC6i3fKvBue/xatnSm0Jv+C/x4+n3wg5xAcLh4LPW3GvZ/9ifxNAz9+IWplgZHa1FRIbSuUvNWg==+"@internationalized/string@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@internationalized/string/-/string-3.1.0.tgz#0b365906a8c3f44800b0db52c2e990cff345abce"+ integrity sha512-TJQKiyUb+wyAfKF59UNeZ/kELMnkxyecnyPCnBI1ma4NaXReJW+7Cc2mObXAqraIBJUVv7rgI46RLKrLgi35ng==dependencies:"@swc/helpers" "^0.4.14"@@ -2775,59 +2776,6 @@resolved "https://registry.yarnpkg.com/@juggle/resize-observer/-/resize-observer-3.4.0.tgz#08d6c5e20cf7e4cc02fd181c4b0c225cd31dbb60"integrity sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==-"@motionone/animation@^10.15.1":- version "10.15.1"- resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.15.1.tgz#4a85596c31cbc5100ae8eb8b34c459fb0ccf6807"- integrity sha512-mZcJxLjHor+bhcPuIFErMDNyrdb2vJur8lSfMCsuCB4UyV8ILZLvK+t+pg56erv8ud9xQGK/1OGPt10agPrCyQ==- dependencies:- "@motionone/easing" "^10.15.1"- "@motionone/types" "^10.15.1"- "@motionone/utils" "^10.15.1"- tslib "^2.3.1"--"@motionone/dom@^10.15.3":- version "10.15.5"- resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.15.5.tgz#4af18f8136d85c2fc997cac98121c969f6731802"- integrity sha512-Xc5avlgyh3xukU9tydh9+8mB8+2zAq+WlLsC3eEIp7Ax7DnXgY7Bj/iv0a4X2R9z9ZFZiaXK3BO0xMYHKbAAdA==- dependencies:- "@motionone/animation" "^10.15.1"- "@motionone/generators" "^10.15.1"- "@motionone/types" "^10.15.1"- "@motionone/utils" "^10.15.1"- hey-listen "^1.0.8"- tslib "^2.3.1"--"@motionone/easing@^10.15.1":- version "10.15.1"- resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.15.1.tgz#95cf3adaef34da6deebb83940d8143ede3deb693"- integrity sha512-6hIHBSV+ZVehf9dcKZLT7p5PEKHGhDwky2k8RKkmOvUoYP3S+dXsKupyZpqx5apjd9f+php4vXk4LuS+ADsrWw==- dependencies:- "@motionone/utils" "^10.15.1"- tslib "^2.3.1"--"@motionone/generators@^10.15.1":- version "10.15.1"- resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.15.1.tgz#dc6abb11139d1bafe758a41c134d4c753a9b871c"- integrity sha512-67HLsvHJbw6cIbLA/o+gsm7h+6D4Sn7AUrB/GPxvujse1cGZ38F5H7DzoH7PhX+sjvtDnt2IhFYF2Zp1QTMKWQ==- dependencies:- "@motionone/types" "^10.15.1"- "@motionone/utils" "^10.15.1"- tslib "^2.3.1"--"@motionone/types@^10.15.1":- version "10.15.1"- resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.15.1.tgz#89441b54285012795cbba8612cbaa0fa420db3eb"- integrity sha512-iIUd/EgUsRZGrvW0jqdst8st7zKTzS9EsKkP+6c6n4MPZoQHwiHuVtTQLD6Kp0bsBLhNzKIBlHXponn/SDT4hA==--"@motionone/utils@^10.15.1":- version "10.15.1"- resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.15.1.tgz#6b5f51bde75be88b5411e084310299050368a438"- integrity sha512-p0YncgU+iklvYr/Dq4NobTRdAPv9PveRDUXabPEeOjBLSO/1FNB2phNTZxOxpi1/GZwYpAoECEa0Wam+nsmhSw==- dependencies:- "@motionone/types" "^10.15.1"- hey-listen "^1.0.8"- tslib "^2.3.1"-"@msgpackr-extract/[email protected]":version "2.2.0"resolved "https://registry.yarnpkg.com/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-2.2.0.tgz#901c5937e1441572ea23e631fe6deca68482fe76"@@ -2931,246 +2879,246 @@resolved "https://registry.yarnpkg.com/@reach/observe-rect/-/observe-rect-1.2.0.tgz#d7a6013b8aafcc64c778a0ccb83355a11204d3b2"integrity sha512-Ba7HmkFgfQxZqqaeIWWkNK0rEhpxVQHIoVyW1YDSkGsGIXzcaW4deC8B0pZrNSSyLTdIk7y+5olKt5+g0GmFIQ==-"@react-aria/button@^3.6.4":- version "3.6.4"- resolved "https://registry.yarnpkg.com/@react-aria/button/-/button-3.6.4.tgz#51927c9d968d0c1f741ee2081ca7f2e244abbc12"- integrity sha512-OEs5fNGiuZzyC5y0cNl96+6pRf/3ZhI1i2m6LlRYhJLsWXPhHt21UHEnlSchE/XGtgKojJEeTsXottoBFTBi5w==- dependencies:- "@react-aria/focus" "^3.10.1"- "@react-aria/interactions" "^3.13.1"- "@react-aria/utils" "^3.14.2"- "@react-stately/toggle" "^3.4.4"- "@react-types/button" "^3.7.0"- "@react-types/shared" "^3.16.0"+"@react-aria/button@^3.7.0":+ version "3.7.0"+ resolved "https://registry.yarnpkg.com/@react-aria/button/-/button-3.7.0.tgz#b00635c8be0e47e19733c96f3702b699f65242b7"+ integrity sha512-4DSGXrAWflzT4cQe/x0KdrPzz7hv9vZgqYJuNXQkpmeIMs1EmUKuby2xC+W9GHuZ+8dMxjTWKy3XdwX2tCM42A==+ dependencies:+ "@react-aria/focus" "^3.11.0"+ "@react-aria/interactions" "^3.14.0"+ "@react-aria/utils" "^3.15.0"+ "@react-stately/toggle" "^3.5.0"+ "@react-types/button" "^3.7.1"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/calendar@^3.0.5":- version "3.0.5"- resolved "https://registry.yarnpkg.com/@react-aria/calendar/-/calendar-3.0.5.tgz#78b4138688d325a3c3f8dc0be3e45291b3e8670b"- integrity sha512-RIOwGYIwMizN/MAF5RkTb2ic9OJ0rJyR2VqqgtV3c7ADHNejzyLYMQmaalEFDUHS+AbvaXM1LCXdFBhSB8nf5w==- dependencies:- "@internationalized/date" "^3.0.2"- "@react-aria/i18n" "^3.6.3"- "@react-aria/interactions" "^3.13.1"- "@react-aria/live-announcer" "^3.1.2"- "@react-aria/utils" "^3.14.2"- "@react-stately/calendar" "^3.0.5"- "@react-types/button" "^3.7.0"- "@react-types/calendar" "^3.0.5"- "@react-types/shared" "^3.16.0"+"@react-aria/calendar@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@react-aria/calendar/-/calendar-3.1.0.tgz#58565af2bca09ef72dddb246ff4a70157c008add"+ integrity sha512-XWtoGMBTYpj5De2yfboAv60SMXa/T2BjPd0uSkiaPXAC0vPjdB0VPhGbSi6LKCYIiTAMs98mMP0P4WYhWyW4jA==+ dependencies:+ "@internationalized/date" "^3.1.0"+ "@react-aria/i18n" "^3.7.0"+ "@react-aria/interactions" "^3.14.0"+ "@react-aria/live-announcer" "^3.2.0"+ "@react-aria/utils" "^3.15.0"+ "@react-stately/calendar" "^3.1.0"+ "@react-types/button" "^3.7.1"+ "@react-types/calendar" "^3.1.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/datepicker@^3.2.1":- version "3.2.1"- resolved "https://registry.yarnpkg.com/@react-aria/datepicker/-/datepicker-3.2.1.tgz#56a222c4b1c9c65b9b9371d3066611134f537ab7"- integrity sha512-NnW9VgX/YjxkgjcIaxmOhzpfiQmTQpCXjpPJ1+3nPhKzPKpcjtPxIYTDMkm/R+6i5FRukEGtjhg3QY9amLK6hQ==- dependencies:- "@internationalized/date" "^3.0.2"- "@internationalized/number" "^3.1.2"- "@internationalized/string" "^3.0.1"- "@react-aria/focus" "^3.10.1"- "@react-aria/i18n" "^3.6.3"- "@react-aria/interactions" "^3.13.1"- "@react-aria/label" "^3.4.4"- "@react-aria/spinbutton" "^3.2.1"- "@react-aria/utils" "^3.14.2"- "@react-stately/datepicker" "^3.2.1"- "@react-types/button" "^3.7.0"- "@react-types/calendar" "^3.0.5"- "@react-types/datepicker" "^3.1.4"- "@react-types/dialog" "^3.4.5"- "@react-types/shared" "^3.16.0"+"@react-aria/datepicker@^3.3.0":+ version "3.3.0"+ resolved "https://registry.yarnpkg.com/@react-aria/datepicker/-/datepicker-3.3.0.tgz#15bc746d75f43c2d31c826fcc34c6859433b205a"+ integrity sha512-76/5a2Dfe/SCcW0j4hqeSTnlh6SSW/AYPKPr5fNaiGnLFJ3oLsc9SAuUgTsOBglR/J3N/hqtH+UO2U8X1QC6Ng==+ dependencies:+ "@internationalized/date" "^3.1.0"+ "@internationalized/number" "^3.2.0"+ "@internationalized/string" "^3.1.0"+ "@react-aria/focus" "^3.11.0"+ "@react-aria/i18n" "^3.7.0"+ "@react-aria/interactions" "^3.14.0"+ "@react-aria/label" "^3.5.0"+ "@react-aria/spinbutton" "^3.3.0"+ "@react-aria/utils" "^3.15.0"+ "@react-stately/datepicker" "^3.3.0"+ "@react-types/button" "^3.7.1"+ "@react-types/calendar" "^3.1.0"+ "@react-types/datepicker" "^3.2.0"+ "@react-types/dialog" "^3.5.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/focus@^3.10.1":- version "3.10.1"- resolved "https://registry.yarnpkg.com/@react-aria/focus/-/focus-3.10.1.tgz#624d02d2565151030a4156aeb17685d87f18ad58"- integrity sha512-HjgFUC1CznuYC7CxtBIFML6bOBxW3M3cSNtvmXU9QWlrPSwwOLkXCnfY6+UkjCc5huP4v7co4PoRDX8Vbe/cVQ==+"@react-aria/focus@^3.11.0":+ version "3.11.0"+ resolved "https://registry.yarnpkg.com/@react-aria/focus/-/focus-3.11.0.tgz#8124b2341e8d43af72f3da85b08567bda45421b7"+ integrity sha512-yPuWs9bAR9CMfIwyOPm2oXLPF19gNkUqW+ozSPhWbLMTEa8Ma09eHW1br4xbN+4ONOm/dCJsIkxTNPUkiLdQoA==dependencies:- "@react-aria/interactions" "^3.13.1"- "@react-aria/utils" "^3.14.2"- "@react-types/shared" "^3.16.0"+ "@react-aria/interactions" "^3.14.0"+ "@react-aria/utils" "^3.15.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"clsx "^1.1.1"-"@react-aria/i18n@^3.6.3":- version "3.6.3"- resolved "https://registry.yarnpkg.com/@react-aria/i18n/-/i18n-3.6.3.tgz#2b4d72d0baf07b514d2c35eb6ac356d0247ea84a"- integrity sha512-cDWl8FXJIXsw/raWcThywBueCJ5ncoogq81wYVS6hfZVmSyncONIB3bwUL12cojmjX1VEP31sN0ujT/83QP95Q==- dependencies:- "@internationalized/date" "^3.0.2"- "@internationalized/message" "^3.0.10"- "@internationalized/number" "^3.1.2"- "@internationalized/string" "^3.0.1"- "@react-aria/ssr" "^3.4.1"- "@react-aria/utils" "^3.14.2"- "@react-types/shared" "^3.16.0"+"@react-aria/i18n@^3.7.0":+ version "3.7.0"+ resolved "https://registry.yarnpkg.com/@react-aria/i18n/-/i18n-3.7.0.tgz#c1dfcd7a76a5161cbccbd6980ecf201c9b4d1826"+ integrity sha512-PZCWmhO9mJvelwiYlsXLY6W4L2o+oza3xnDx0cZDVqp/Hf+OwMAPHWtZsFRTKdjk4TaOPB/ISc9HknWn6UpY4w==+ dependencies:+ "@internationalized/date" "^3.1.0"+ "@internationalized/message" "^3.1.0"+ "@internationalized/number" "^3.2.0"+ "@internationalized/string" "^3.1.0"+ "@react-aria/ssr" "^3.5.0"+ "@react-aria/utils" "^3.15.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/interactions@^3.13.1":- version "3.13.1"- resolved "https://registry.yarnpkg.com/@react-aria/interactions/-/interactions-3.13.1.tgz#75e102c50a5c1d002cad4ee8d59677aee226186b"- integrity sha512-WCvfZOi1hhussVTHxVq76OR48ry13Zvp9U5hmuQufyxIUlf4hOvDk4/cbK4o4JiCs8X7C7SRzcwFM34M4NHzmg==+"@react-aria/interactions@^3.14.0":+ version "3.14.0"+ resolved "https://registry.yarnpkg.com/@react-aria/interactions/-/interactions-3.14.0.tgz#d6480985048c009d58b8572428010dc61093cfcc"+ integrity sha512-e1Tkr0UTuYFpV21PJrXy7jEY542Vl+C2Fo70oukZ1fN+wtfQkzodsTIzyepXb7kVMGmC34wDisMJUrksVkfY2w==dependencies:- "@react-aria/utils" "^3.14.2"- "@react-types/shared" "^3.16.0"+ "@react-aria/utils" "^3.15.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/label@^3.4.4":- version "3.4.4"- resolved "https://registry.yarnpkg.com/@react-aria/label/-/label-3.4.4.tgz#b891d3cebeeffc7a1413a492d8a694083dc3253e"- integrity sha512-1fuYf2UctNhBy31uYN7OhdcrwzlB5GS0+C49gDkwWzccB7yr+CoOJ5UQUoVB7WBmzrc+CuzwWxSDd4OupSYIZQ==+"@react-aria/label@^3.5.0":+ version "3.5.0"+ resolved "https://registry.yarnpkg.com/@react-aria/label/-/label-3.5.0.tgz#817710d719bc95105e369f4993a3a60dbad73ba9"+ integrity sha512-sNiPYiFg06s1zGuifEUeUqRiYje0lfHem+GIUh0Y5ZxfpqIyxEmyV9Aw+C7TTjjo8BAG4NZ4bR7iF9ujf9QvKQ==dependencies:- "@react-aria/utils" "^3.14.2"- "@react-types/label" "^3.7.1"- "@react-types/shared" "^3.16.0"+ "@react-aria/utils" "^3.15.0"+ "@react-types/label" "^3.7.2"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/live-announcer@^3.1.2":- version "3.1.2"- resolved "https://registry.yarnpkg.com/@react-aria/live-announcer/-/live-announcer-3.1.2.tgz#a492c7ec1e664c8f41a572368cdbc53e22241a0c"- integrity sha512-BqtVLPWU10sZssoOJF1lJiRvZe5zqZ5BM39PsFyO7dWhVkR/9O9bZviqvKXnC1oXCnypfa+85gUshbK9unFcWA==+"@react-aria/live-announcer@^3.2.0":+ version "3.2.0"+ resolved "https://registry.yarnpkg.com/@react-aria/live-announcer/-/live-announcer-3.2.0.tgz#ff4bd263789aa246de9f966e188649f6454e8b36"+ integrity sha512-uSqDDy+9CbmNTZh0Roi4dvWKWcbuMTYKh3RnUw3XBPw0aYxSkcFQeWGfxFoOwXCDcXez02cFJtAxpR2bShkrsw==dependencies:"@swc/helpers" "^0.4.14"-"@react-aria/spinbutton@^3.2.1":- version "3.2.1"- resolved "https://registry.yarnpkg.com/@react-aria/spinbutton/-/spinbutton-3.2.1.tgz#8e9fff341deef3e14109c69f2b52fffa8a878a5b"- integrity sha512-y9QZ0VzWL7qzbWSPOCsAdvZhVlQrnHLRGc8bkRa2jmWrnCqS0iua/TRuLGgazIf2Rb7GmdbKBJJuPSScytVDUw==- dependencies:- "@react-aria/i18n" "^3.6.3"- "@react-aria/live-announcer" "^3.1.2"- "@react-aria/utils" "^3.14.2"- "@react-types/button" "^3.7.0"- "@react-types/shared" "^3.16.0"+"@react-aria/spinbutton@^3.3.0":+ version "3.3.0"+ resolved "https://registry.yarnpkg.com/@react-aria/spinbutton/-/spinbutton-3.3.0.tgz#19ae27476ee7acbfb75d40b568164a26466c39d7"+ integrity sha512-FXTFNz2RFClqGxQzMIHYdsjkm6fcWRObqelY+lXP5udk7Q8T9aQn+28QhqVpbOFXotLE2PltElbziJeuhkVgNA==+ dependencies:+ "@react-aria/i18n" "^3.7.0"+ "@react-aria/live-announcer" "^3.2.0"+ "@react-aria/utils" "^3.15.0"+ "@react-types/button" "^3.7.1"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-aria/ssr@^3.4.1":- version "3.4.1"- resolved "https://registry.yarnpkg.com/@react-aria/ssr/-/ssr-3.4.1.tgz#79e8bb621487e8f52890c917d3c734f448ba95e7"- integrity sha512-NmhoilMDyIfQiOSdQgxpVH2tC2u85Y0mVijtBNbI9kcDYLEiW/r6vKYVKtkyU+C4qobXhGMPfZ70PTc0lysSVA==+"@react-aria/ssr@^3.5.0":+ version "3.5.0"+ resolved "https://registry.yarnpkg.com/@react-aria/ssr/-/ssr-3.5.0.tgz#40c1270a75868185f72a88cafe37bd1392f690cb"+ integrity sha512-h0MJdSWOd1qObLnJ8mprU31wI8tmKFJMuwT22MpWq6psisOOZaga6Ml4u6Ee6M6duWWISjXvqO4Sb/J0PBA+nQ==dependencies:"@swc/helpers" "^0.4.14"-"@react-aria/utils@^3.14.2":- version "3.14.2"- resolved "https://registry.yarnpkg.com/@react-aria/utils/-/utils-3.14.2.tgz#3a8d0d14abab4bb1095e101ee44dc5e3e43e6217"- integrity sha512-3nr5gsAf/J/W+6Tu4NF3Q7m+1mXjfpXESh7TPa6UR6v3tVDTsJVMrITg2BkHN1jM8xELcl2ZxyUffOWqOXzWuA==+"@react-aria/utils@^3.15.0":+ version "3.15.0"+ resolved "https://registry.yarnpkg.com/@react-aria/utils/-/utils-3.15.0.tgz#a836674dd40ec7f15e9f7a69b1a14f19b1ee42e6"+ integrity sha512-aJZBG++iz1UwTW5gXFaHicKju4p0MPhAyBTcf2awHYWeTUUslDjJcEnNg7kjBYZBOrOSlA2rAt7/7C5CCURQPg==dependencies:- "@react-aria/ssr" "^3.4.1"- "@react-stately/utils" "^3.5.2"- "@react-types/shared" "^3.16.0"+ "@react-aria/ssr" "^3.5.0"+ "@react-stately/utils" "^3.6.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"clsx "^1.1.1"-"@react-stately/calendar@^3.0.5":- version "3.0.5"- resolved "https://registry.yarnpkg.com/@react-stately/calendar/-/calendar-3.0.5.tgz#78decc870ddf33ce1f7b7c8da57d2639e9a46c30"- integrity sha512-vu5hKsiA8edqNtsqBTGi8QR38qZ+uHDjuq3vp2m0f6TZSnp0kg8fkPNHEOuBTQ8ZXFFbGUZKhL/1B+ZWwLHwMQ==- dependencies:- "@internationalized/date" "^3.0.2"- "@react-stately/utils" "^3.5.2"- "@react-types/calendar" "^3.0.5"- "@react-types/datepicker" "^3.1.4"- "@react-types/shared" "^3.16.0"+"@react-stately/calendar@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@react-stately/calendar/-/calendar-3.1.0.tgz#3254ab630972f5bfeedf821a3580ad83bc087e2e"+ integrity sha512-PZXXHyrLoYEUAUL8oFoxHNc7mKrQXLxnYQkY9v3a6SxgST3J4tYoqIXrie0uqpm1LI+1JfKb2lyRGlVPRTBuNQ==+ dependencies:+ "@internationalized/date" "^3.1.0"+ "@react-stately/utils" "^3.6.0"+ "@react-types/calendar" "^3.1.0"+ "@react-types/datepicker" "^3.2.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-stately/datepicker@^3.2.1":- version "3.2.1"- resolved "https://registry.yarnpkg.com/@react-stately/datepicker/-/datepicker-3.2.1.tgz#4c545981f73771bff76885e50014b4274fa4b554"- integrity sha512-nd6thX2Z+rOLDHduB3EgMKA0n5U83lrwn3IUfjRGrcE21zFaFmhTPsHyvol5jHy3eSyjWSN9kGpKFzOxES+uoA==- dependencies:- "@internationalized/date" "^3.0.2"- "@internationalized/string" "^3.0.1"- "@react-stately/overlays" "^3.4.4"- "@react-stately/utils" "^3.5.2"- "@react-types/datepicker" "^3.1.4"- "@react-types/shared" "^3.16.0"+"@react-stately/datepicker@^3.3.0":+ version "3.3.0"+ resolved "https://registry.yarnpkg.com/@react-stately/datepicker/-/datepicker-3.3.0.tgz#4dd777756f5f0abb3617b5d61bf34d428f0c563f"+ integrity sha512-HH/WPAMXwULyBKHICxTLGDk3cPGf9Yhf8sX2DES935aupd+6YqzQrh97buOedKsF5WKZfzMMtUVqy8uepo6S6g==+ dependencies:+ "@internationalized/date" "^3.1.0"+ "@internationalized/string" "^3.1.0"+ "@react-stately/overlays" "^3.5.0"+ "@react-stately/utils" "^3.6.0"+ "@react-types/datepicker" "^3.2.0"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-stately/overlays@^3.4.4":- version "3.4.4"- resolved "https://registry.yarnpkg.com/@react-stately/overlays/-/overlays-3.4.4.tgz#a228a230f46f0d593ffb7bc8f836439bbc08e9ed"- integrity sha512-IIlx+VXtXS4snDXrocUOls8QZ5XBQ4SNonaz1ox8/5W7Nsvq4VtdKsIaXsUP4agOudswaimlpj3pTDO/KuF5tQ==+"@react-stately/overlays@^3.5.0":+ version "3.5.0"+ resolved "https://registry.yarnpkg.com/@react-stately/overlays/-/overlays-3.5.0.tgz#3c33a6f678f728497c94729e8a861ddf1e8704bb"+ integrity sha512-r+U/G0Y4tCfI5wyBeIu+hmcZVRN8ChoK2zM1srPH9nDKsijQard2goX+9YmKng2LJ01Re/P6F8S8jYbpfEdLfQ==dependencies:- "@react-stately/utils" "^3.5.2"- "@react-types/overlays" "^3.6.5"+ "@react-stately/utils" "^3.6.0"+ "@react-types/overlays" "^3.7.0""@swc/helpers" "^0.4.14"-"@react-stately/toggle@^3.4.4":- version "3.4.4"- resolved "https://registry.yarnpkg.com/@react-stately/toggle/-/toggle-3.4.4.tgz#b7825bf900725dcee0444fe6132b06948be36b44"- integrity sha512-OwVJpd2M7P7fekTWpl3TUdD3Brq+Z/xElOCJYP5QuVytXCa5seKsk40YPld8JQnA5dRKojpbUxMDOJpb6hOOfw==+"@react-stately/toggle@^3.5.0":+ version "3.5.0"+ resolved "https://registry.yarnpkg.com/@react-stately/toggle/-/toggle-3.5.0.tgz#fee5a29d7699e43867c52981834af5393f47c1c4"+ integrity sha512-vKwLLkFsiIve4pXIQC/dqLAz7Z+qtzJ8+D00EXXO1Nf8YHcyIMDkTmi3NTM8Qtvmt4xX2hbJFiPDF6WvF6mBIg==dependencies:- "@react-stately/utils" "^3.5.2"- "@react-types/checkbox" "^3.4.1"- "@react-types/shared" "^3.16.0"+ "@react-stately/utils" "^3.6.0"+ "@react-types/checkbox" "^3.4.2"+ "@react-types/shared" "^3.17.0""@swc/helpers" "^0.4.14"-"@react-stately/utils@^3.5.2":- version "3.5.2"- resolved "https://registry.yarnpkg.com/@react-stately/utils/-/utils-3.5.2.tgz#9b5f3bb9ad500bf9c5b636a42988dba60a221669"- integrity sha512-639gSKqamPHIEPaApb9ahVJS0HgAqNdVF3tQRoh+Ky6759Mbk6i3HqG4zk4IGQ1tVlYSYZvCckwehF7b2zndMg==+"@react-stately/utils@^3.6.0":+ version "3.6.0"+ resolved "https://registry.yarnpkg.com/@react-stately/utils/-/utils-3.6.0.tgz#f273e7fcb348254347d2e88c8f0c45571060c207"+ integrity sha512-rptF7iUWDrquaYvBAS4QQhOBQyLBncDeHF03WnHXAxnuPJXNcr9cXJtjJPGCs036ZB8Q2hc9BGG5wNyMkF5v+Q==dependencies:"@swc/helpers" "^0.4.14"-"@react-types/button@^3.7.0":- version "3.7.0"- resolved "https://registry.yarnpkg.com/@react-types/button/-/button-3.7.0.tgz#774c043d8090a505e60fdf26f026d5f0cc968f0f"- integrity sha512-81BQO3QxSgF9PTXsVozNdNCKxBOB1lpbCWocV99dN1ws9s8uaYw8pmJJZ0LJKLiOsIECQ/3QrhQjmWTDW/qTug==+"@react-types/button@^3.7.1":+ version "3.7.1"+ resolved "https://registry.yarnpkg.com/@react-types/button/-/button-3.7.1.tgz#a51d2617a593d9862c72306b3bf0c4b5bff4793d"+ integrity sha512-c+8xjmqWSjI5/mEHVLbVSp0eh/z2UU8Ga+wqjbEUZUjm8uopYj1PaCAwZ7YgcAebyQrL/21GyjK6tFHKzuUdJQ==dependencies:- "@react-types/shared" "^3.16.0"+ "@react-types/shared" "^3.17.0"-"@react-types/calendar@^3.0.5":- version "3.0.5"- resolved "https://registry.yarnpkg.com/@react-types/calendar/-/calendar-3.0.5.tgz#a91fca7d5a2bbbd554748471f9920600cb364d18"- integrity sha512-Kx00132hFEVvqay/Ub7q2oZEA1AzksirAuCsjakamn4LAXvitlo3PZxqBdEsyRc3nP5NR48KJj8yo276mXY8kQ==+"@react-types/calendar@^3.1.0":+ version "3.1.0"+ resolved "https://registry.yarnpkg.com/@react-types/calendar/-/calendar-3.1.0.tgz#cee348fbc502884237b86c1b4ed22853d9b6ea3c"+ integrity sha512-6VKBxG27cLKti8Ik+T2N1y6FqJSgIXuQPMehOA1ASqPQLtnRBEoSgLjuN5qj7RTWgmdTvQmofqVznVFoUe5ozQ==dependencies:- "@internationalized/date" "^3.0.2"- "@react-types/shared" "^3.16.0"+ "@internationalized/date" "^3.1.0"+ "@react-types/shared" "^3.17.0"-"@react-types/checkbox@^3.4.1":- version "3.4.1"- resolved "https://registry.yarnpkg.com/@react-types/checkbox/-/checkbox-3.4.1.tgz#75a78b3f21f4cc72d2382761ba4c326aefd699db"- integrity sha512-kDMpy9SntjGQ7x00m5zmW8GENPouOtyiDgiEDKsPXUr2iYqHsNtricqVyG9S9+6hqpzuu8BzTcvZamc/xYjzlg==+"@react-types/checkbox@^3.4.2":+ version "3.4.2"+ resolved "https://registry.yarnpkg.com/@react-types/checkbox/-/checkbox-3.4.2.tgz#6089e9ef2d023415a5f871e312f30bae54143ba5"+ integrity sha512-/NWFCEQLvVgo25afPt2jv4syxYvZeY/D/n2Y92IGtoNV4akdz4AuQ65+1X+JOhQc/ZbAblWw5fFWUZoQs3CLZg==dependencies:- "@react-types/shared" "^3.16.0"+ "@react-types/shared" "^3.17.0"-"@react-types/datepicker@^3.1.4":- version "3.1.4"- resolved "https://registry.yarnpkg.com/@react-types/datepicker/-/datepicker-3.1.4.tgz#46fd291d8acd40fdd304c4c0bf1a47e71eaa1801"- integrity sha512-NBCXBCe3YZqeA/JrVKy0IAvJ2XSnXaVpR9iAlUwKu7V8P81CtnXHsVCrd/0HSH8QZWsGdIV5E23z0TctvW8trA==+"@react-types/datepicker@^3.2.0":+ version "3.2.0"+ resolved "https://registry.yarnpkg.com/@react-types/datepicker/-/datepicker-3.2.0.tgz#a8b7b5da5160774882e73aa175c0fc76ecd82ac9"+ integrity sha512-wcxLI6aW+r6nO2bsypxMIaWJHG5YYAD7WtJmhR5n5GK5juUCu/hzKBhdwxE1qtD3kMvIKTDJkMXLVNGmJP0mFw==dependencies:- "@internationalized/date" "^3.0.2"- "@react-types/overlays" "^3.6.5"- "@react-types/shared" "^3.16.0"+ "@internationalized/date" "^3.1.0"+ "@react-types/overlays" "^3.7.0"+ "@react-types/shared" "^3.17.0"-"@react-types/dialog@^3.4.5":- version "3.4.5"- resolved "https://registry.yarnpkg.com/@react-types/dialog/-/dialog-3.4.5.tgz#a12c4e6d69dd7f098eb8b1534107ae6d970f734b"- integrity sha512-FkxZAYNRWkZVH5rjlw6qyQ/SpoGcYtNI/JQvn1H/xtZy/OJh2b2ERxGWv5x0RItGSeyATdSwFO1Qnf1Kl2K02A==+"@react-types/dialog@^3.5.0":+ version "3.5.0"+ resolved "https://registry.yarnpkg.com/@react-types/dialog/-/dialog-3.5.0.tgz#51d942ba377ac1483c90db69e84bfdc3d5f65129"+ integrity sha512-QsHqAK8zE4QSCQTJcRm/e6vweSE8S62o4GGvm+e+crMro/doA4it1Y4udE94Yy3WyDQEMFxyfd2P1Q6bI9JuyQ==dependencies:- "@react-types/overlays" "^3.6.5"- "@react-types/shared" "^3.16.0"+ "@react-types/overlays" "^3.7.0"+ "@react-types/shared" "^3.17.0"-"@react-types/label@^3.7.1":- version "3.7.1"- resolved "https://registry.yarnpkg.com/@react-types/label/-/label-3.7.1.tgz#ad4d3d7a6b5ea6aca70f89661d7c358cf2ab5f94"- integrity sha512-wFpdtjSDBWO4xQQGF57V3PqvVVyE9TPj9ELWLs1yzL09fpXosycuEl5d79RywVlC9aF9dQYUfES09q/DZhRhMQ==+"@react-types/label@^3.7.2":+ version "3.7.2"+ resolved "https://registry.yarnpkg.com/@react-types/label/-/label-3.7.2.tgz#593bf1171098134cd5dbb6c66bf1063e552d67ea"+ integrity sha512-UlsIvxQjBMl9WwJw1bYoJMwiPvYwRsSLl2yoeeGfGr6IaYn5T/2kzBhDLwe5cpKrmi4Mehn1rbReFLGITOy8+g==dependencies:- "@react-types/shared" "^3.16.0"+ "@react-types/shared" "^3.17.0"-"@react-types/overlays@^3.6.5":- version "3.6.5"- resolved "https://registry.yarnpkg.com/@react-types/overlays/-/overlays-3.6.5.tgz#466b325d9be51f67beb98b7bec3fd9295c72efac"- integrity sha512-IeWcF+YTucCYYHagNh8fZLH6R4YUONO1VHY57WJyIHwMy0qgEaKSQCwq72VO1fQJ0ySZgOgm31FniOyKkg6+eQ==+"@react-types/overlays@^3.7.0":+ version "3.7.0"+ resolved "https://registry.yarnpkg.com/@react-types/overlays/-/overlays-3.7.0.tgz#22dcd1bbc1f8e17b0d7a757414c50ce580ae0d26"+ integrity sha512-LstucncZ8dM+xJYEijI1V6jGH20w5XO/T60r7JTrgQElMC86phPeoWkMTN4c2lsRikybolDbvXL6XsF76YO56A==dependencies:- "@react-types/shared" "^3.16.0"+ "@react-types/shared" "^3.17.0"-"@react-types/shared@^3.16.0":- version "3.16.0"- resolved "https://registry.yarnpkg.com/@react-types/shared/-/shared-3.16.0.tgz#cab7bf0376969d1773480ecb2d6da5aa91391db5"- integrity sha512-IQgU4oAEvMwylEvaTsr2XB1G/mAoMe1JFYLD6G78v++oAR9l8o9MQxZ0YSeANDkqTamb2gKezGoT1RxvSKjVxw==+"@react-types/shared@^3.17.0":+ version "3.17.0"+ resolved "https://registry.yarnpkg.com/@react-types/shared/-/shared-3.17.0.tgz#b7c5e318664aadb315d305a27dd2a209d1837d95"+ integrity sha512-1SNZ/RhVrrQ1e6yE0bPV7d5Sfp+Uv0dfUEhwF9MAu2v5msu7AMewnsiojKNA0QA6Ing1gpDLjHCxtayQfuxqcg=="@reactflow/[email protected]":version "11.1.8"@@ -3457,10 +3405,10 @@dependencies:cross-fetch "^3.1.5"-"@supabase/gotrue-js@^2.5.0":- version "2.6.1"- resolved "https://registry.yarnpkg.com/@supabase/gotrue-js/-/gotrue-js-2.6.1.tgz#55661e4e0cf5926520d3a294e16ea76b7fc55f89"- integrity sha512-ez40a1TORJIlF6xlA8oALx8W8vneyInz77+Hmlt2qJvKGF4LhhbBN/YI7FYmxJ8KMUaDZeWJzUwTNNOIQhE6Vg==+"@supabase/gotrue-js@^2.12.0":+ version "2.12.1"+ resolved "https://registry.yarnpkg.com/@supabase/gotrue-js/-/gotrue-js-2.12.1.tgz#f27564b2cf6bca30ca4ede24079259d1f9608b75"+ integrity sha512-r8Jfq8FvP6q4kp7sI33X1RWfEEHzJFu9uM1Q6HgiDVkY89NNgqYy2kxaRGtidPFllND7vpcJUcpoWS5oq+4u0g==dependencies:cross-fetch "^3.1.5"@@ -3471,10 +3419,10 @@dependencies:cross-fetch "^3.1.5"-"@supabase/realtime-js@^2.1.0":- version "2.1.0"- resolved "https://registry.yarnpkg.com/@supabase/realtime-js/-/realtime-js-2.1.0.tgz#699ac012bc1c721cd6446ad93226085be348e998"- integrity sha512-iplLCofTeYjnx9FIOsIwHLhMp0+7UVyiA4/sCeq40VdOgN9eTIhjEno9Tgh4dJARi4aaXoKfRX1DTxgZaOpPAw==+"@supabase/realtime-js@^2.4.0":+ version "2.6.0"+ resolved "https://registry.yarnpkg.com/@supabase/realtime-js/-/realtime-js-2.6.0.tgz#eff000c2fd9f5cd8d59f4adf6d76165b81ebd536"+ integrity sha512-tOVulMobhpxyDuu8VIImpL8FXmZOKsGNOSyS5ihJdj2xYmPPvYG+D2J51Ewfl+MFF65tweiB6p9N9bNIW1cDNA==dependencies:"@types/phoenix" "^1.5.4"websocket "^1.0.34"@@ -3486,15 +3434,15 @@dependencies:cross-fetch "^3.1.5"-"@supabase/supabase-js@^2.2.1":- version "2.2.1"- resolved "https://registry.yarnpkg.com/@supabase/supabase-js/-/supabase-js-2.2.1.tgz#c280150d810c4f20052684a810093df8c9b32027"- integrity sha512-gHm0bYu8NXCVlKIOcuUT9s/izbNlrwIw+UCKTT9sj2gR9QcYoz4jjIWnvNF8Uwtp5Mq1444NI7OH1yK70yJykQ==+"@supabase/supabase-js@^2.8.0":+ version "2.8.0"+ resolved "https://registry.yarnpkg.com/@supabase/supabase-js/-/supabase-js-2.8.0.tgz#c825961bef50df1d208b24204b2fb080e8cc9e54"+ integrity sha512-uzf4J+qAKdUMhB2tnJl6BrQRUQBinwjJ2eWo2ZsDw9EUUP5JcHsxTamiq6p91DpqzmTIRg3xRAT+bItTzbfa0w==dependencies:"@supabase/functions-js" "^2.0.0"- "@supabase/gotrue-js" "^2.5.0"+ "@supabase/gotrue-js" "^2.12.0""@supabase/postgrest-js" "^1.1.1"- "@supabase/realtime-js" "^2.1.0"+ "@supabase/realtime-js" "^2.4.0""@supabase/storage-js" "^2.1.0"cross-fetch "^3.1.5"@@ -4450,10 +4398,10 @@resolved "https://registry.yarnpkg.com/@web3-storage/multipart-parser/-/multipart-parser-1.0.0.tgz#6b69dc2a32a5b207ba43e556c25cc136a56659c4"integrity sha512-BEO6al7BYqcnfX15W2cnGR+Q566ACXAT9UQykORCWW80lmkpWsnEob6zJS1ZVBKsSJC8+7vJkHwlp+lXG1UCdw==-"@zag-js/[email protected]":- version "0.3.0"- resolved "https://registry.yarnpkg.com/@zag-js/element-size/-/element-size-0.3.0.tgz#1c0ab23c9ada453f5778c4baf1eed46218dc9e85"- integrity sha512-5/hEI+0c6ZNCx6KHlOS5/WeHsd6+I7gk7Y/b/zATp4Rp3tHirs/tu1frq+iy5BmfaG9hbQtfHfUJTjOcI5jnoQ==+"@zag-js/[email protected]":+ version "0.3.1"+ resolved "https://registry.yarnpkg.com/@zag-js/element-size/-/element-size-0.3.1.tgz#f9f6ae98355e2250d18d0f6e2f1134a0ae4c6a2f"+ integrity sha512-jR5j4G//bRzcxwAACWi9EfITnwjNmn10LxF4NmALrdZU7/PNWP3uUCdhCxd/0SCyeiJXUl0yvD57rWAbKPs1nw=="@zag-js/[email protected]":version "0.2.1"@@ -5468,10 +5416,10 @@ compression@^1.7.4:safe-buffer "5.1.2"vary "~1.1.2"- version "1.0.14"- resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.14.tgz#80e3ebb25d6aa89f42e533956cb4b16a04cfe759"- integrity sha512-mKDjINe3tc6hGelUMNDzuhorIUZ7kS7BwyY0r2wQd2HOH2tRuJykiC06iSEX8y1TuhNzvz4GcJnK16mM2J1NMQ==+ version "1.0.20"+ resolved "https://registry.yarnpkg.com/compute-scroll-into-view/-/compute-scroll-into-view-1.0.20.tgz#1768b5522d1172754f5d0c9b02de3af6be506a43"+ integrity sha512-UCB0ioiyj8CRjtrvaceBLqqhZCVP+1B8+NWQhmdsm0VXOJtobBCf1dBQmebCCo34qZmUwZfIH2MZLqNHazrfjg==version "0.0.1"@@ -5525,10 +5473,10 @@ copy-descriptor@^0.1.0:resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"integrity sha512-XgZ0pFcakEUlbwQEVNg3+QAis1FyTL3Qel9FYy8pSkQqoG3PNoT0bOCQtOXcOkur21r2Eq2kI+IE+gsmAEVlYw==- version "3.3.1"- resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.1.tgz#115aa1a9998ffab6196f93076ad6da3b913662ae"- integrity sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw==+ version "3.3.3"+ resolved "https://registry.yarnpkg.com/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz#55ac43a1db8ae639a4bd99511c148cdd1b83a1b0"+ integrity sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==dependencies:toggle-selection "^1.0.6"@@ -7474,13 +7422,11 @@ fragment-cache@^0.2.1:dependencies:map-cache "^0.2.2"-framer-motion@^8.5.2:- version "8.5.2"- resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-8.5.2.tgz#8f14c5bbbd429e7add5a3098de5f50e32a074d32"- integrity sha512-dt1WwCUIlJ24N/PCCayr0BZJcHOfU/L7kO8fgG8SxcAiGufaNg+Xl0oD14z7mRTGLrqRdA1ZlMW5Wr77aO1Xuw==+framer-motion@^10.0.0:+ version "10.0.0"+ resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-10.0.0.tgz#56e4cefa2a15cb052576e525f445414bf1ddac56"+ integrity sha512-qVmndcu4Z3q5ftqcbUCvVewHc5yiw4uIZyM0uvJ0/spj9lza/FnWywUUc8DNIZTG1my6nFsNLRPGDruP4o6eIw==dependencies:- "@motionone/dom" "^10.15.3"- hey-listen "^1.0.8"tslib "^2.4.0"optionalDependencies:"@emotion/is-prop-valid" "^0.8.2"@@ -7915,11 +7861,6 @@ hast-util-whitespace@^2.0.0:resolved "https://registry.yarnpkg.com/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz#4fc1086467cc1ef5ba20673cb6b03cec3a970f1c"integrity sha512-Pkw+xBHuV6xFeJprJe2BBEoDV+AvQySaz3pPDRUs5PNZEMQjpXJJueqrpcHIXxnWTcAGi/UOCgVShlkY6kLoqg==-hey-listen@^1.0.8:- version "1.0.8"- resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68"- integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q==-hoist-non-react-statics@^3.3.1:version "3.3.2"resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"@@ -8390,6 +8331,11 @@ is-hexadecimal@^2.0.0:resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-2.0.1.tgz#86b5bf668fca307498d319dfc03289d781a90027"integrity sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==+is-hotkey@^0.2.0:+ version "0.2.0"+ resolved "https://registry.yarnpkg.com/is-hotkey/-/is-hotkey-0.2.0.tgz#1835a68171a91e5c9460869d96336947c8340cef"+ integrity sha512-UknnZK4RakDmTgz4PI1wIph5yxSs/mvChWs9ifnlXsKuXgWmOkY/hAE0H/k2MIqH0RlRye0i1oC07MCRSD28Mw==+is-interactive@^1.0.0:version "1.0.0"resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e"@@ -11050,11 +10996,6 @@ react-focus-lock@^2.9.2:use-callback-ref "^1.3.0"use-sidecar "^1.1.2"-react-hook-form@^7.37.0:- version "7.38.0"- resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.38.0.tgz#53d6a68df587ce4ce88352f63e0ecc7fc8779320"- integrity sha512-gxWW1kMeru9xR1GoR+Iw4hA+JBOM3SHfr4DWCUKY0xc7Vv1MLsF109oHtBeWl9shcyPFx67KHru44DheN0XY5A==-[email protected], react-icons@^4.7.1:version "4.7.1"resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.7.1.tgz#0f4b25a5694e6972677cb189d2a72eabea7a8345"@@ -12531,7 +12472,7 @@ tsconfig-paths@^4.0.0:minimist "^1.2.6"strip-bom "^3.0.0"[email protected], tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.3.1, tslib@^2.4.0:[email protected], tslib@^2.0.0, tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0:version "2.4.0"resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==@@ -13389,10 +13330,10 @@ yocto-queue@^0.1.0:resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b"integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==- version "1.3.1"- resolved "https://registry.yarnpkg.com/zod-form-data/-/zod-form-data-1.3.1.tgz#9f2d8cab45ad052e995986c0ec6e2e53f0f7f88e"- integrity sha512-Uicl6vXkAqsc58Zj8ktmIJOIa3W+iI1fbfFNlGbfxBXiSZzuOiSKvIQQZAvU8H14kVgpKUpvhnBlrskis5t8HQ==+ version "2.0.0"+ resolved "https://registry.yarnpkg.com/zod-form-data/-/zod-form-data-2.0.0.tgz#113108e0a9c559b3bb67ab045ca1287904adec40"+ integrity sha512-NmQVAcL4/W1PEWaS3hGXM3DxRSiOsX8p7vHPF3rt6aQs2+Nqxs4QuapZ1ncv3E+iRN86zthbZJRvz6q9Jl5A/g==zod@^3.20.2:version "3.20.2"