Skip to content

Commit

Permalink
HOTFIX: 사파리 구버전 정규표현식 미지원 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
sjsjsj1246 committed Nov 12, 2023
1 parent 01451cf commit 1713568
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dutying-web",
"private": true,
"version": "0.7.0",
"version": "0.7.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
10 changes: 2 additions & 8 deletions src/hooks/shift/useEditShift/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ export const updateCheckFaultOption = (wardConstraint: WardConstraint): CheckFau
maxContinuousWork: {
type: 'wrong',
isActive: wardConstraint.maxContinuousWork,
regExp: new RegExp(
`(?<=[^den])[den]{${wardConstraint.maxContinuousWorkVal + 1},}(?=[^den])`,
'g'
),
regExp: new RegExp(`[den][den]{${wardConstraint.maxContinuousWorkVal - 1},}[den]`, 'g'),
message: `근무는 연속 ${wardConstraint.maxContinuousWorkVal}일을 초과할 수 없습니다.`,
value: wardConstraint.maxContinuousWorkVal,
label: '연속 근무 수',
Expand All @@ -121,10 +118,7 @@ export const updateCheckFaultOption = (wardConstraint: WardConstraint): CheckFau
minContinuousNight: {
type: 'bad',
isActive: wardConstraint.minContinuousNight,
regExp: new RegExp(
`(?<!(n|-))n{1,${wardConstraint.minContinuousNightVal - 1}}(?!(n|-))`,
'g'
),
regExp: new RegExp(`[^n-]n{1,${wardConstraint.minContinuousNightVal - 1}}[^n-]`, 'g'),
message: `나이트 근무는 최소 ${wardConstraint.minContinuousNightVal}일 이상 배정해야 합니다.`,
value: wardConstraint.minContinuousNightVal,
label: '연속 나이트',
Expand Down

0 comments on commit 1713568

Please sign in to comment.