Skip to content
This repository has been archived by the owner on Sep 24, 2024. It is now read-only.

Commit

Permalink
chore: update labels
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed Jan 29, 2024
1 parent 6a18da7 commit 10735cb
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 48 deletions.
4 changes: 2 additions & 2 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"prepare": "touch ./public/config.local.js"
},
"dependencies": {
"@commercelayer/app-elements": "^1.12.3",
"@commercelayer/sdk": "5.28.0",
"@commercelayer/app-elements": "^1.12.4",
"@commercelayer/sdk": "5.30.0",
"@hookform/resolvers": "^3.3.4",
"lodash": "^4.17.21",
"react": "^18.2.0",
Expand Down
11 changes: 4 additions & 7 deletions packages/app/src/components/PromotionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export function PromotionForm({
const [, setLocation] = useLocation()
const methods = useForm<z.infer<typeof promotionConfig.form>>({
defaultValues,
resolver: zodResolver(promotionConfig.form),
mode: 'onTouched'
resolver: zodResolver(promotionConfig.form)
})

useEffect(
Expand Down Expand Up @@ -93,10 +92,8 @@ export function PromotionForm({
<HookedInputDate name='expires_at' label='Expires on' />
</Grid>
</Spacer>
</Section>
</Spacer>
<Spacer top='14'>
<Section title='Discount'>

{/* follows the promotion specific fields */}
<Spacer top='6'>
<HookedInput
type='number'
Expand All @@ -105,7 +102,7 @@ export function PromotionForm({
name='percentage'
label='Percentage discount'
hint={{
text: 'How much the order subtotal is discounted in percentage.'
text: 'The applied percentage discount.'
}}
/>
</Spacer>
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/data/ruleBuilder/form/RuleBuilderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export function RuleBuilderForm({
methods.formState.isSubmitting || !methods.formState.isValid
}
>
Add condition
Add
</Button>
</Spacer>
</HookedForm>
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/hooks/useDeleteOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ export function useDeleteOverlay(): OverlayHook {
show: open,
Overlay: ({ promotion }) => {
return (
<OverlayElement>
<OverlayElement backgroundColor='light'>
<PageHeading
title={`Confirm that you want to cancel the promotion ${promotion.name}`}
navigationButton={{
onClick: () => {
close()
},
label: 'Cancel',
label: 'Close',
icon: 'x'
}}
description='This action cannot be undone, proceed with caution.'
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/EditPromotionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function Page(
mode={mode}
gap='only-top'
navigationButton={{
label: 'Cancel',
label: 'Close',
icon: 'x',
onClick() {
setLocation(
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/pages/NewSelectTypePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function Page(): JSX.Element {
mode={mode}
gap='only-top'
navigationButton={{
label: 'Cancel',
label: 'Close',
icon: 'x',
onClick() {
setLocation(appRoutes.home.makePath({}))
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/pages/PromotionConditionsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Page(
mode={mode}
gap='only-top'
navigationButton={{
label: 'Cancel',
label: 'Close',
icon: 'x',
onClick() {
setLocation(
Expand Down Expand Up @@ -88,7 +88,7 @@ function Page(
<Spacer top='2'>
<ButtonCard
fullWidth
iconLabel='Add condition'
iconLabel='New condition'
onClick={() => {
setLocation(
appRoutes.newPromotionCondition.makePath({
Expand Down
42 changes: 10 additions & 32 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 10735cb

Please sign in to comment.