Fixed docker deploments, moved files to _folders in dispatch app

This commit is contained in:
PxlLoewe
2025-05-27 17:34:44 -07:00
parent 5d5b2dc91f
commit 571ddfba85
60 changed files with 251 additions and 406 deletions

View File

@@ -1,20 +1,11 @@
"use client";
import {
FieldValues,
Path,
RegisterOptions,
UseFormReturn,
} from "react-hook-form";
import SelectTemplate, {
Props as SelectTemplateProps,
StylesConfig,
} from "react-select";
import { cn } from "helpers/cn";
import { FieldValues, Path, RegisterOptions, UseFormReturn } from "react-hook-form";
import SelectTemplate, { Props as SelectTemplateProps, StylesConfig } from "react-select";
import { cn } from "_helpers/cn";
import dynamic from "next/dynamic";
import { CSSProperties } from "react";
interface SelectProps<T extends FieldValues>
extends Omit<SelectTemplateProps, "form"> {
interface SelectProps<T extends FieldValues> extends Omit<SelectTemplateProps, "form"> {
label?: any;
name: Path<T>;
form: UseFormReturn<T> | any;
@@ -69,9 +60,7 @@ const SelectCom = <T extends FieldValues>({
}: SelectProps<T>) => {
return (
<div>
<span className="label-text text-lg flex items-center gap-2">
{label}
</span>
<span className="label-text text-lg flex items-center gap-2">{label}</span>
<SelectTemplate
onChange={(newValue: any) => {
if (Array.isArray(newValue)) {
@@ -88,12 +77,8 @@ const SelectCom = <T extends FieldValues>({
}}
value={
(inputProps as any)?.isMulti
? (inputProps as any).options?.filter((o: any) =>
form.watch(name)?.includes(o.value),
)
: (inputProps as any).options?.find(
(o: any) => o.value === form.watch(name),
)
? (inputProps as any).options?.filter((o: any) => form.watch(name)?.includes(o.value))
: (inputProps as any).options?.find((o: any) => o.value === form.watch(name))
}
styles={customStyles as any}
className={cn("w-full placeholder:text-neutral-600", className)}
@@ -101,17 +86,13 @@ const SelectCom = <T extends FieldValues>({
{...inputProps}
/>
{form.formState.errors[name]?.message && (
<p className="text-error">
{form.formState.errors[name].message as string}
</p>
<p className="text-error">{form.formState.errors[name].message as string}</p>
)}
</div>
);
};
const SelectWrapper = <T extends FieldValues>(props: SelectProps<T>) => (
<SelectCom {...props} />
);
const SelectWrapper = <T extends FieldValues>(props: SelectProps<T>) => <SelectCom {...props} />;
export const Select = dynamic(() => Promise.resolve(SelectWrapper), {
ssr: false,