@layerfi/components 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +94 -45
- package/dist/esm/index.js.map +3 -3
- package/dist/index.d.ts +108 -35
- package/dist/index.js +94 -45
- package/dist/index.js.map +3 -3
- package/dist/styles/index.css +1 -1
- package/dist/styles/index.css.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -266,6 +266,9 @@ var getCategories = get(({ businessId }) => `/v1/businesses/${businessId}/catego
|
|
|
266
266
|
var getChartOfAccounts = get(
|
|
267
267
|
({ businessId }) => `/v1/businesses/${businessId}/ledger/accounts`
|
|
268
268
|
);
|
|
269
|
+
var getLedgerAccountBalances = get(
|
|
270
|
+
({ businessId }) => `/v1/businesses/${businessId}/ledger/balances`
|
|
271
|
+
);
|
|
269
272
|
var createAccount = post(
|
|
270
273
|
({ businessId }) => `/v1/businesses/${businessId}/ledger/accounts`
|
|
271
274
|
);
|
|
@@ -308,6 +311,7 @@ var Layer = {
|
|
|
308
311
|
getBankTransactions,
|
|
309
312
|
getCategories,
|
|
310
313
|
getChartOfAccounts,
|
|
314
|
+
getLedgerAccountBalances,
|
|
311
315
|
getLedgerAccountsLines,
|
|
312
316
|
getLedgerAccountsEntry,
|
|
313
317
|
getProfitAndLoss,
|
|
@@ -3048,7 +3052,15 @@ var extractDescriptionForSplit = (category) => {
|
|
|
3048
3052
|
return category.entries.map((c) => c.category.display_name).join(", ");
|
|
3049
3053
|
};
|
|
3050
3054
|
var getDefaultSelectedCategory = (bankTransaction) => {
|
|
3051
|
-
|
|
3055
|
+
if (bankTransaction.suggested_matches?.[0]) {
|
|
3056
|
+
return mapSuggestedMatchToOption(bankTransaction.suggested_matches?.[0]);
|
|
3057
|
+
}
|
|
3058
|
+
if (hasSuggestions(bankTransaction.categorization_flow)) {
|
|
3059
|
+
return mapCategoryToOption(
|
|
3060
|
+
bankTransaction.categorization_flow.suggestions[0]
|
|
3061
|
+
);
|
|
3062
|
+
}
|
|
3063
|
+
return void 0;
|
|
3052
3064
|
};
|
|
3053
3065
|
var clickTimer = Date.now();
|
|
3054
3066
|
var BankTransactionRow = ({
|
|
@@ -4828,7 +4840,7 @@ var InstitutionIcon_default = InstitutionIcon;
|
|
|
4828
4840
|
|
|
4829
4841
|
// src/components/LinkedAccountThumb/LinkedAccountThumb.tsx
|
|
4830
4842
|
import classNames23 from "classnames";
|
|
4831
|
-
var AccountNumber = ({ accountNumber }) => /* @__PURE__ */ React63.createElement("div", { className: "account-number" }, /* @__PURE__ */ React63.createElement(Text, { size: "sm" }, "\u2022\u2022\u2022", accountNumber));
|
|
4843
|
+
var AccountNumber = ({ accountNumber }) => /* @__PURE__ */ React63.createElement("div", { className: "account-number" }, /* @__PURE__ */ React63.createElement(Text, { size: "sm" }, "\u2022\u2022\u2022 ", accountNumber));
|
|
4832
4844
|
var LinkedAccountThumb = ({
|
|
4833
4845
|
account,
|
|
4834
4846
|
asWidget
|
|
@@ -4837,12 +4849,7 @@ var LinkedAccountThumb = ({
|
|
|
4837
4849
|
"Layer__linked-account-thumb",
|
|
4838
4850
|
asWidget && "--as-widget"
|
|
4839
4851
|
);
|
|
4840
|
-
return /* @__PURE__ */ React63.createElement("div", { className: linkedAccountThumbClassName }, /* @__PURE__ */ React63.createElement("div", { className: "topbar" }, /* @__PURE__ */ React63.createElement("div", { className: "topbar-details" }, /* @__PURE__ */ React63.createElement(Text, { as: "span", className: "account-name" }, account.external_account_name), !asWidget && /* @__PURE__ */ React63.createElement(
|
|
4841
|
-
AccountNumber,
|
|
4842
|
-
{
|
|
4843
|
-
accountNumber: "TODO"
|
|
4844
|
-
}
|
|
4845
|
-
), /* @__PURE__ */ React63.createElement(
|
|
4852
|
+
return /* @__PURE__ */ React63.createElement("div", { className: linkedAccountThumbClassName }, /* @__PURE__ */ React63.createElement("div", { className: "topbar" }, /* @__PURE__ */ React63.createElement("div", { className: "topbar-details" }, /* @__PURE__ */ React63.createElement(Text, { as: "span", className: "account-name" }, account.external_account_name), !asWidget && account.mask && /* @__PURE__ */ React63.createElement(AccountNumber, { accountNumber: account.mask }), /* @__PURE__ */ React63.createElement(
|
|
4846
4853
|
Text,
|
|
4847
4854
|
{
|
|
4848
4855
|
as: "span",
|
|
@@ -4850,7 +4857,15 @@ var LinkedAccountThumb = ({
|
|
|
4850
4857
|
size: "sm"
|
|
4851
4858
|
},
|
|
4852
4859
|
account.institution?.name
|
|
4853
|
-
)), /* @__PURE__ */ React63.createElement("div", { className: "topbar-logo" },
|
|
4860
|
+
)), /* @__PURE__ */ React63.createElement("div", { className: "topbar-logo" }, account.logo_base64 != void 0 ? /* @__PURE__ */ React63.createElement(
|
|
4861
|
+
"img",
|
|
4862
|
+
{
|
|
4863
|
+
width: 28,
|
|
4864
|
+
height: 28,
|
|
4865
|
+
src: `data:image/png;base64,${account.logo_base64}`,
|
|
4866
|
+
alt: account.institution?.name
|
|
4867
|
+
}
|
|
4868
|
+
) : /* @__PURE__ */ React63.createElement(InstitutionIcon_default, null))), !asWidget && /* @__PURE__ */ React63.createElement("div", { className: "middlebar" }, /* @__PURE__ */ React63.createElement(
|
|
4854
4869
|
Text,
|
|
4855
4870
|
{
|
|
4856
4871
|
as: "span",
|
|
@@ -4870,7 +4885,7 @@ var LinkedAccountThumb = ({
|
|
|
4870
4885
|
className: "account-balance-text",
|
|
4871
4886
|
size: "sm"
|
|
4872
4887
|
},
|
|
4873
|
-
"
|
|
4888
|
+
"Ledger balance"
|
|
4874
4889
|
), /* @__PURE__ */ React63.createElement(Text, { as: "span", className: "account-balance" }, "$", centsToDollars(account.current_ledger_balance))));
|
|
4875
4890
|
};
|
|
4876
4891
|
|
|
@@ -6876,12 +6891,13 @@ var validate = (formData) => {
|
|
|
6876
6891
|
};
|
|
6877
6892
|
var revalidateField = (fieldName, formData) => {
|
|
6878
6893
|
switch (fieldName) {
|
|
6879
|
-
case "name":
|
|
6894
|
+
case "name": {
|
|
6880
6895
|
const nameError = validateName(formData);
|
|
6881
6896
|
if (nameError) {
|
|
6882
6897
|
return (formData?.errors || []).filter((x) => x.field !== fieldName).concat([nameError]);
|
|
6883
6898
|
}
|
|
6884
6899
|
return (formData?.errors || []).filter((x) => x.field !== fieldName);
|
|
6900
|
+
}
|
|
6885
6901
|
default:
|
|
6886
6902
|
return formData?.errors;
|
|
6887
6903
|
}
|
|
@@ -6903,7 +6919,7 @@ var useChartOfAccounts = () => {
|
|
|
6903
6919
|
const [apiError, setApiError] = useState19(void 0);
|
|
6904
6920
|
const { data, isLoading, isValidating, error, mutate } = useSWR6(
|
|
6905
6921
|
businessId && auth?.access_token && `chart-of-accounts-${businessId}`,
|
|
6906
|
-
Layer.
|
|
6922
|
+
Layer.getLedgerAccountBalances(apiUrl, auth?.access_token, {
|
|
6907
6923
|
params: { businessId }
|
|
6908
6924
|
})
|
|
6909
6925
|
);
|
|
@@ -6967,7 +6983,8 @@ var useChartOfAccounts = () => {
|
|
|
6967
6983
|
type: "AccountId",
|
|
6968
6984
|
id: form.data.parent.value
|
|
6969
6985
|
} : void 0,
|
|
6970
|
-
|
|
6986
|
+
account_type: form.data.type.value.toString(),
|
|
6987
|
+
account_subtype: form.data.subType?.value.toString()
|
|
6971
6988
|
};
|
|
6972
6989
|
if (form.action === "new") {
|
|
6973
6990
|
create(data2);
|
|
@@ -6985,11 +7002,10 @@ var useChartOfAccounts = () => {
|
|
|
6985
7002
|
parent: void 0,
|
|
6986
7003
|
name: void 0,
|
|
6987
7004
|
type: {
|
|
6988
|
-
value: "
|
|
7005
|
+
value: "ASSETS",
|
|
6989
7006
|
label: "Assets"
|
|
6990
7007
|
},
|
|
6991
|
-
subType: void 0
|
|
6992
|
-
category: void 0
|
|
7008
|
+
subType: void 0
|
|
6993
7009
|
}
|
|
6994
7010
|
});
|
|
6995
7011
|
const editAccount = (id) => {
|
|
@@ -7011,11 +7027,10 @@ var useChartOfAccounts = () => {
|
|
|
7011
7027
|
} : void 0,
|
|
7012
7028
|
name: found.name,
|
|
7013
7029
|
type: {
|
|
7014
|
-
value: "
|
|
7030
|
+
value: "ASSETS",
|
|
7015
7031
|
label: "Assets"
|
|
7016
7032
|
},
|
|
7017
|
-
subType: void 0
|
|
7018
|
-
category: void 0
|
|
7033
|
+
subType: void 0
|
|
7019
7034
|
}
|
|
7020
7035
|
});
|
|
7021
7036
|
};
|
|
@@ -7237,7 +7252,7 @@ var ChartOfAccountsRow = ({
|
|
|
7237
7252
|
className: "Layer__table-cell-content Layer__mobile--hidden",
|
|
7238
7253
|
style
|
|
7239
7254
|
},
|
|
7240
|
-
account.
|
|
7255
|
+
account.account_type?.display_name
|
|
7241
7256
|
), /* @__PURE__ */ React84.createElement(
|
|
7242
7257
|
"span",
|
|
7243
7258
|
{
|
|
@@ -7252,9 +7267,9 @@ var ChartOfAccountsRow = ({
|
|
|
7252
7267
|
},
|
|
7253
7268
|
account.normality
|
|
7254
7269
|
),
|
|
7255
|
-
/* @__PURE__ */ React84.createElement(Text, { className: "Layer__coa__subtype--mobile" },
|
|
7270
|
+
/* @__PURE__ */ React84.createElement(Text, { className: "Layer__coa__subtype--mobile" }, account.account_subtype?.display_name)
|
|
7256
7271
|
)),
|
|
7257
|
-
/* @__PURE__ */ React84.createElement("td", { className: "Layer__table-cell Layer__coa__subtype Layer__mobile--hidden" }, /* @__PURE__ */ React84.createElement("span", { className: "Layer__table-cell-content", style },
|
|
7272
|
+
/* @__PURE__ */ React84.createElement("td", { className: "Layer__table-cell Layer__coa__subtype Layer__mobile--hidden" }, /* @__PURE__ */ React84.createElement("span", { className: "Layer__table-cell-content", style }, account.account_subtype?.display_name)),
|
|
7258
7273
|
/* @__PURE__ */ React84.createElement("td", { className: "Layer__table-cell Layer__coa__balance" }, /* @__PURE__ */ React84.createElement(
|
|
7259
7274
|
"span",
|
|
7260
7275
|
{
|
|
@@ -7484,14 +7499,6 @@ var ChartOfAccountsForm = () => {
|
|
|
7484
7499
|
onChange: (sel) => changeFormData("subType", sel),
|
|
7485
7500
|
disabled: sendingForm
|
|
7486
7501
|
}
|
|
7487
|
-
)), /* @__PURE__ */ React86.createElement(InputGroup, { name: "category", label: "Category", inline: true }, /* @__PURE__ */ React86.createElement(
|
|
7488
|
-
Select2,
|
|
7489
|
-
{
|
|
7490
|
-
options: [],
|
|
7491
|
-
value: form?.data.category,
|
|
7492
|
-
onChange: (sel) => changeFormData("category", sel),
|
|
7493
|
-
disabled: sendingForm
|
|
7494
|
-
}
|
|
7495
7502
|
)))
|
|
7496
7503
|
);
|
|
7497
7504
|
};
|
|
@@ -7654,6 +7661,40 @@ var DetailsListItem = ({
|
|
|
7654
7661
|
};
|
|
7655
7662
|
|
|
7656
7663
|
// src/components/LedgerAccountEntryDetails/LedgerAccountEntryDetails.tsx
|
|
7664
|
+
var SourceDetailView = ({ source }) => {
|
|
7665
|
+
switch (source.type) {
|
|
7666
|
+
case "Transaction_Ledger_Entry_Source": {
|
|
7667
|
+
const transactionSource = source;
|
|
7668
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Account name" }, transactionSource.account_name), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Date" }, /* @__PURE__ */ React93.createElement(DateTime, { value: transactionSource.date })), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Amount" }, `$${centsToDollars(transactionSource.amount)}`), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Direction" }, transactionSource.direction), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Counterparty" }, transactionSource.counterparty));
|
|
7669
|
+
}
|
|
7670
|
+
case "Invoice_Ledger_Entry_Source": {
|
|
7671
|
+
const invoiceSource = source;
|
|
7672
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Invoice number" }, invoiceSource.invoice_number), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Recipient name" }, invoiceSource.recipient_name), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Date" }, /* @__PURE__ */ React93.createElement(DateTime, { value: invoiceSource.date })), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Amount" }, `$${centsToDollars(invoiceSource.amount)}`));
|
|
7673
|
+
}
|
|
7674
|
+
case "Manual_Ledger_Entry_Source": {
|
|
7675
|
+
const manualSource = source;
|
|
7676
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Memo" }, manualSource.memo), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Created by" }, manualSource.created_by));
|
|
7677
|
+
}
|
|
7678
|
+
case "Invoice_Payment_Ledger_Entry_Source": {
|
|
7679
|
+
const invoicePaymentSource = source;
|
|
7680
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Invoice number" }, invoicePaymentSource.invoice_number), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Amount" }, `$${centsToDollars(invoicePaymentSource.amount)}`));
|
|
7681
|
+
}
|
|
7682
|
+
case "Refund_Ledger_Entry_Source": {
|
|
7683
|
+
const refundSource = source;
|
|
7684
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Amount" }, `$${centsToDollars(refundSource.refunded_to_customer_amount)}`), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Recipient name" }, refundSource.recipient_name));
|
|
7685
|
+
}
|
|
7686
|
+
case "Opening_Balance_Ledger_Entry_Source": {
|
|
7687
|
+
const openingBalanceSource = source;
|
|
7688
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Account name" }, openingBalanceSource.account_name));
|
|
7689
|
+
}
|
|
7690
|
+
case "Payout_Ledger_Entry_Source": {
|
|
7691
|
+
const payoutSource = source;
|
|
7692
|
+
return /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Amount" }, `$${centsToDollars(payoutSource.paid_out_amount)}`), /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Processor" }, payoutSource.processor));
|
|
7693
|
+
}
|
|
7694
|
+
default:
|
|
7695
|
+
return null;
|
|
7696
|
+
}
|
|
7697
|
+
};
|
|
7657
7698
|
var LedgerAccountEntryDetails = () => {
|
|
7658
7699
|
const { entryData, isLoadingEntry, closeSelectedEntry, errorEntry } = useContext11(LedgerAccountsContext);
|
|
7659
7700
|
const { totalDebit, totalCredit } = useMemo9(() => {
|
|
@@ -7681,11 +7722,19 @@ var LedgerAccountEntryDetails = () => {
|
|
|
7681
7722
|
}
|
|
7682
7723
|
)
|
|
7683
7724
|
},
|
|
7684
|
-
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React93.createElement(Badge, null,
|
|
7685
|
-
/* @__PURE__ */ React93.createElement(
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7725
|
+
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Source", isLoading: isLoadingEntry }, /* @__PURE__ */ React93.createElement(Badge, null, entryData?.source?.type)),
|
|
7726
|
+
entryData?.source?.display_description && /* @__PURE__ */ React93.createElement(SourceDetailView, { source: entryData?.source })
|
|
7727
|
+
), /* @__PURE__ */ React93.createElement(
|
|
7728
|
+
DetailsList,
|
|
7729
|
+
{
|
|
7730
|
+
title: `Journal Entry ${entryData?.id.substring(0, 5)}`,
|
|
7731
|
+
className: "Layer__border-top"
|
|
7732
|
+
},
|
|
7733
|
+
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Entry type", isLoading: isLoadingEntry }, humanizeEnum(entryData?.entry_type ?? "")),
|
|
7734
|
+
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Date", isLoading: isLoadingEntry }, entryData?.entry_at && /* @__PURE__ */ React93.createElement(DateTime, { value: entryData?.entry_at })),
|
|
7735
|
+
/* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Creation date", isLoading: isLoadingEntry }, entryData?.date && /* @__PURE__ */ React93.createElement(DateTime, { value: entryData?.date })),
|
|
7736
|
+
entryData?.reversal_id && /* @__PURE__ */ React93.createElement(DetailsListItem, { label: "Reversal", isLoading: isLoadingEntry }, entryData?.reversal_id.substring(0, 5))
|
|
7737
|
+
), !isLoadingEntry && !errorEntry ? /* @__PURE__ */ React93.createElement("div", { className: "Layer__ledger-account__entry-details__line-items" }, /* @__PURE__ */ React93.createElement(Card, null, /* @__PURE__ */ React93.createElement("table", { className: "Layer__table Layer__ledger-account__entry-details__table" }, /* @__PURE__ */ React93.createElement("thead", null, /* @__PURE__ */ React93.createElement("tr", null, /* @__PURE__ */ React93.createElement("th", { className: "Layer__table-header" }, "Line items"), /* @__PURE__ */ React93.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, "Debit"), /* @__PURE__ */ React93.createElement("th", { className: "Layer__table-header Layer__table-cell--amount" }, "Credit"))), /* @__PURE__ */ React93.createElement("tbody", null, entryData?.line_items?.map((item) => /* @__PURE__ */ React93.createElement("tr", { key: `ledger-line-item-${item.id}` }, /* @__PURE__ */ React93.createElement("td", { className: "Layer__table-cell" }, item.account?.name || ""), /* @__PURE__ */ React93.createElement("td", { className: "Layer__table-cell Layer__table-cell--amount" }, item.direction === "DEBIT" /* DEBIT */ && /* @__PURE__ */ React93.createElement(Badge, { variant: "warning" /* WARNING */ }, "$", centsToDollars(item.amount || 0))), /* @__PURE__ */ React93.createElement("td", { className: "Layer__table-cell Layer__table-cell--amount" }, item.direction === "CREDIT" /* CREDIT */ && /* @__PURE__ */ React93.createElement(Badge, { variant: "success" /* SUCCESS */ }, "$", centsToDollars(item.amount || 0))))), /* @__PURE__ */ React93.createElement("tr", { className: "Layer__table Layer__ledger-account__entry-details__table__total-row" }, /* @__PURE__ */ React93.createElement("td", { className: "Layer__table-cell" }, "Total"), /* @__PURE__ */ React93.createElement("td", { className: "Layer__table-cell Layer__table-cell--amount" }, "$", centsToDollars(totalDebit || 0)), /* @__PURE__ */ React93.createElement("td", { className: "Layer__table-cell Layer__table-cell--amount" }, "$", centsToDollars(totalCredit || 0))))))) : null);
|
|
7689
7738
|
};
|
|
7690
7739
|
|
|
7691
7740
|
// src/components/LedgerAccount/LedgerAccountRow.tsx
|
|
@@ -7733,14 +7782,14 @@ var LedgerAccountRow = ({
|
|
|
7733
7782
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React94.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React94.createElement(Text, null, row.date && formatTime8(parseISO10(row.date), DATE_FORMAT)), /* @__PURE__ */ React94.createElement(
|
|
7734
7783
|
Text,
|
|
7735
7784
|
{
|
|
7736
|
-
weight: "
|
|
7785
|
+
weight: "normal" /* normal */,
|
|
7737
7786
|
className: "Layer__ledger_account-table__journal-id"
|
|
7738
7787
|
},
|
|
7739
|
-
|
|
7740
|
-
)), /* @__PURE__ */ React94.createElement(Text, null,
|
|
7788
|
+
row.entry_id.substring(0, 5)
|
|
7789
|
+
)), /* @__PURE__ */ React94.createElement(Text, null, row.source?.display_description ?? ""))),
|
|
7741
7790
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
|
|
7742
7791
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)),
|
|
7743
|
-
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" },
|
|
7792
|
+
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
|
|
7744
7793
|
);
|
|
7745
7794
|
}
|
|
7746
7795
|
if (view === "mobile") {
|
|
@@ -7766,11 +7815,11 @@ var LedgerAccountRow = ({
|
|
|
7766
7815
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__ledger-account-table__tablet-main-col" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content" }, /* @__PURE__ */ React94.createElement("div", { className: "Layer__ledger-account-table__tablet-main-col__date" }, /* @__PURE__ */ React94.createElement(Text, null, row.date && formatTime8(parseISO10(row.date), DATE_FORMAT)), /* @__PURE__ */ React94.createElement(
|
|
7767
7816
|
Text,
|
|
7768
7817
|
{
|
|
7769
|
-
weight: "
|
|
7818
|
+
weight: "normal" /* normal */,
|
|
7770
7819
|
className: "Layer__ledger_account-table__journal-id"
|
|
7771
7820
|
},
|
|
7772
|
-
|
|
7773
|
-
)), /* @__PURE__ */ React94.createElement(Text, null,
|
|
7821
|
+
row.entry_id.substring(0, 5)
|
|
7822
|
+
)), /* @__PURE__ */ React94.createElement(Text, null, row.source?.display_description ?? ""), /* @__PURE__ */ React94.createElement("div", { className: "Layer__ledger_account-table__balances-mobile" }, /* @__PURE__ */ React94.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Debit"), /* @__PURE__ */ React94.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, " ", row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)), /* @__PURE__ */ React94.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Credit"), /* @__PURE__ */ React94.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)), /* @__PURE__ */ React94.createElement("div", { className: "Layer__ledger_account-table__balance-item" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__label" }, "Running balance"), /* @__PURE__ */ React94.createElement("span", { className: "Layer__ledger_account-table__balances-mobile__value" }, `$${centsToDollars(row.running_balance)}`)))))
|
|
7774
7823
|
);
|
|
7775
7824
|
}
|
|
7776
7825
|
return /* @__PURE__ */ React94.createElement(
|
|
@@ -7793,11 +7842,11 @@ var LedgerAccountRow = ({
|
|
|
7793
7842
|
}
|
|
7794
7843
|
},
|
|
7795
7844
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content" }, row.date && formatTime8(parseISO10(row.date), DATE_FORMAT))),
|
|
7796
|
-
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell
|
|
7797
|
-
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content" },
|
|
7845
|
+
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content" }, row.entry_id.substring(0, 5))),
|
|
7846
|
+
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content" }, row.source?.display_description ?? "")),
|
|
7798
7847
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "DEBIT" /* DEBIT */ && `$${centsToDollars(row?.amount || 0)}`)),
|
|
7799
7848
|
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, row.direction === "CREDIT" /* CREDIT */ && `$${centsToDollars(row?.amount || 0)}`)),
|
|
7800
|
-
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" },
|
|
7849
|
+
/* @__PURE__ */ React94.createElement("td", { className: "Layer__table-cell Layer__table-cell--primary" }, /* @__PURE__ */ React94.createElement("span", { className: "Layer__table-cell-content Layer__table-cell--amount" }, `$${centsToDollars(row.running_balance)}`))
|
|
7801
7850
|
);
|
|
7802
7851
|
};
|
|
7803
7852
|
|