연계정보관리 소스 수정
This commit is contained in:
@@ -53,8 +53,8 @@ const columns = [
|
||||
header: '연계서버 IP',
|
||||
cell: (info) => (info.getValue() ? info.getValue() : '-'),
|
||||
}),
|
||||
columnHelper.accessor('link_batch_time', {
|
||||
id: 'link_batch_time',
|
||||
columnHelper.accessor('link_cycle_mi', {
|
||||
id: 'link_cycle_mi',
|
||||
header: '연계 주기',
|
||||
cell: (info) => convertMinutesToPeriod(Number(info.getValue())),
|
||||
}),
|
||||
|
||||
@@ -336,7 +336,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink,
|
||||
<TableCell>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="link_batch_time"
|
||||
name="link_cycle_mi"
|
||||
render={({ field }) => {
|
||||
const timeParts = convertMinutesToPeriod(Number(field.value));
|
||||
return (
|
||||
@@ -434,9 +434,9 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink,
|
||||
</div>
|
||||
</div>
|
||||
</FormControl>
|
||||
{form.formState.errors.link_batch_time && (
|
||||
{form.formState.errors.link_cycle_mi && (
|
||||
<p className="text-red-500 text-base pt-2">
|
||||
{form.formState.errors.link_batch_time.message}
|
||||
{form.formState.errors.link_cycle_mi.message}
|
||||
</p>
|
||||
)}
|
||||
</FormItem>
|
||||
@@ -520,7 +520,7 @@ const LinkForm = ({ form, linkSn, updateLinkInfo, handleInsertLink, deleteLink,
|
||||
<TableCell>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="mdfr"
|
||||
name="mdfr_id"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
|
||||
@@ -35,7 +35,7 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) {
|
||||
mutationFn: (data: LinkFormData) => LinkApi.updateLinkInfo({
|
||||
...data,
|
||||
link_clsf_cd: data.link_clsf_cd !== 'none' ? data.link_clsf_cd : null,
|
||||
mdfr: userUniqId
|
||||
mdfr_id: userUniqId
|
||||
}),
|
||||
onSuccess: () => {
|
||||
alert('수정되었습니다.');
|
||||
@@ -73,11 +73,11 @@ function ModifyLinkPage({ linkSn }: { linkSn: string }) {
|
||||
if (linkInfo) {
|
||||
let newData = { ...linkInfo };
|
||||
|
||||
if (linkInfo.mdfr) {
|
||||
if (linkInfo.mdfr_id) {
|
||||
const userName = await fetchUserInfo();
|
||||
newData = {
|
||||
...linkInfo,
|
||||
mdfr: userName,
|
||||
mdfr_id: userName,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ function RegistLinkPage() {
|
||||
link_id: '',
|
||||
link_pswd: '',
|
||||
srvc_usg: '',
|
||||
link_batch_time: 5,
|
||||
link_cycle_mi: 5,
|
||||
link_clsf_cd: 'none',
|
||||
},
|
||||
});
|
||||
@@ -44,8 +44,8 @@ function RegistLinkPage() {
|
||||
const insertData = {
|
||||
...data,
|
||||
link_clsf_cd: data.link_clsf_cd !== 'none' ? data.link_clsf_cd : null,
|
||||
next_link_excn_dt: dayjs().add(Number(data.link_batch_time), 'minute').format('YYYY-MM-DD HH:mm:ss'),
|
||||
mdfr: userUniqId,
|
||||
next_link_excn_dt: dayjs().add(Number(data.link_cycle_mi), 'minute').format('YYYY-MM-DD HH:mm:ss'),
|
||||
mdfr_id: userUniqId,
|
||||
};
|
||||
|
||||
insertLinkInfo(insertData);
|
||||
|
||||
@@ -292,7 +292,7 @@ function LinkParamsDialog({ selectedLink, form, insertLinkVrbl, dialogOpen, onOp
|
||||
<TableCell>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="mdfr"
|
||||
name="mdfr_id"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
|
||||
@@ -112,7 +112,7 @@ function LinkParamsPage() {
|
||||
await LinkApi.insertLinkVrbl({
|
||||
...data,
|
||||
link_sn: selectedLink.linkSn,
|
||||
mdfr: userUniqId,
|
||||
mdfr_id: userUniqId,
|
||||
}),
|
||||
onSuccess: async () => {
|
||||
// 쿼리 무효화를 통한 최신 데이터 가져오기
|
||||
@@ -128,7 +128,7 @@ function LinkParamsPage() {
|
||||
mutationFn: async (data: LinkVrblFormData) => await LinkApi.updateLinkVrblInfo({
|
||||
...data,
|
||||
link_sn: selectedLink.linkSn,
|
||||
mdfr: userUniqId,
|
||||
mdfr_id: userUniqId,
|
||||
}),
|
||||
onSuccess: async () => {
|
||||
await queryClient.invalidateQueries({
|
||||
@@ -229,11 +229,11 @@ function LinkParamsPage() {
|
||||
if (linkVrblInfo) {
|
||||
let newData = { ...linkVrblInfo };
|
||||
|
||||
if (linkVrblInfo.mdfr) {
|
||||
if (linkVrblInfo.mdfr_id) {
|
||||
const userName = await fetchUserInfo();
|
||||
newData = {
|
||||
...linkVrblInfo,
|
||||
mdfr: userName,
|
||||
mdfr_id: userName,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink
|
||||
col_seq: null,
|
||||
pk_yn: 'N',
|
||||
mdfcn_dt: '',
|
||||
mdfr: '',
|
||||
mdfr_id: '',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ function LinkTableDialog({ dialogOpen, onOpenChange, form, tableInfo, insertLink
|
||||
<TableCell>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="mdfr"
|
||||
name="mdfr_id"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormControl>
|
||||
|
||||
@@ -78,7 +78,7 @@ function LinkTablePage() {
|
||||
const { mutateAsync: insertLinkTableCol } = useMutation({
|
||||
mutationFn: async (data: LinkTableColData) => await LinkApi.insertLinkTableCol({
|
||||
...data,
|
||||
mdfr: userUniqId,
|
||||
mdfr_id: userUniqId,
|
||||
}),
|
||||
onSuccess: async () => {
|
||||
if (selectedTableInfo) {
|
||||
@@ -104,7 +104,7 @@ function LinkTablePage() {
|
||||
const { mutateAsync: updateLinkTableCol } = useMutation({
|
||||
mutationFn: async (data: LinkTableColData) => await LinkApi.updateLinkTableCol({
|
||||
...data,
|
||||
mdfr: userUniqId,
|
||||
mdfr_id: userUniqId,
|
||||
}),
|
||||
onSuccess: async () => {
|
||||
if (selectedTableInfo) {
|
||||
@@ -280,11 +280,11 @@ function LinkTablePage() {
|
||||
if (colInfo) {
|
||||
let newData = { ...colInfo };
|
||||
|
||||
if (colInfo.mdfr) {
|
||||
if (colInfo.mdfr_id) {
|
||||
const userName = await fetchUserInfo();
|
||||
newData = {
|
||||
...colInfo,
|
||||
mdfr: userName,
|
||||
mdfr_id: userName,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ function LinkTablePage() {
|
||||
if (await confirm(confirmMsg)) {
|
||||
insertLinkTableInfo({
|
||||
...data,
|
||||
mdfr: userUniqId,
|
||||
mdfr_id: userUniqId,
|
||||
tbl_sn: (regTblInfo.count > 0) ? regTblInfo.tbl_sn : "",
|
||||
});
|
||||
}
|
||||
@@ -330,7 +330,7 @@ function LinkTablePage() {
|
||||
updateLinkTableInfo({
|
||||
...data,
|
||||
tbl_sn: (regTblInfo.count > 0) ? regTblInfo.tbl_sn : "",
|
||||
mdfr: userUniqId,
|
||||
mdfr_id: userUniqId,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user