This commit is contained in:
@@ -173,6 +173,10 @@ function normalizePrxyCtrtCn(raw: unknown): string | null {
|
||||
return s;
|
||||
}
|
||||
|
||||
function isMainFacilityRow(row: Record<string, string | number>): boolean {
|
||||
return String(row.isMainYn ?? '').toUpperCase() === 'Y';
|
||||
}
|
||||
|
||||
function isValidPrxyCtrtCn(value: string | null): boolean {
|
||||
if (value === null) return true;
|
||||
if (!/^\d{8}~\d{8}$/.test(value)) return false;
|
||||
@@ -1540,13 +1544,25 @@ const PublicSewageFacilityInp = () => {
|
||||
showHeaderCheckbox={false}
|
||||
enableSort={false}
|
||||
cellStyleCallback={({ row, fieldName }) => {
|
||||
const lockPrxyCtrtCn =
|
||||
fieldName === 'prxyCtrtCn' && isMainFacilityRow(row);
|
||||
const verification = (row as GridRowWithVerification).verificationResult;
|
||||
if (!verification) return;
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
const hasImr = errors.some((e) => e.vrfcCd === "IMR" || e.vrfcCd === "HB");
|
||||
return hasImr ? "rg-cell-verify-error-imr" : "rg-cell-verify-error";
|
||||
let verifyStyle: string | undefined;
|
||||
if (verification) {
|
||||
const errors = verification[fieldName];
|
||||
if (Array.isArray(errors) && errors.length > 0) {
|
||||
const hasImr = errors.some((e) => e.vrfcCd === "IMR" || e.vrfcCd === "HB");
|
||||
verifyStyle = hasImr ? "rg-cell-verify-error-imr" : "rg-cell-verify-error";
|
||||
}
|
||||
}
|
||||
if (lockPrxyCtrtCn) {
|
||||
return {
|
||||
editable: false,
|
||||
readOnly: true,
|
||||
styleName: [verifyStyle, 'rg-cell-readonly'].filter(Boolean).join(' ') || 'rg-cell-readonly',
|
||||
};
|
||||
}
|
||||
return verifyStyle;
|
||||
}}
|
||||
footerVerificationResult={
|
||||
footerVerificationByTab.get(tab.tabKey) ?? null
|
||||
|
||||
@@ -761,7 +761,7 @@ const FomulaDialog = ({ open, onOpenChange, data, trgtStatsCd, trgtStatsNm, allo
|
||||
onClick={() => {
|
||||
if (isUserDirectInputMode) {
|
||||
setFormulaSaveError(null);
|
||||
const raw = formulaDisplaySegments.join("");
|
||||
const raw = formulaDisplaySegments.join("").replace(/\s+/g, "");
|
||||
const wrapped = wrapWithBacktick(raw);
|
||||
const isEmptyFormula = raw.trim().length === 0;
|
||||
const refStats = resolveRefStatsForConfirm(isEmptyFormula);
|
||||
|
||||
+2
@@ -170,6 +170,7 @@ export const PublicSewageFactColumn = {
|
||||
{ name: 'admdstNm', fieldName: 'admdstNm', header: { text: '행정구역명' }, visible: false, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'fcltSn', fieldName: 'fcltSn', header: { text: '처리시설일련번호' }, visible: false, editable: false, valueType: ValueType.TEXT, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'swtrmtFcltCd', fieldName: 'swtrmtFcltCd', header: { text: '하수처리시설코드' }, visible: false, editable: false, styleName: 'rg-cell-readonly' },
|
||||
{ name: 'isMainYn', fieldName: 'isMainYn', header: { text: '중심처리시설여부' }, visible: false, editable: false, styleName: 'rg-cell-readonly' },
|
||||
],
|
||||
|
||||
columnLayout: [
|
||||
@@ -271,6 +272,7 @@ export const PublicSewageFactColumn = {
|
||||
'admdstCd',
|
||||
'fcltSn',
|
||||
'swtrmtFcltCd',
|
||||
'isMainYn',
|
||||
],
|
||||
rowStartNum: 3,
|
||||
fixedColumns: 2,
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ export interface PublicSewageFacilityItem {
|
||||
sggNm: string;
|
||||
admdstNm: string;
|
||||
fcltSn: number;
|
||||
isMainYn: string;
|
||||
swtrmtFcltCd: string;
|
||||
swtrmtFcltNm: string;
|
||||
fcltPstnCn: string | null;
|
||||
|
||||
@@ -29,7 +29,6 @@ export interface VerificationInputReportItem {
|
||||
rsnExpln: string;
|
||||
nowVlCn: string;
|
||||
compVlCn: string | null;
|
||||
vrfcStatusNm: string;
|
||||
}
|
||||
|
||||
export interface VerificationInputReportPageInfo {
|
||||
|
||||
Reference in New Issue
Block a user