From 5309521632eac84f1cc91de75e4dc43bec7aa0ec Mon Sep 17 00:00:00 2001 From: vhande Date: Wed, 22 May 2024 14:08:36 +0200 Subject: [PATCH] Update website fe --- .../Integrations/Detail/BasicInfo.tsx | 17 +++++++++++++++++ .../Integrations/Detail/IntegrationSettings.tsx | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/resources/ts/Components/Integrations/Detail/BasicInfo.tsx b/resources/ts/Components/Integrations/Detail/BasicInfo.tsx index 067fbd8e9..35f585a02 100644 --- a/resources/ts/Components/Integrations/Detail/BasicInfo.tsx +++ b/resources/ts/Components/Integrations/Detail/BasicInfo.tsx @@ -8,16 +8,20 @@ import { Heading } from "../../Heading"; type Props = { name: string; description: string; + website: string; errors: Record; onChangeName: (val: string) => void; onChangeDescription: (val: string) => void; + onChangeWebsite: (val: string) => void; }; export const BasicInfo = ({ name, description, + website, errors, onChangeName, onChangeDescription, + onChangeWebsite, }: Props) => { const { t } = useTranslation(); @@ -55,6 +59,19 @@ export const BasicInfo = ({ /> } /> + onChangeWebsite(e.target.value)} + className="md:min-w-[40rem]" + /> + } + /> ); diff --git a/resources/ts/Components/Integrations/Detail/IntegrationSettings.tsx b/resources/ts/Components/Integrations/Detail/IntegrationSettings.tsx index 2b505180f..4492e3a71 100644 --- a/resources/ts/Components/Integrations/Detail/IntegrationSettings.tsx +++ b/resources/ts/Components/Integrations/Detail/IntegrationSettings.tsx @@ -99,6 +99,7 @@ export const IntegrationSettings = ({ name, type, description, + website, urls, keyVisibility, onChangeIsFormDirty, @@ -113,6 +114,7 @@ export const IntegrationSettings = ({ const basicInfoForm = useBasicInfoForm({ integrationName: name, description, + website, }); const urlsForm = useUrlsForm({ @@ -192,7 +194,7 @@ export const IntegrationSettings = ({ resolve(undefined); basicInfoForm.setDefaults(); }, - only: ["name", "description", "errors"], + only: ["name", "description", "website", "errors"], }); }); }; @@ -242,10 +244,12 @@ export const IntegrationSettings = ({ basicInfoForm.setData("integrationName", name)} onChangeDescription={(description) => basicInfoForm.setData("description", description) } + onChangeWebsite={(website) => basicInfoForm.setData("website", website)} errors={basicInfoForm.errors} />