use warning type for Alerts
This commit is contained in:
parent
a4f0bc717a
commit
6163dbf994
@ -12,12 +12,18 @@ const Grid = styled(Flex)`
|
||||
`;
|
||||
|
||||
const Validation = observer(() => {
|
||||
const store = useStore();
|
||||
const { $tables, $process } = useStore();
|
||||
|
||||
const errors = store.$tables.fingap.validation.getErrors();
|
||||
const errors = $tables.fingap.validation.getErrors();
|
||||
|
||||
if (errors?.length) {
|
||||
return <Alert type="error" banner message={errors[0].message} />;
|
||||
return (
|
||||
<Alert
|
||||
type={$process.has('Unlimited') ? 'warning' : 'error'}
|
||||
banner
|
||||
message={errors[0].message}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -17,12 +17,18 @@ const TableWrapper = styled.div`
|
||||
`;
|
||||
|
||||
const Validation = observer(() => {
|
||||
const store = useStore();
|
||||
const { $tables, $process } = useStore();
|
||||
|
||||
const errors = store.$tables.insurance.validation.getErrors();
|
||||
const errors = $tables.insurance.validation.getErrors();
|
||||
|
||||
if (errors?.length) {
|
||||
return <Alert type="error" banner message={errors[0].message} />;
|
||||
return (
|
||||
<Alert
|
||||
type={$process.has('Unlimited') ? 'warning' : 'error'}
|
||||
banner
|
||||
message={errors[0].message}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@ -30,13 +30,19 @@ const TablesGroupGrid = styled(Box)`
|
||||
`;
|
||||
|
||||
const Validation = observer(() => {
|
||||
const store = useStore();
|
||||
const { payments } = store.$tables;
|
||||
const { $tables, $process } = useStore();
|
||||
const { payments } = $tables;
|
||||
|
||||
const errors = payments.validation.getErrors();
|
||||
|
||||
if (errors?.length) {
|
||||
return <Alert type="error" banner message={errors[0].message} />;
|
||||
return (
|
||||
<Alert
|
||||
type={$process.has('Unlimited') ? 'warning' : 'error'}
|
||||
banner
|
||||
message={errors[0].message}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user