diff options
Diffstat (limited to 'packages/merchant-backoffice-ui/src/components')
4 files changed, 29 insertions, 19 deletions
diff --git a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx index 012d14977..1d18685c5 100644 --- a/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx +++ b/packages/merchant-backoffice-ui/src/components/form/InputStock.tsx @@ -212,10 +212,7 @@ export function InputStock<T>({ withTimestampSupport /> - <InputGroup<Entity> - name="address" - label={i18n.str`Delivery address`} - > + <InputGroup<Entity> name="address" label={i18n.str`Warehouse address`}> <InputLocation name="address" /> </InputGroup> </FormProvider> diff --git a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx index 3d5f20c85..402134096 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/SideBar.tsx @@ -49,7 +49,7 @@ export function Sidebar({ isPasswordOk }: Props): VNode { const config = useConfigContext(); - const { url: backendURL } = useBackendContext() + const { url: backendURL, resetBackend } = useBackendContext() const { i18n } = useTranslationContext(); const kycStatus = useInstanceKYCDetails(); const needKYC = kycStatus.ok && kycStatus.data.type === "redirect"; @@ -80,7 +80,7 @@ export function Sidebar({ </div> </div> <div class="menu is-menu-main"> - {isPasswordOk && instance ? ( + {instance ? ( <Fragment> <ul class="menu-list"> <li> @@ -94,12 +94,12 @@ export function Sidebar({ </a> </li> <li> - <a href={"/products"} class="has-icon"> + <a href={"/inventory"} class="has-icon"> <span class="icon"> <i class="mdi mdi-shopping" /> </span> <span class="menu-item-label"> - <i18n.Translate>Products</i18n.Translate> + <i18n.Translate>Inventory</i18n.Translate> </span> </a> </li> @@ -243,7 +243,7 @@ export function Sidebar({ </span> </div> </li> - {isPasswordOk && admin && !mimic && ( + {admin && !mimic && ( <Fragment> <p class="menu-label"> <i18n.Translate>Instances</i18n.Translate> @@ -270,7 +270,7 @@ export function Sidebar({ </li> </Fragment> )} - {isPasswordOk && + {isPasswordOk ? <li> <a class="has-icon is-state-info is-hoverable" @@ -283,8 +283,21 @@ export function Sidebar({ <i18n.Translate>Log out</i18n.Translate> </span> </a> - </li> - } + </li> : + <li> + <a + class="has-icon is-state-info is-hoverable" + onClick={(): void => resetBackend()} + > + <span class="icon"> + <i class="mdi mdi-logout default" /> + </span> + <span class="menu-item-label"> + <i18n.Translate>Change server</i18n.Translate> + </span> + </a> + </li> + } </ul> </div> </aside> diff --git a/packages/merchant-backoffice-ui/src/components/menu/index.tsx b/packages/merchant-backoffice-ui/src/components/menu/index.tsx index cb318906f..b8ac2c9ab 100644 --- a/packages/merchant-backoffice-ui/src/components/menu/index.tsx +++ b/packages/merchant-backoffice-ui/src/components/menu/index.tsx @@ -30,11 +30,11 @@ function getInstanceTitle(path: string, id: string): string { return `${id}: Orders`; case InstancePaths.order_new: return `${id}: New order`; - case InstancePaths.product_list: - return `${id}: Products`; - case InstancePaths.product_new: + case InstancePaths.inventory_list: + return `${id}: Inventory`; + case InstancePaths.inventory_new: return `${id}: New product`; - case InstancePaths.product_update: + case InstancePaths.inventory_update: return `${id}: Update product`; case InstancePaths.reserves_new: return `${id}: New reserve`; diff --git a/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx b/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx index 8bebbd298..e91e8c876 100644 --- a/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx +++ b/packages/merchant-backoffice-ui/src/components/product/ProductForm.tsx @@ -146,9 +146,9 @@ export function ProductForm({ onSubscribe, initial, alreadyExist }: Props) { /> <InputNumber<Entity> name="minimum_age" - label={i18n.str`Age restricted`} + label={i18n.str`Age restriction`} tooltip={i18n.str`is this product restricted for customer below certain age?`} - help={i18n.str`can be overridden by the order configuration`} + help={i18n.str`minimum age of the buyer`} /> <Input<Entity> name="unit" @@ -165,7 +165,7 @@ export function ProductForm({ onSubscribe, initial, alreadyExist }: Props) { name="stock" label={i18n.str`Stock`} alreadyExist={alreadyExist} - tooltip={i18n.str`product inventory for products with finite supply (for internal use only)`} + tooltip={i18n.str`inventory for products with finite supply (for internal use only)`} /> <InputTaxes<Entity> name="taxes" |