toast 메시지 추가

alert 글로벌화
loading 글로벌화
This commit is contained in:
2025-04-25 15:33:21 +09:00
parent d2ac5b338e
commit 826459f304
50 changed files with 3211 additions and 2385 deletions

View File

@@ -29,13 +29,15 @@ import LandInfoSearchBar, { useLandInfoSearch } from '../../components/ServiceMa
import { TableSkeleton } from '../../components/Skeleton/TableSkeleton';
import OwnerChangeModal from '../../components/ServiceManage/modal/OwnerChangeModal';
import { opLandInfoStatusType } from '../../assets/data/options';
import { useAlert } from '../../context/AlertProvider';
import { alertTypes } from '../../assets/data/types';
const LandInfoView = () => {
const token = sessionStorage.getItem('token');
const navigate = useNavigate();
const userInfo = useRecoilValue(authList);
const { t } = useTranslation();
const tableRef = useRef(null);
const {showToast} = useAlert();
const [detailData, setDetailData] = useState({});
@@ -48,7 +50,6 @@ const LandInfoView = () => {
deleteConfirm: 'hidden',
deleteComplete: 'hidden'
});
const [alertMsg, setAlertMsg] = useState('');
const [modalType, setModalType] = useState('regist');
const {
@@ -80,7 +81,7 @@ const LandInfoView = () => {
setModalType('regist');
const selectRow = selectedRows[0];
if(!selectRow.owned) {
setAlertMsg(t('LAND_OWNED_CHANGES_WARNING'))
showToast('LAND_OWNED_CHANGES_WARNING', {type:alertTypes.warning});
return;
}
const owner_changes = selectRow.owner_changes;
@@ -147,15 +148,12 @@ const LandInfoView = () => {
// // fetchData(option);
// window.location.reload();
// break;
case "warning":
setAlertMsg('')
break;
}
}
const handleDetailView = () => {
handleModalClose('detail');
handleSearch();
handleSearch(updateSearchParams);
removeSelectedRows();
}
@@ -235,14 +233,12 @@ const LandInfoView = () => {
</>
}
<OwnerChangeModal modalType={modalType} detailView={modalState.detailModal} handleDetailView={() => handleDetailView()} content={detailData} setDetailData={setDetailData} />
<DynamicModal
modalType={modalTypes.completed}
view={alertMsg ? 'view' : 'hidden'}
modalText={alertMsg}
handleSubmit={() => handleModalSubmit('warning')}
<OwnerChangeModal
modalType={modalType}
detailView={modalState.detailModal}
handleDetailView={() => handleDetailView()}
content={detailData}
setDetailData={setDetailData}
/>
</>
);