-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
5,814 additions
and
4,237 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -176,7 +176,6 @@ $white: #fff; | |
} | ||
} | ||
.v-theme--dark button.v-btn:hover :deep() { | ||
background: rgba(white, 0.1); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
import { ruleMessage } from '../../helpers/ruleMessage'; | ||
import { ValidationRule, ValidationResult, ErrorMessages, Value } from '../types'; | ||
import { ruleMessage } from '../../helpers/ruleMessage' | ||
import { | ||
ValidationRule, | ||
ValidationResult, | ||
ErrorMessages, | ||
Value, | ||
} from '../types' | ||
|
||
import { defaultErrorMessages } from './locales'; | ||
import { defaultErrorMessages } from './locales' | ||
|
||
import { isDateAfter } from '../../functions/validation/isDateAfter'; | ||
import { TODAY } from '../../constants'; | ||
import { isDateAfter } from '../../functions/validation/isDateAfter' | ||
import { TODAY } from '../../constants' | ||
|
||
/** Check that the value is not after today (DD/MM/YYYY format) */ | ||
export function notAfterTodayFn(errorMessages: ErrorMessages = defaultErrorMessages): ValidationRule { | ||
export function notAfterTodayFn( | ||
errorMessages: ErrorMessages = defaultErrorMessages | ||
): ValidationRule { | ||
return (value: Value): ValidationResult => { | ||
if (!value) { | ||
return true; | ||
return true | ||
} | ||
|
||
return !isDateAfter(TODAY, value) || ruleMessage(errorMessages, 'default'); | ||
}; | ||
return ( | ||
!isDateAfter(TODAY, value) || ruleMessage(errorMessages, 'default') | ||
) | ||
} | ||
} | ||
|
||
export const notAfterToday = notAfterTodayFn(); | ||
export const notAfterToday = notAfterTodayFn() |
29 changes: 19 additions & 10 deletions
29
packages/synapse-bridge/src/rules/notBeforeToday/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
import { ruleMessage } from '../../helpers/ruleMessage'; | ||
import { ValidationRule, ValidationResult, ErrorMessages, Value } from '../types'; | ||
import { ruleMessage } from '../../helpers/ruleMessage' | ||
import { | ||
ValidationRule, | ||
ValidationResult, | ||
ErrorMessages, | ||
Value, | ||
} from '../types' | ||
|
||
import { defaultErrorMessages } from './locales'; | ||
import { defaultErrorMessages } from './locales' | ||
|
||
import { isDateBefore } from '../../functions/validation/isDateBefore'; | ||
import { TODAY } from '../../constants'; | ||
import { isDateBefore } from '../../functions/validation/isDateBefore' | ||
import { TODAY } from '../../constants' | ||
|
||
/** Check that the value is not before today (DD/MM/YYYY format) */ | ||
export function notBeforeTodayFn(errorMessages: ErrorMessages = defaultErrorMessages): ValidationRule { | ||
export function notBeforeTodayFn( | ||
errorMessages: ErrorMessages = defaultErrorMessages | ||
): ValidationRule { | ||
return (value: Value): ValidationResult => { | ||
if (!value) { | ||
return true; | ||
return true | ||
} | ||
|
||
return !isDateBefore(TODAY, value) || ruleMessage(errorMessages, 'default'); | ||
}; | ||
return ( | ||
!isDateBefore(TODAY, value) || ruleMessage(errorMessages, 'default') | ||
) | ||
} | ||
} | ||
|
||
export const notBeforeToday = notBeforeTodayFn(); | ||
export const notBeforeToday = notBeforeTodayFn() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,7 +186,7 @@ a { | |
white-space: nowrap; | ||
} | ||
|
||
table thead th { | ||
table thead th { | ||
opacity: 0.6; | ||
font-size: 0.875rem; | ||
} | ||
|