diff --git a/apps/web/src/common/components/OrgEdit/ManageOrgEdit.tsx b/apps/web/src/common/components/OrgEdit/ManageOrgEdit.tsx index 136fa962..fdf6812c 100644 --- a/apps/web/src/common/components/OrgEdit/ManageOrgEdit.tsx +++ b/apps/web/src/common/components/OrgEdit/ManageOrgEdit.tsx @@ -17,18 +17,21 @@ const ManageOrgEdit = ({ level, contributor, name, + provider, setShowEdit, }: { label?: string; level?: string; contributor?: string; name?: string; + provider?: string; setShowEdit: (b: boolean) => void; }) => { const { t } = useTranslation(); const [orgName, setOrgName] = useState(name || ''); const [date, setDate] = useState(null); const [form] = Form.useForm(); + const onCheck = async () => { try { const values = await form.validateFields(); @@ -39,7 +42,7 @@ const ManageOrgEdit = ({ label, level, contributor, - platform: 'github', + platform: provider, organizations: [{ orgName, firstDate, lastDate }], }); } catch (errorInfo) { diff --git a/apps/web/src/common/components/OrgEdit/index.tsx b/apps/web/src/common/components/OrgEdit/index.tsx index 4905f716..db72f05a 100644 --- a/apps/web/src/common/components/OrgEdit/index.tsx +++ b/apps/web/src/common/components/OrgEdit/index.tsx @@ -20,12 +20,14 @@ const OrgEdit = ({ organizations = [], type = 'add', index, + provider, setShowEdit, onSuccess, }: { organizations?: ContributorOrgInput[]; type?: 'add' | 'edit'; index?: number; + provider: string; setShowEdit: (b: boolean) => void; onSuccess?: () => void; }) => { @@ -51,12 +53,12 @@ const OrgEdit = ({ if (type === 'edit') { organizations[index] = { orgName, firstDate, lastDate }; mutation.mutate({ - platform: 'github', + platform: provider, organizations: [...organizations], }); } else { mutation.mutate({ - platform: 'github', + platform: provider, organizations: [{ orgName, firstDate, lastDate }, ...organizations], }); } diff --git a/apps/web/src/modules/analyze/DataView/MetricDetail/MetricContributor/ContributorContribution.tsx b/apps/web/src/modules/analyze/DataView/MetricDetail/MetricContributor/ContributorContribution.tsx index 29c75474..74a9c16e 100644 --- a/apps/web/src/modules/analyze/DataView/MetricDetail/MetricContributor/ContributorContribution.tsx +++ b/apps/web/src/modules/analyze/DataView/MetricDetail/MetricContributor/ContributorContribution.tsx @@ -23,7 +23,7 @@ const ContributorContribution: React.FC<{ const [onlyOrg, setOnlyOrg] = useState(false); return ( -
+
+
{ setOpenConfirm(false); }} diff --git a/apps/web/src/modules/analyze/DataView/MetricDetail/index.tsx b/apps/web/src/modules/analyze/DataView/MetricDetail/index.tsx index 7aaf3842..9c1dc6e0 100644 --- a/apps/web/src/modules/analyze/DataView/MetricDetail/index.tsx +++ b/apps/web/src/modules/analyze/DataView/MetricDetail/index.tsx @@ -14,6 +14,7 @@ import LoadingAnalysis from '@modules/analyze/DataView/Status/LoadingAnalysis'; import LabelItems from '@modules/analyze/components/NavBar/LabelItems'; import { useRouter } from 'next/router'; import { useHandleQueryParams } from '@modules/analyze/hooks/useHandleQueryParams'; +import { Select } from 'antd'; const VerifyMetricDetail = () => { const { isLoading } = useVerifyDetailRangeQuery(); @@ -79,7 +80,7 @@ const MetricDetail = () => { {t('analyze:metric_detail:project_deep_dive_insight')}
-
+
{ }} />
+
+