feat(Warehouses|Branches): empty status text.

This commit is contained in:
a.bouhuolia
2022-03-21 18:31:31 +02:00
parent 90c77d80eb
commit 701c32debd
9 changed files with 57 additions and 30 deletions

View File

@@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { Form } from 'formik'; import { Form } from 'formik';
import { Intent, Callout, Classes } from '@blueprintjs/core'; import { Classes } from '@blueprintjs/core';
import BranchActivateFormFloatingActions from './BranchActivateFormFloatingActions'; import BranchActivateFormFloatingActions from './BranchActivateFormFloatingActions';
/** /**
@@ -10,10 +10,20 @@ export default function BranchActivateFormContent() {
return ( return (
<Form> <Form>
<div className={Classes.DIALOG_BODY}> <div className={Classes.DIALOG_BODY}>
<Callout icon={null} intent={Intent.PRIMARY}> <p class="paragraph">
Aute esse eiusmod dolore ipsum dolor sint qui proident pariatur Once you enable <strong>Multiply Branches</strong>, you will not be able to disable it.
proident fugiat ea ad aliquip. However, you can delete the branch or mark it inactive.
</Callout> </p>
<ul class="paragraph list">
<li>
The current organization will be considered as the Head Office or
Primary Branch.
</li>
<li>
All accounts transactions will be considered as the primary office.
</li>
</ul>
</div> </div>
<BranchActivateFormFloatingActions /> <BranchActivateFormFloatingActions />
</Form> </Form>

View File

@@ -37,7 +37,8 @@ function BranchActivateFormFloatingActions({
style={{ minWidth: '95px' }} style={{ minWidth: '95px' }}
type="submit" type="submit"
> >
{<T id={'activate'} />} {<T id={'branches.activate_button'} />}
</Button> </Button>
</div> </div>
</div> </div>

View File

@@ -1,20 +1,29 @@
import React from 'react'; import React from 'react';
import { Form } from 'formik'; import { Form } from 'formik';
import { Intent, Callout, Classes } from '@blueprintjs/core'; import { Classes } from '@blueprintjs/core';
import WarehouseActivateFormFloatingActions from './WarehouseActivateFormFloatingActions'; import WarehouseActivateFormFloatingActions from './WarehouseActivateFormFloatingActions';
/** /**
* warehouse activate form content. * Warehouse activate form content.
*/ */
export default function WarehouseActivateFormContent() { export default function WarehouseActivateFormContent() {
return ( return (
<Form> <Form>
<div className={Classes.DIALOG_BODY}> <div className={Classes.DIALOG_BODY}>
<Callout icon={null} intent={Intent.PRIMARY}> <p class="paragraph">
Aute esse eiusmod dolore ipsum dolor sint qui proident pariatur Once you enable <strong>Multiply Warehouses</strong>, you will not be able to disable it.
proident fugiat ea ad aliquip. However, you can delete the warehouse or mark it inactive.
</Callout> </p>
<ul class="paragraph list">
<li>
The current organization will be considered as the Primary Warehouse.
</li>
<li>
All inventory transactions will be considered as the Primary Warehouse.
</li>
</ul>
</div> </div>
<WarehouseActivateFormFloatingActions /> <WarehouseActivateFormFloatingActions />
</Form> </Form>

View File

@@ -37,7 +37,7 @@ function WarehouseActivateFormFloatingActions({
style={{ minWidth: '95px' }} style={{ minWidth: '95px' }}
type="submit" type="submit"
> >
{<T id={'activate'} />} {<T id={'warehouses.activate_button'} />}
</Button> </Button>
</div> </div>
</div> </div>

View File

@@ -16,7 +16,7 @@ function WarehouseActivateDialog({ dialogName, payload: {}, isOpen }) {
return ( return (
<Dialog <Dialog
name={dialogName} name={dialogName}
title={<T id={'warehouse_activate.dialog_success_message'} />} title={<T id={'warehouse_actviate.dialog.label'} />}
isOpen={isOpen} isOpen={isOpen}
canEscapeJeyClose={true} canEscapeJeyClose={true}
autoFocus={true} autoFocus={true}

View File

@@ -29,11 +29,7 @@ function BranchesEmptyStatus({
large={true} large={true}
onClick={handleActivateBranch} onClick={handleActivateBranch}
> >
<T id={'activate'} /> <T id={'branches.activate_button'} />
</Button>
<Button intent={Intent.NONE} large={true}>
<T id={'learn_more'} />
</Button> </Button>
</React.Fragment> </React.Fragment>
} }

View File

@@ -29,11 +29,7 @@ function WarehousesEmptyStatus({
large={true} large={true}
onClick={handleActivateWarehouse} onClick={handleActivateWarehouse}
> >
<T id={'activate'} /> <T id={'warehouses.activate_button'} />
</Button>
<Button intent={Intent.NONE} large={true}>
<T id={'learn_more'} />
</Button> </Button>
</React.Fragment> </React.Fragment>
} }

View File

@@ -1802,8 +1802,9 @@
"warehouses.action.edit_warehouse": "Edit Warehouse", "warehouses.action.edit_warehouse": "Edit Warehouse",
"warehouses.action.delete_warehouse": "Delete Warehouse", "warehouses.action.delete_warehouse": "Delete Warehouse",
"warehouses.action.make_as_parimary": "Mark as Primary", "warehouses.action.make_as_parimary": "Mark as Primary",
"warehouses.empty_status.title": "Create and manage your organization's Warehouses.", "warehouses.empty_status.title": "Manage your organization's warehouses.",
"warehouses.empty_status.description": "", "warehouses.empty_status.description": "Manage and track your organization's inventory across multiple warehouses.",
"warehouses.activate_button": "Activate Warehouses",
"warehouse.alert.delete_message": "The warehouse has been deleted successfully", "warehouse.alert.delete_message": "The warehouse has been deleted successfully",
"warehouse.once_delete_this_warehouse": "Once you delete this warehouse, you won't be able to restore it later. Are you sure you want to delete this warehouse?", "warehouse.once_delete_this_warehouse": "Once you delete this warehouse, you won't be able to restore it later. Are you sure you want to delete this warehouse?",
"warehouse.error.could_not_delete_only_waerhouse": "You could not delete the only warehouse.", "warehouse.error.could_not_delete_only_waerhouse": "You could not delete the only warehouse.",
@@ -1851,8 +1852,9 @@
"branches.column.address": "Address", "branches.column.address": "Address",
"branches.column.phone_number": "Phone number", "branches.column.phone_number": "Phone number",
"branches.column.code": "Code", "branches.column.code": "Code",
"branches.empty_status.title": "Create and manage your organization's Branches.", "branches.empty_status.title": "Manage you organization's branches.",
"branches.empty_status.description": "", "branches.empty_status.description": "Manage and track business transactions to evaluate branches performance.",
"branches.activate_button": "Activate Branches",
"select_branch": "Select branch", "select_branch": "Select branch",
"branch": "Branch", "branch": "Branch",
"warehouse": "Warehouse", "warehouse": "Warehouse",
@@ -1872,12 +1874,12 @@
"branch.once_delete_this_branch": "Once you delete this branch, you won't be able to restore it later. Are you sure you want to delete this branch?", "branch.once_delete_this_branch": "Once you delete this branch, you won't be able to restore it later. Are you sure you want to delete this branch?",
"realized_gain_or_loss.label": "Realized Gain or Loss", "realized_gain_or_loss.label": "Realized Gain or Loss",
"unrealized_gain_or_loss.label": "Unrealized Gain or Loss", "unrealized_gain_or_loss.label": "Unrealized Gain or Loss",
"branch_activate.dialog.label": "Branches Activate", "branch_activate.dialog.label": "Branches Activation",
"branch_activate.dialog_success_message": "Multi-branches feature has been activated successfully.", "branch_activate.dialog_success_message": "Multi-branches feature has been activated successfully.",
"branch.alert.mark_primary_message": "The branch has been marked as primary.", "branch.alert.mark_primary_message": "The branch has been marked as primary.",
"branch.alert.are_you_sure_you_want_to_make": "Are you sure you want to make a primary branch?", "branch.alert.are_you_sure_you_want_to_make": "Are you sure you want to make a primary branch?",
"branch.error.could_not_delete_only_branch": "You could not delete the only branch.", "branch.error.could_not_delete_only_branch": "You could not delete the only branch.",
"warehouse_actviate.dialog.label": "Warehouses Activate", "warehouse_actviate.dialog.label": "Warehouses Activation",
"warehouse_activate.dialog_success_message": "Multi-branches feature has been activated successfully.", "warehouse_activate.dialog_success_message": "Multi-branches feature has been activated successfully.",
"warehouse.alert.mark_primary_message": "The given warehouse has been marked as primary.", "warehouse.alert.mark_primary_message": "The given warehouse has been marked as primary.",
"warehouse.alert.are_you_sure_you_want_to_make": "Are you sure you want to make a primary warehouse?", "warehouse.alert.are_you_sure_you_want_to_make": "Are you sure you want to make a primary warehouse?",

View File

@@ -20,4 +20,17 @@ body{
.paragraph{ .paragraph{
line-height: 1.5; line-height: 1.5;
font-size: 14px; font-size: 14px;
}
ul.list{
margin-bottom: 10px;
padding-left: 25px;
li{
margin-bottom: 10px;
&::marker{
color: #666;
}
}
} }