Fix formatting
This commit is contained in:
parent
3c49c28968
commit
7481822254
3 changed files with 238 additions and 238 deletions
|
@ -26,17 +26,17 @@ import OrderPayment from "../OrderPayment/OrderPayment";
|
||||||
import OrderUnfulfilledItems from "../OrderUnfulfilledItems/OrderUnfulfilledItems";
|
import OrderUnfulfilledItems from "../OrderUnfulfilledItems/OrderUnfulfilledItems";
|
||||||
|
|
||||||
const useStyles = makeStyles(
|
const useStyles = makeStyles(
|
||||||
(theme) => ({
|
theme => ({
|
||||||
date: {
|
date: {
|
||||||
marginBottom: theme.spacing(3),
|
marginBottom: theme.spacing(3)
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
marginBottom: 0,
|
marginBottom: 0
|
||||||
},
|
}
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
name: "OrderDetailsPage",
|
name: "OrderDetailsPage"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ export interface OrderDetailsPageProps extends UserPermissionProps {
|
||||||
onInvoiceSend(invoice: InvoiceFragment);
|
onInvoiceSend(invoice: InvoiceFragment);
|
||||||
}
|
}
|
||||||
|
|
||||||
const OrderDetailsPage: React.FC<OrderDetailsPageProps> = (props) => {
|
const OrderDetailsPage: React.FC<OrderDetailsPageProps> = props => {
|
||||||
const {
|
const {
|
||||||
order,
|
order,
|
||||||
userPermissions,
|
userPermissions,
|
||||||
|
@ -88,7 +88,7 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = (props) => {
|
||||||
onProfileView,
|
onProfileView,
|
||||||
onInvoiceClick,
|
onInvoiceClick,
|
||||||
onInvoiceGenerate,
|
onInvoiceGenerate,
|
||||||
onInvoiceSend,
|
onInvoiceSend
|
||||||
} = props;
|
} = props;
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = (props) => {
|
||||||
const canEditAddresses = maybe(() => order.status) !== OrderStatus.CANCELED;
|
const canEditAddresses = maybe(() => order.status) !== OrderStatus.CANCELED;
|
||||||
const canFulfill = maybe(() => order.status) !== OrderStatus.CANCELED;
|
const canFulfill = maybe(() => order.status) !== OrderStatus.CANCELED;
|
||||||
const unfulfilled = maybe(() => order.lines, []).filter(
|
const unfulfilled = maybe(() => order.lines, []).filter(
|
||||||
(line) => line.quantityFulfilled < line.quantity
|
line => line.quantityFulfilled < line.quantity
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -117,10 +117,10 @@ const OrderDetailsPage: React.FC<OrderDetailsPageProps> = (props) => {
|
||||||
{
|
{
|
||||||
label: intl.formatMessage({
|
label: intl.formatMessage({
|
||||||
defaultMessage: "Cancel order",
|
defaultMessage: "Cancel order",
|
||||||
description: "button",
|
description: "button"
|
||||||
}),
|
}),
|
||||||
onSelect: onOrderCancel,
|
onSelect: onOrderCancel
|
||||||
},
|
}
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
|
@ -21,16 +21,16 @@ const useStyles = makeStyles(
|
||||||
() => ({
|
() => ({
|
||||||
cardContentTable: {
|
cardContentTable: {
|
||||||
"&:last-child": {
|
"&:last-child": {
|
||||||
padding: 0,
|
padding: 0
|
||||||
},
|
},
|
||||||
padding: 0,
|
padding: 0
|
||||||
},
|
},
|
||||||
colAction: { paddingRight: "0.5rem", width: "auto" },
|
colAction: { paddingRight: "0.5rem", width: "auto" },
|
||||||
colNumber: { width: "100%" },
|
colNumber: { width: "100%" },
|
||||||
colNumberClickable: {
|
colNumberClickable: {
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
width: "100%",
|
width: "100%"
|
||||||
},
|
}
|
||||||
}),
|
}),
|
||||||
{ name: "OrderInvoiceList" }
|
{ name: "OrderInvoiceList" }
|
||||||
);
|
);
|
||||||
|
@ -42,7 +42,7 @@ interface OrderInvoiceListProps {
|
||||||
onInvoiceSend: (invoice: InvoiceFragment) => void;
|
onInvoiceSend: (invoice: InvoiceFragment) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const OrderInvoiceList: React.FC<OrderInvoiceListProps> = (props) => {
|
const OrderInvoiceList: React.FC<OrderInvoiceListProps> = props => {
|
||||||
const { invoices, onInvoiceGenerate, onInvoiceClick, onInvoiceSend } = props;
|
const { invoices, onInvoiceGenerate, onInvoiceClick, onInvoiceSend } = props;
|
||||||
|
|
||||||
const classes = useStyles(props);
|
const classes = useStyles(props);
|
||||||
|
@ -50,7 +50,7 @@ const OrderInvoiceList: React.FC<OrderInvoiceListProps> = (props) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
const generatedInvoices = invoices?.filter(
|
const generatedInvoices = invoices?.filter(
|
||||||
(invoice) => invoice.status === "SUCCESS"
|
invoice => invoice.status === "SUCCESS"
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -58,7 +58,7 @@ const OrderInvoiceList: React.FC<OrderInvoiceListProps> = (props) => {
|
||||||
<CardTitle
|
<CardTitle
|
||||||
title={intl.formatMessage({
|
title={intl.formatMessage({
|
||||||
defaultMessage: "Invoices",
|
defaultMessage: "Invoices",
|
||||||
description: "section header",
|
description: "section header"
|
||||||
})}
|
})}
|
||||||
toolbar={
|
toolbar={
|
||||||
onInvoiceGenerate && (
|
onInvoiceGenerate && (
|
||||||
|
@ -101,7 +101,7 @@ const OrderInvoiceList: React.FC<OrderInvoiceListProps> = (props) => {
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
{generatedInvoices.map((invoice) => (
|
{generatedInvoices.map(invoice => (
|
||||||
<TableRow key={invoice.id}>
|
<TableRow key={invoice.id}>
|
||||||
<TableCell
|
<TableCell
|
||||||
className={
|
className={
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue