Compare commits
2 Commits
682c390220
...
b6102d0b31
| Author | SHA1 | Date | |
|---|---|---|---|
| b6102d0b31 | |||
| 3f0963d3e8 |
@ -66,7 +66,6 @@ export const NewDepartmentModal = ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const statusValue = watch("is_active");
|
|
||||||
const parentIdValue = watch("parent_id");
|
const parentIdValue = watch("parent_id");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -166,14 +165,14 @@ export const NewDepartmentModal = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FormSelect
|
{/* <FormSelect
|
||||||
label="Status"
|
label="Status"
|
||||||
required
|
required
|
||||||
options={statusOptions}
|
options={statusOptions}
|
||||||
value={String(statusValue)}
|
value={String(statusValue)}
|
||||||
onValueChange={(value) => setValue("is_active", value === "true")}
|
onValueChange={(value) => setValue("is_active", value === "true")}
|
||||||
error={errors.is_active?.message}
|
error={errors.is_active?.message}
|
||||||
/>
|
/> */}
|
||||||
</form>
|
</form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -48,8 +48,6 @@ export const NewDesignationModal = ({
|
|||||||
const {
|
const {
|
||||||
register,
|
register,
|
||||||
handleSubmit,
|
handleSubmit,
|
||||||
setValue,
|
|
||||||
watch,
|
|
||||||
reset,
|
reset,
|
||||||
clearErrors,
|
clearErrors,
|
||||||
formState: { errors },
|
formState: { errors },
|
||||||
@ -62,8 +60,6 @@ export const NewDesignationModal = ({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const statusValue = watch("is_active");
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isOpen) {
|
if (!isOpen) {
|
||||||
reset();
|
reset();
|
||||||
@ -141,14 +137,14 @@ export const NewDesignationModal = ({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<FormSelect
|
{/* <FormSelect
|
||||||
label="Status"
|
label="Status"
|
||||||
required
|
required
|
||||||
options={statusOptions}
|
options={statusOptions}
|
||||||
value={String(statusValue)}
|
value={String(statusValue)}
|
||||||
onValueChange={(value) => setValue("is_active", value === "true")}
|
onValueChange={(value) => setValue("is_active", value === "true")}
|
||||||
error={errors.is_active?.message}
|
error={errors.is_active?.message}
|
||||||
/>
|
/> */}
|
||||||
</form>
|
</form>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -30,7 +30,13 @@ const newModuleSchema = z.object({
|
|||||||
.min(1, 'runtime_language is required')
|
.min(1, 'runtime_language is required')
|
||||||
.max(50, 'runtime_language must be at most 50 characters'),
|
.max(50, 'runtime_language must be at most 50 characters'),
|
||||||
framework: z.string().max(50, 'framework must be at most 50 characters').optional().nullable(),
|
framework: z.string().max(50, 'framework must be at most 50 characters').optional().nullable(),
|
||||||
webhookurl: z.string().max(500, "webhookurl must be at most 500 characters").url("Invalid URL format").nullable(),
|
webhookurl: z
|
||||||
|
.union([
|
||||||
|
z.string().url("Invalid URL format").max(500, "webhookurl must be at most 500 characters"),
|
||||||
|
z.literal("").transform(() => null),
|
||||||
|
z.null(),
|
||||||
|
])
|
||||||
|
.optional(),
|
||||||
frontend_base_url: z
|
frontend_base_url: z
|
||||||
.string()
|
.string()
|
||||||
.min(1, 'frontend_base_url is required')
|
.min(1, 'frontend_base_url is required')
|
||||||
|
|||||||
@ -437,11 +437,11 @@ const Users = (): ReactElement => {
|
|||||||
label="Status"
|
label="Status"
|
||||||
options={[
|
options={[
|
||||||
{ value: "active", label: "Active" },
|
{ value: "active", label: "Active" },
|
||||||
{
|
// {
|
||||||
value: "pending_verification",
|
// value: "pending_verification",
|
||||||
label: "Pending Verification",
|
// label: "Pending Verification",
|
||||||
},
|
// },
|
||||||
{ value: "inactive", label: "Inactive" },
|
// { value: "inactive", label: "Inactive" },
|
||||||
{ value: "suspended", label: "Suspended" },
|
{ value: "suspended", label: "Suspended" },
|
||||||
{ value: "deleted", label: "Deleted" },
|
{ value: "deleted", label: "Deleted" },
|
||||||
]}
|
]}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user