Compare commits

...

459 Commits

Author SHA1 Message Date
a.bouhuolia
f1899e1ce1 Merge branch 'develop' into main 2022-01-08 18:20:08 +02:00
elforjani13
76d6cd0eaa fix(MoneyOutForm): BIG-270 publish & draft cashflow. 2022-01-08 18:14:39 +02:00
elforjani13
90b4f86a0d fix(MoneyInForm): BIG-270 publish & draft cashflow. 2022-01-08 18:14:17 +02:00
Ahmed Bouhuolia
5766d25bd1 Merge pull request #18 from bigcapitalhq/BIG-271-hotjar-client-application-integration
`BIG-271` Hotjar client application integration.
2022-01-08 18:06:54 +02:00
elforjani13
6a5d96e869 BIG-271 Hotjar client application integration. 2022-01-08 17:59:30 +02:00
Ahmed Bouhuolia
69f16d1977 Merge pull request #17 from bigcapitalhq/BIG-270-publish-and-draft-cashflow-transaction-should-be-always-publish
BIG-270 Publish and draft cashflow transaction.
2022-01-08 17:02:54 +02:00
elforjani13
9973693a86 BIG-270 Publish and draft cashflow transaction. 2022-01-08 16:59:31 +02:00
Ahmed Bouhuolia
11851d114d Merge pull request #16 from bigcapitalhq/develop
Release 1.5.5
2022-01-04 22:35:49 +02:00
elforjani13
3a3dd7a565 fix(VendorForm): placeholder phone number. 2022-01-04 22:31:01 +02:00
elforjani13
687dda1e7c fix(inviteUserFrom): fix localiztion. 2022-01-04 21:31:58 +02:00
elforjani13
bfa809c831 feat(VendorList): add note accessor & personal phone. 2022-01-04 20:47:43 +02:00
elforjani13
07145e92ab feat(CustomerList): add note accessor & personal phone. 2022-01-04 20:47:28 +02:00
a.bouhuolia
21779007be fix: application version. 2022-01-03 23:14:11 +02:00
a.bouhuolia
4fc1ecdc2d Merge branch 'main' of https://github.com/bigcapitalhq/client into main 2022-01-03 19:42:48 +02:00
a.bouhuolia
c9b5cecf7a Merge branch 'develop' into main 2022-01-03 19:42:23 +02:00
a.bouhuolia
4a46c00a07 chore: bump version. 2022-01-03 19:42:05 +02:00
a.bouhuolia
5c7ac0593d feat(GlobalErrors): localize the global errors. 2022-01-03 18:31:52 +02:00
a.bouhuolia
fa25fb4ede fix(TrialBalanceSheet): expand account name column. 2022-01-03 18:02:24 +02:00
elforjani13
c31e9dcd29 fix: inventory adjustment & contacts drawer. 2022-01-03 14:35:50 +02:00
a.bouhuolia
3566d3b855 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2022-01-03 13:53:40 +02:00
a.bouhuolia
c5da97bce0 chore: changlog. 2022-01-03 13:53:04 +02:00
a.bouhuolia
0cfbe633bd feat: add .env.example file. 2022-01-03 13:53:02 +02:00
a.bouhuolia
55098d7b78 chore: remove repo logo. 2022-01-03 13:53:00 +02:00
a.bouhuolia
78610cd519 chore: upload repo logo. 2022-01-03 13:52:59 +02:00
a.bouhuolia
828a28b976 chore: update package-lock.json. 2022-01-03 13:52:58 +02:00
a.bouhuolia
daf5fc8aba feat: add version numebr on sidebar footer. 2022-01-03 13:49:55 +02:00
elforjani13
430ab95dc3 landed cost localiztion. 2022-01-03 13:38:22 +02:00
Ahmed Bouhuolia
8100a57195 Merge pull request #15 from bigcapitalhq/develop
Merge `develop` to `main`
2022-01-03 12:31:14 +02:00
a.bouhuolia
97d890bcef chore: remove repo logo. 2022-01-03 12:30:15 +02:00
a.bouhuolia
521df8511d chore: upload repo logo. 2022-01-03 12:24:28 +02:00
a.bouhuolia
73ec49b36a chore: update package-lock.json. 2022-01-03 12:06:07 +02:00
a.bouhuolia
cfc625edf9 Merge branch 'develop' 2022-01-03 11:46:00 +02:00
elforjani13
e1b6f0d879 fix:APAging summary stye. 2022-01-02 18:39:53 +02:00
a.bouhuolia
ecda9296b8 fix(FinancialReport): BIG-205 Financial reports missing border final border bottom. 2022-01-02 17:24:35 +02:00
a.bouhuolia
aba732724b Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2022-01-02 16:37:46 +02:00
a.bouhuolia
40bc7d4e99 fix: BIG-222 Manual journal details entries table footer. 2022-01-02 16:37:37 +02:00
elforjani13
7f1844aa6b BIG-231 Transactions number on drawer title. 2022-01-02 13:38:40 +02:00
a.bouhuolia
7ab7456d08 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2022-01-01 18:11:15 +02:00
a.bouhuolia
de53a24d58 fix: BIG-209 Account details such as normal, account type not localized. 2022-01-01 18:11:06 +02:00
a.bouhuolia
e0c565388a fix: BIG-196 Bill landed cost transactions formatted allocate type. 2022-01-01 18:06:46 +02:00
elforjani13
3c73540b4e BIG-210 Refund credit & vendor drawer detail. 2022-01-01 15:34:04 +02:00
elforjani13
a4a2d0c888 BIG-225 Optimize style of refund vendor form. 2022-01-01 11:00:08 +02:00
elforjani13
e9797fd9a0 BIG-214 Min width submit button on edit mode. 2022-01-01 10:27:32 +02:00
elforjani13
40ae1aeb52 BIG-225 Add menu divider before delete on contextMenu. 2021-12-30 21:54:32 +02:00
elforjani13
b2c08d5645 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-30 21:33:31 +02:00
elforjani13
ee6f4028eb BIG-232 customer and vendor drawer link. 2021-12-30 21:33:18 +02:00
a.bouhuolia
cdb8ea6721 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-30 15:39:26 +02:00
a.bouhuolia
0173630e80 fix: BIG-206 Reconcilate credit note and vendor credit with invoices should amount to credit be max the invoice remaining amount. 2021-12-30 15:39:22 +02:00
elforjani13
4403bf2b06 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-30 12:54:41 +02:00
elforjani13
f8e44c4f4e BIG-220 Avoid display empty status. 2021-12-30 12:54:22 +02:00
a.bouhuolia
0bd11419bb fix: BIG-199 Purchase invoice partial payment status progress height not consistent with sell invoice style. 2021-12-30 12:50:27 +02:00
a.bouhuolia
c1e229814f Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-30 12:38:12 +02:00
a.bouhuolia
871dcb62c4 fix: BIG-213 Landed cost checkbox disable with inventory items not service in purchase invoice. 2021-12-30 12:38:03 +02:00
elforjani13
5bf591d8c9 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-30 12:36:21 +02:00
elforjani13
75b1cce380 BIG-211 Invalidate reconciliation credit & vendor transaction. 2021-12-30 12:35:28 +02:00
a.bouhuolia
119e6fa216 fix: BIG-195 Allocate landed cost amount max number should be transaction remaining amount. 2021-12-30 12:30:02 +02:00
elforjani13
6b98e1f1c2 BIG-204 payment transactions context menu actions. 2021-12-30 12:28:42 +02:00
elforjani13
fa23aa67d3 BIG-202 Remove the allocate actions bar. 2021-12-30 12:15:23 +02:00
elforjani13
9474a4fcd1 BIG-197 Bill landed amount text right align. 2021-12-30 11:56:58 +02:00
elforjani13
81c81bd09f fix: add ability credit & vendor tabs. 2021-12-29 14:37:03 +02:00
elforjani13
1492c24cfb fix: formatted_type in inventory adjustment. 2021-12-29 12:34:12 +02:00
a.bouhuolia
b4e9ee7ff3 feat(GLTable): columns text overflow. 2021-12-28 19:52:21 +02:00
elforjani13
e97bf56adb feat: isLoading state. 2021-12-28 18:32:55 +02:00
elforjani13
11d44c128b Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-28 17:58:53 +02:00
elforjani13
e615f62ef5 fix: customer & inventory adjustment. 2021-12-28 17:57:50 +02:00
a.bouhuolia
c69d29fb22 feat(TransactionsLocking): localization. 2021-12-28 17:53:47 +02:00
a.bouhuolia
1e472d278a fix(Estimate): estimate status. 2021-12-28 17:01:35 +02:00
elforjani13
1688f49bc1 fix: fix localiztion. 2021-12-28 13:43:53 +02:00
elforjani13
9182e13c07 feat: estimate & cashflow. 2021-12-28 13:10:15 +02:00
elforjani13
f2150a982a fix: add type_formatted in item detail. 2021-12-28 12:30:47 +02:00
elforjani13
d8efb17651 feat: add notes. 2021-12-28 12:21:56 +02:00
elforjani13
1e361dac66 feat: notes. 2021-12-27 22:23:41 +02:00
elforjani13
a6cd483eb9 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-27 22:05:32 +02:00
elforjani13
765f00d203 feat: permissions localiztion. 2021-12-27 22:05:17 +02:00
a.bouhuolia
088d7d4b1d feat(TransactionsLocking): modify AR localization. 2021-12-27 18:59:01 +02:00
a.bouhuolia
92c9001c52 feat(AccountDetail): more transactions icon in RTL mode. 2021-12-27 18:43:02 +02:00
a.bouhuolia
93bd2af1d7 feat(Card): card footer actions. 2021-12-27 18:29:52 +02:00
a.bouhuolia
f261555b86 feat(InvoiceDetails): invoice payment transactions ability access control. 2021-12-27 16:19:13 +02:00
a.bouhuolia
62ab31efd2 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-27 16:02:16 +02:00
a.bouhuolia
96cb3177aa feat: WIP role form localization. 2021-12-27 16:01:22 +02:00
elforjani13
d5f7cdf131 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-27 15:20:48 +02:00
elforjani13
6ad3065f1f feat: landed hint. 2021-12-27 15:19:16 +02:00
a.bouhuolia
0860db87fb Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-27 15:05:17 +02:00
a.bouhuolia
2707415319 feat: Role form permissions dependecies. 2021-12-27 15:04:57 +02:00
elforjani13
99716e99a9 feat: localiztion. 2021-12-27 14:44:04 +02:00
a.bouhuolia
d1a67ca2ed Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-27 11:08:10 +02:00
a.bouhuolia
a1ed9bf4da feat: add rtlcss to styled components. 2021-12-27 11:08:05 +02:00
elforjani13
99df627633 feat: empty status in credit & vednor. 2021-12-26 20:56:25 +02:00
a.bouhuolia
e1646e92a8 fix: BIG-160 Remove expense default resource type on universal search. 2021-12-26 20:07:11 +02:00
a.bouhuolia
d4138fdf4e feat(RoleForm): service full access. 2021-12-26 19:09:20 +02:00
a.bouhuolia
49b6deed6d Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-26 18:26:22 +02:00
a.bouhuolia
0dddf3d1d0 feat: permissions service full access. 2021-12-26 18:26:05 +02:00
elforjani13
d5acb3696e feat: add convert to vendor credit in drawer. 2021-12-26 17:11:04 +02:00
elforjani13
2a9c1a9833 feat: add convert to credit note in drawer. 2021-12-26 16:34:05 +02:00
elforjani13
80d86b01de feat: add payment receive & bill detail footer. 2021-12-26 13:28:25 +02:00
elforjani13
4a42fa4edc feat: credit note detail footer. 2021-12-26 13:26:53 +02:00
elforjani13
8ea92513fe feat: receipt detail footer. 2021-12-26 13:26:10 +02:00
elforjani13
a075b998d3 feat: estimate detail footer. 2021-12-26 13:25:52 +02:00
elforjani13
93aa60124b feat: add convert to vendor credit. 2021-12-26 13:25:07 +02:00
elforjani13
f9a7306e47 feat: add convert to credit note. 2021-12-26 13:24:38 +02:00
elforjani13
10f0d47b54 fix: BIG-145 rename product/service to product. 2021-12-26 13:22:27 +02:00
a.bouhuolia
1d505db7bf fix: BIG-193 purchase item description does fill on item entries table. 2021-12-25 19:40:14 +02:00
a.bouhuolia
6975ebb9e7 feat: styled preferences page cards. 2021-12-25 19:35:07 +02:00
a.bouhuolia
5defb5a279 feat: credit note and vendor credit universal search. 2021-12-25 18:52:46 +02:00
a.bouhuolia
1497a27e7d feat: add terms and conditions to invoice details. 2021-12-25 12:10:29 +02:00
elforjani13
af9f4c45fc feat: add inventory adjustment entries. 2021-12-23 17:58:26 +02:00
elforjani13
d719ac60bd feat: add ability credit & vendor & item transactions. 2021-12-23 17:27:28 +02:00
elforjani13
789c8db693 feat: localization. 2021-12-23 13:33:02 +02:00
a.bouhuolia
7eea202f9d feat(CommercialDoc): tweak in style. 2021-12-23 11:16:28 +02:00
a.bouhuolia
5b581b86f4 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-23 11:10:28 +02:00
a.bouhuolia
1ad2117c37 feat: optimize style of card component. 2021-12-23 11:10:07 +02:00
elforjani13
b1afa88c16 feat: add localization. 2021-12-22 22:02:38 +02:00
elforjani13
4b7af1c634 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-22 20:43:07 +02:00
elforjani13
29a4ab7590 feat: add locking localization. 2021-12-22 20:42:41 +02:00
a.bouhuolia
7150f12a01 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-22 19:17:46 +02:00
a.bouhuolia
934b0abbe6 feat: optimize style of role permissions form. 2021-12-22 19:17:41 +02:00
elforjani13
b36468ff7f feat: add localization. 2021-12-22 15:59:16 +02:00
a.bouhuolia
10c421dea0 feat: optimize account details. 2021-12-21 20:29:51 +02:00
a.bouhuolia
661cbaf11e feat: optimize landed cost entries table style. 2021-12-21 20:18:34 +02:00
a.bouhuolia
1e5b394575 feat: optimize style of reconcile customer/vendor credit table. 2021-12-21 20:09:32 +02:00
a.bouhuolia
dd7b44eb29 feat: display expense formatted amount. 2021-12-21 18:36:45 +02:00
a.bouhuolia
a456b9d942 feat: optimize expense and manual journal details status. 2021-12-21 18:10:58 +02:00
a.bouhuolia
5429643db5 feat: optimize expense and manual journal details. 2021-12-21 17:57:03 +02:00
a.bouhuolia
13310b1aac feat: optimize table of item associated transactions. 2021-12-21 17:11:41 +02:00
a.bouhuolia
7987f68aa3 refactor: payment made details total lines. 2021-12-21 16:55:35 +02:00
a.bouhuolia
1d159c2757 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-21 16:51:54 +02:00
a.bouhuolia
588995e759 refactor: Total lines of commercial documents. 2021-12-21 16:51:47 +02:00
a.bouhuolia
e2349f1951 feat: changelog. 2021-12-21 16:47:15 +02:00
elforjani13
e80901c7a6 fix: itemPerfernce. 2021-12-21 12:24:25 +02:00
elforjani13
c87a98a5e4 fix: accountant. 2021-12-21 12:12:06 +02:00
elforjani13
da3564d315 fix: handle switch button item transaction. 2021-12-21 10:43:04 +02:00
elforjani13
0d924464ea feat: add style of payment made. 2021-12-20 16:47:48 +02:00
elforjani13
961082c50b Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-20 16:11:21 +02:00
elforjani13
828c33bee1 feat: add style of vendor credit. 2021-12-20 16:11:10 +02:00
a.bouhuolia
1540a20a6e Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-20 16:08:30 +02:00
a.bouhuolia
2a37497648 feat: optimize style of sale receipt details. 2021-12-20 16:08:25 +02:00
elforjani13
dbe067a27c Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-20 15:31:15 +02:00
elforjani13
3511348d04 feat: add style of bill. 2021-12-20 15:31:03 +02:00
a.bouhuolia
ace3fdc569 feat: optmize style of payment receive details. 2021-12-20 14:33:48 +02:00
a.bouhuolia
a0098382e7 feat: optimize style of sale estimate details. 2021-12-20 14:12:19 +02:00
a.bouhuolia
a953236bff Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-20 13:28:22 +02:00
a.bouhuolia
4dda2a37aa feat: optimize style of invoice details.
feat: optimize style of credit note details.
feat: optimize global style checkbox  of the application.
2021-12-20 13:19:59 +02:00
elforjani13
0e79dceae8 feat: add journal entries credit & vendor. 2021-12-20 11:47:01 +02:00
elforjani13
0ca0a2ee0b feat: add context menu. 2021-12-20 11:12:38 +02:00
elforjani13
7095903653 feat: add contextMenu in item transactions. 2021-12-19 19:29:42 +02:00
elforjani13
30841d57dc feat: add item payment transactions. 2021-12-19 18:25:41 +02:00
elforjani13
d0f889850c feat: add contextMenu in invoice & bill transactions. 2021-12-19 17:30:16 +02:00
elforjani13
f9fe3506c5 feat: item payment transactions. 2021-12-19 17:29:25 +02:00
elforjani13
8390e5ea6b fix: fix errors. 2021-12-16 21:11:21 +02:00
a.bouhuolia
fcd1a8849d fix(Invoice|Bill): draft status round tag. 2021-12-16 14:48:38 +02:00
a.bouhuolia
9bd047917d feat(EstimatesList): optimize status tags. 2021-12-16 12:49:11 +02:00
a.bouhuolia
2108666f3a Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-15 22:31:28 +02:00
a.bouhuolia
0f10b71604 feat(Changelog): release v1.5.0 logs. 2021-12-15 22:31:24 +02:00
elforjani13
09e739a5a9 feat: edit locking transactions. 2021-12-15 20:45:42 +02:00
elforjani13
a7a94ba201 fix: fix format. 2021-12-15 20:19:04 +02:00
a.bouhuolia
3466828b65 feat(VendorCredit): optimize data table style. 2021-12-15 19:55:47 +02:00
a.bouhuolia
cfed874182 feat(RefundCreditNote): optimize style. 2021-12-15 19:54:17 +02:00
a.bouhuolia
c688b8700e feat(TextStatus): new component. 2021-12-15 19:53:21 +02:00
a.bouhuolia
7a608d2ee3 feat: transactions locking content. 2021-12-15 19:53:04 +02:00
a.bouhuolia
33b998cbda Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-15 12:01:44 +02:00
a.bouhuolia
d7da0ad24e feat: architect transactions locking. 2021-12-15 11:59:39 +02:00
elforjani13
92cff82184 feat: add edit locking transactions. 2021-12-14 22:05:17 +02:00
a.bouhuolia
7cd2b1c533 feat: transactions list container dynamic width. 2021-12-14 19:09:41 +02:00
a.bouhuolia
29a34f826a feat: controlled transactions locking type. 2021-12-14 19:01:15 +02:00
a.bouhuolia
bd97a73c65 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-14 18:04:07 +02:00
a.bouhuolia
eebe4c46fa feat: handle transactions locking request error. 2021-12-14 18:03:58 +02:00
elforjani13
6aba694518 feat: add payment trasnactions. 2021-12-14 17:56:42 +02:00
elforjani13
ae7d37a0e0 Merge branch 'feature/associated-payment-transactions' into develop 2021-12-14 13:06:05 +02:00
elforjani13
897e674912 feat add localization & auto focus. 2021-12-13 20:14:16 +02:00
a.bouhuolia
a52f00eeb2 feat: optimize transactions locking. 2021-12-13 19:22:56 +02:00
a.bouhuolia
0ee9b54a9b fix: cancel partial locking. 2021-12-13 17:46:26 +02:00
a.bouhuolia
dd8bb9cb18 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-13 17:37:32 +02:00
a.bouhuolia
86762d2dc8 feat: add little space between items of transactions locking. 2021-12-13 17:37:26 +02:00
elforjani13
c124002605 feat: add cancel unlocking alert. 2021-12-13 17:36:48 +02:00
a.bouhuolia
8e18d4a0dc feat: modify the locked transactions module. 2021-12-13 16:47:52 +02:00
a.bouhuolia
21e075b479 feat: validate before move to full and partial transactions locking. 2021-12-13 16:28:36 +02:00
a.bouhuolia
51dfee699f Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-13 15:23:49 +02:00
a.bouhuolia
a6a10ef6b8 feat: switch betweel full and partial transactions locking. 2021-12-13 15:22:33 +02:00
elforjani13
fba46e2479 feat: add module in payload. 2021-12-13 15:20:16 +02:00
elforjani13
c4650f5d31 fix: name list. 2021-12-13 14:03:34 +02:00
a.bouhuolia
a441f78e61 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-12-13 13:58:13 +02:00
a.bouhuolia
280d991567 feat: add lock all transactions at once callout. 2021-12-13 13:53:21 +02:00
elforjani13
62e5db86a5 feat: locking transaction page. 2021-12-13 13:48:21 +02:00
a.bouhuolia
4fe4178090 feat: optimize transactions locking style. 2021-12-13 12:12:48 +02:00
elforjani13
dfc0fbbb71 feat: add transactions locking query. 2021-12-12 19:15:31 +02:00
elforjani13
295fff4746 feat: add unlocking transactions dialog. 2021-12-12 19:10:58 +02:00
elforjani13
c671fcd011 feat: add unlocking partail transactions dialog. 2021-12-12 19:06:55 +02:00
elforjani13
a6141d9f73 feat: add transactions locking. 2021-12-12 19:01:52 +02:00
elforjani13
91d1dddfed fix: add credited_amount & calculate remaining. 2021-12-09 16:55:29 +02:00
elforjani13
ca746df86d feat: add quick create & sortable. 2021-12-09 14:01:53 +02:00
elforjani13
02330c84b1 feat: invalidate query. 2021-12-08 22:59:48 +02:00
elforjani13
c89b8b131d fix: fix notes. 2021-12-08 22:43:44 +02:00
elforjani13
3690c88c04 fix: loading state on submit button. 2021-12-08 20:11:09 +02:00
elforjani13
6573f19ff8 fix: notes. 2021-12-08 18:53:14 +02:00
elforjani13
a948dd4236 feat: add delete reconcile & handle error. 2021-12-08 18:51:21 +02:00
a.bouhuolia
56b1c36c9d Merge branch 'feature/credit-memo' into develop 2021-12-08 15:43:49 +02:00
a.bouhuolia
bc7ec834c0 Merge branch 'feature/credit-memo' into develop 2021-12-08 15:21:39 +02:00
elforjani13
5963d14fdd feat: add reconcile vendor credit. 2021-12-08 14:33:33 +02:00
elforjani13
80b8083059 feat: add reconcile credit style. 2021-12-07 21:12:56 +02:00
elforjani13
ecaf23d269 feat: add reconcile credit transactions table. 2021-12-07 20:58:17 +02:00
elforjani13
14f33c667b feat: handle error message. 2021-12-07 20:56:54 +02:00
elforjani13
78c42acb17 feat: add reconcile credit note. 2021-12-07 20:55:47 +02:00
elforjani13
192bcdc696 feat: add filterByTypes 2021-12-07 11:00:57 +02:00
elforjani13
ac99a6ca75 feat: add status & opened alert in credit & vendor. 2021-12-06 16:28:42 +02:00
elforjani13
2a48d9be51 feat: add refund transactions. 2021-12-05 19:30:52 +02:00
elforjani13
ab48e6092a feat: add refund credit & vendor dialogs. 2021-12-05 19:29:39 +02:00
elforjani13
bf99bda616 fix: credit & vendor reducer. 2021-12-04 22:16:36 +02:00
elforjani13
e1a3f471cb feat: add Invalidate landed cost in bill. 2021-12-04 18:59:01 +02:00
elforjani13
07e52bef7a feat: add payment transaction & style 2021-12-04 18:08:20 +02:00
a.bouhuolia
d3c5131020 fix: allocate landed cost on inventory items. 2021-12-04 16:32:37 +02:00
elforjani13
58a0ed4ecd fix: formatted amount & lang in credit view. 2021-12-04 12:41:08 +02:00
elforjani13
26cf1d20f3 feat: add formatted amount & date in credit view. 2021-12-02 17:04:24 +02:00
elforjani13
0fedd2479d feat: add formatted amount & data in credit. 2021-12-02 16:07:18 +02:00
elforjani13
ba585271b0 feat: landed cost fields & style. 2021-12-02 15:36:29 +02:00
elforjani13
0c4259a05b feat: style journal entries. 2021-12-02 15:34:26 +02:00
elforjani13
31e0bbc187 feat: add View detail. 2021-12-01 16:59:37 +02:00
elforjani13
43b91503d2 feat: add auto increment in vendor credit number. 2021-12-01 14:02:54 +02:00
elforjani13
432e2d202a feat: add Auto increment in credit note number. 2021-12-01 14:02:31 +02:00
elforjani13
eeb16f4362 feat: add create & edit & delete in credit note. 2021-11-30 21:04:36 +02:00
elforjani13
15fa1729a2 feat: add create & edit & delete in vendor credit. 2021-11-30 16:34:13 +02:00
elforjani13
119d0b2839 feat: Vendor Credit note. 2021-11-29 16:33:43 +02:00
elforjani13
0a9798e7a7 feat: Credit note. 2021-11-29 16:14:22 +02:00
a.bouhuolia
008faaece6 Merge branch 'master' of https://github.com/bigcapitalhq/client 2021-11-28 09:05:55 +02:00
a.bouhuolia
27916585a5 Merge branch 'develop' 2021-11-28 09:04:32 +02:00
elforjani13
346696f673 fix: ability option key. 2021-11-27 20:23:40 +02:00
elforjani13
68227b81e8 fix: pause transactions locaking. 2021-11-27 19:44:06 +02:00
elforjani13
0c806366cd feat: handle error delete role. 2021-11-27 18:51:35 +02:00
a.bouhuolia
8b28d6894f feat: avoid display any dashboard before boot complete loading. 2021-11-27 17:53:54 +02:00
a.bouhuolia
3db00f6f70 feat: universal search permissions access control. 2021-11-27 17:22:29 +02:00
a.bouhuolia
56ab0a68e2 feat: add default role permissions in new mode. 2021-11-27 16:43:33 +02:00
elforjani13
4ac32b3aad feat: handle error roles table. 2021-11-27 13:52:37 +02:00
elforjani13
f98b429fcc feat: add localiztion. 2021-11-27 11:50:21 +02:00
a.bouhuolia
012f204c5c Merge branch 'featrue/roles-permission' into develop 2021-11-26 23:56:34 +02:00
a.bouhuolia
7c62466c5b Merge branch 'featrue/roles-permission' of https://github.com/bigcapitalhq/client into featrue/roles-permission 2021-11-26 23:38:49 +02:00
a.bouhuolia
111ade2ac8 feat: shortcuts keyword table permissions access control. 2021-11-26 23:38:39 +02:00
elforjani13
408e3cbb0b Merge branch 'featrue/roles-permission' of https://github.com/bigcapitalhq/client into featrue/roles-permission 2021-11-26 22:40:50 +02:00
elforjani13
9cc770f168 feat: edit user dialog handle error. 2021-11-26 22:40:06 +02:00
a.bouhuolia
383a9aad3b Merge branch 'featrue/roles-permission' of https://github.com/bigcapitalhq/client into featrue/roles-permission 2021-11-26 22:27:37 +02:00
a.bouhuolia
1be30fd142 feat: application and dashboard async booting. 2021-11-26 22:27:27 +02:00
elforjani13
63cb3f9fef fix: Abilities keys. 2021-11-26 20:56:00 +02:00
elforjani13
ca3ff3fd8f Merge branch 'featrue/roles-permission' of https://github.com/bigcapitalhq/client into featrue/roles-permission 2021-11-26 19:51:29 +02:00
elforjani13
313d0f3d0f fix: role field in invite & User dialog. 2021-11-26 19:48:19 +02:00
elforjani13
64bf223458 feat: handle errors. 2021-11-26 19:46:48 +02:00
elforjani13
97c421e2f1 feat: roles data & delete alert. 2021-11-26 19:43:06 +02:00
a.bouhuolia
ccad55dd4a feat: dashboard quick new access control. 2021-11-26 19:37:36 +02:00
a.bouhuolia
a21d70a59d feat: sidebar permission access control. 2021-11-26 19:07:18 +02:00
a.bouhuolia
c2ccb7f879 Merge branch 'featrue/roles-permission' of https://github.com/bigcapitalhq/client into featrue/roles-permission 2021-11-26 16:13:51 +02:00
a.bouhuolia
fe9ca215ab feat: handle forbidden request error. 2021-11-26 16:11:42 +02:00
a.bouhuolia
c14b35356b feat: dashboard meta boot and authenticated user request query. 2021-11-26 16:09:42 +02:00
a.bouhuolia
6fd8a24802 feat: dashboard meta boot. 2021-11-26 16:08:49 +02:00
a.bouhuolia
80531b7fdb feat: save @casl package dependency. 2021-11-25 22:54:16 +02:00
elforjani13
600a835dad feat: home page ability. 2021-11-25 16:03:40 +02:00
elforjani13
3dff8763d4 feat: ability reports home page. 2021-11-25 15:20:44 +02:00
elforjani13
e197d66d9f Merge branch 'feature/draft' into featrue/roles-permission 2021-11-25 14:37:09 +02:00
elforjani13
5dfb592ecc feat: ability context. 2021-11-25 14:36:34 +02:00
elforjani13
2630e0235d feat: add cashflow & vendor ability. 2021-11-25 13:02:09 +02:00
elforjani13
8b4dfe4ded feat: add role name in edit & invite user dialog. 2021-11-25 12:21:29 +02:00
elforjani13
9ceee6d02e feat: reports abilities. 2021-11-24 14:35:38 +02:00
elforjani13
553334f063 feat: ability home page option. 2021-11-24 14:09:24 +02:00
elforjani13
aef8eb7907 feat: empty status ability. 2021-11-24 11:47:18 +02:00
elforjani13
cc1f4cc26b feat: ability option. 2021-11-23 22:38:16 +02:00
elforjani13
719302b241 feat: add expense ability. 2021-11-23 22:15:02 +02:00
elforjani13
3db52e9c63 feat: add manual journal ability. 2021-11-23 21:56:36 +02:00
elforjani13
7393d68b7a feat: add account ability. 2021-11-23 21:42:16 +02:00
elforjani13
6ec86d3cf7 feat: add customer & vendor ability. 2021-11-23 21:26:34 +02:00
elforjani13
1cba4b5f18 feat: add bill & payment made ability. 2021-11-23 20:29:35 +02:00
elforjani13
3a8e1f5238 feat: add payment receive ability. 2021-11-23 20:15:29 +02:00
elforjani13
371e374dc5 feat: add receipt ability. 2021-11-23 20:08:05 +02:00
elforjani13
c2650c76e8 feat: add invoice ability. 2021-11-23 20:03:26 +02:00
elforjani13
fc74346695 feat: add estimate ability. 2021-11-23 19:37:49 +02:00
elforjani13
fca4dedeac feat: add item & inventory adjustment ability. 2021-11-23 19:29:58 +02:00
elforjani13
e5d02043ad feat: item & inventory. 2021-11-23 16:51:40 +02:00
a.bouhuolia
51fde0cc31 Merge branch 'feature/draft' of https://github.com/bigcapitalhq/client 2021-11-23 15:29:17 +02:00
elforjani13
afee2e90e0 ability. 2021-11-23 15:24:53 +02:00
elforjani13
802f7cc442 fix: add note to customer & vendor details. 2021-11-23 13:13:23 +02:00
elforjani13
d45005d8c2 fix: delete role alert. 2021-11-22 19:58:43 +02:00
elforjani13
15e7f34879 feat: delete & edit role. 2021-11-22 19:53:40 +02:00
elforjani13
a54ddf27c7 feat: delete & edit role. 2021-11-21 23:56:29 +02:00
elforjani13
955ae97c19 feat: add roles permission schema. 2021-11-21 18:21:10 +02:00
elforjani13
ddbadb67c8 feat: submit roles permission schema. 2021-11-21 17:10:49 +02:00
elforjani13
b853eb1e75 fix: roles form. 2021-11-21 01:45:14 +02:00
elforjani13
c139e129bf feat: roles permission & style & component. 2021-11-21 01:13:41 +02:00
elforjani13
3d3827b683 feat: add transactions locking icon. 2021-11-20 20:55:57 +02:00
a.bouhuolia
cf6d8d6038 feat: add hints to transactions locking item. 2021-11-20 20:40:09 +02:00
a.bouhuolia
d12b965bac feat: optimize transactions locking page style. 2021-11-20 20:38:02 +02:00
a.bouhuolia
5f0700b5e5 fix: hotbug account dialog edit payload transformation. 2021-11-20 18:52:45 +02:00
a.bouhuolia
48348da663 fix: invite user auth route. 2021-11-20 15:49:28 +02:00
elforjani13
fe8f41f200 feat: Transactions locking. 2021-11-18 17:28:11 +02:00
elforjani13
0ad5a9ed03 feat: item payment transactions. 2021-11-15 21:45:24 +02:00
elforjani13
bd282acae4 feat: invoice payment transactions. 2021-11-15 21:44:46 +02:00
elforjani13
377fb07c70 feat: bill payment transactions. 2021-11-15 21:43:39 +02:00
elforjani13
b32abc0417 fix: fix localization. 2021-11-14 11:53:35 +02:00
a.bouhuolia
11d7029568 Merge branch 'develop' 2021-11-11 17:56:23 +02:00
a.bouhuolia
1990ce7562 fix: personal phone number placeholder. 2021-11-11 17:50:58 +02:00
a.bouhuolia
b6f0f6c2d5 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-11-11 17:20:57 +02:00
a.bouhuolia
4c58e49169 fix: SMS notification types. 2021-11-11 17:20:53 +02:00
elforjani13
376a16fd65 fix: force-width 2021-11-11 16:15:45 +02:00
elforjani13
918cd4aef3 feat: add display name defaultText 2021-11-11 15:39:42 +02:00
elforjani13
ec844637c3 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-11-11 15:23:52 +02:00
elforjani13
5803760c61 fix: rowClassNames. 2021-11-11 15:23:23 +02:00
a.bouhuolia
2e34df5d63 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-11-11 12:47:14 +02:00
a.bouhuolia
35d755e417 fix: SMS notification messages context menu. 2021-11-11 12:46:58 +02:00
elforjani13
66641ca56e fix: rename in eng file. 2021-11-11 12:13:14 +02:00
a.bouhuolia
307aaf0aa4 Merge branch 'develop' of https://github.com/bigcapitalhq/client into develop 2021-11-11 11:27:06 +02:00
a.bouhuolia
eb5a82d413 feat: optimize SMS notifications RTL. 2021-11-11 11:26:49 +02:00
elforjani13
ce9169b24d fix: add calloutCodes. 2021-11-11 11:19:58 +02:00
a.bouhuolia
22069f4795 feat: optimize Arabic localization of SMS notifications module. 2021-11-11 10:21:41 +02:00
a.bouhuolia
567b4da7e9 fix: merge conflict quick create list field. 2021-11-11 00:05:57 +02:00
a.bouhuolia
06345a5615 Merge branch 'feature/notify-via-SMS' into develop 2021-11-10 23:58:34 +02:00
a.bouhuolia
6b8178f643 feat: Reset to defailt SMS message. 2021-11-10 23:53:39 +02:00
a.bouhuolia
449ff724e1 Merge branch 'feature/notify-via-SMS' of https://github.com/bigcapitalhq/client into feature/notify-via-SMS 2021-11-10 22:02:46 +02:00
a.bouhuolia
95e75f0e8f fix: notify invoice notification key query. 2021-11-10 22:02:00 +02:00
elforjani13
1a63ac69d8 fix: rename sms messages. 2021-11-10 21:31:28 +02:00
a.bouhuolia
da67217d74 feat: quick create action on select/suggest items fields. 2021-11-10 20:49:50 +02:00
elforjani13
e0c03141f0 fix: localization arabic. 2021-11-10 16:32:19 +02:00
elforjani13
4d563e3ddd feat: add localization arabic. 2021-11-10 15:17:17 +02:00
elforjani13
8bad78b0d3 fix: cashflow statement row_types. 2021-11-10 12:16:17 +02:00
a.bouhuolia
56fdf245d3 Merge branch 'feature/notify-via-SMS' of https://github.com/bigcapitalhq/client into feature/notify-via-SMS 2021-11-09 18:19:24 +02:00
a.bouhuolia
5a8c61396f feat: SMS message preview with variables. 2021-11-09 18:16:22 +02:00
elforjani13
5fcf32dcaa feat add localization again. 2021-11-09 16:39:13 +02:00
elforjani13
acf457c0a0 Merge branch 'feature/notify-via-SMS' of https://github.com/bigcapitalhq/client into feature/notify-via-SMS 2021-11-09 16:24:31 +02:00
elforjani13
e205c0b9a3 feat add localization. 2021-11-09 16:20:18 +02:00
a.bouhuolia
85f1c5584b feat: SMS notification handle response errors. 2021-11-09 13:56:59 +02:00
a.bouhuolia
9e5fddf294 feat: SMS notification handle errors. 2021-11-09 13:49:16 +02:00
a.bouhuolia
3039e43767 feat: SMS message text preview words break. 2021-11-09 12:41:31 +02:00
a.bouhuolia
7371557482 feat: optimize style of SMS notifications module. 2021-11-09 12:34:55 +02:00
a.bouhuolia
4b5e06f50c feat: SMS notification module. 2021-11-09 11:08:47 +02:00
a.bouhuolia
8daefb6946 fix: add notification id to sms messages templates table. 2021-11-09 09:57:12 +02:00
a.bouhuolia
6bf605f9ea Merge branch 'feature/notify-via-SMS' of https://github.com/bigcapitalhq/client into feature/notify-via-SMS 2021-11-09 09:56:53 +02:00
a.bouhuolia
48221a7af1 feat: Optimize SMS notification module. 2021-11-09 09:51:38 +02:00
elforjani13
7a1c9caa70 feat: add context menu in sms message table. 2021-11-08 16:41:36 +02:00
elforjani13
8c2d138976 fix: disable sort in SMS integration table. 2021-11-08 16:10:54 +02:00
elforjani13
5b09d8279e feat: handle error sms messgae dialog. 2021-11-08 15:13:41 +02:00
elforjani13
92d8096f3a feat: add Invalidate queries. 2021-11-08 15:00:44 +02:00
elforjani13
adc6b336e0 fix: handle error. 2021-11-08 14:54:11 +02:00
elforjani13
6d67d6163d feat: handle error. 2021-11-08 13:20:49 +02:00
elforjani13
4d89f1e0e0 feat: add notify by sms . 2021-11-07 20:11:15 +02:00
elforjani13
7706d2992c feat: add notify via SMS Form. 2021-11-07 16:40:02 +02:00
elforjani13
6dcb98a438 feat: add preferneces menu. 2021-11-07 13:44:20 +02:00
elforjani13
834d365a97 feat: Add SMS Integration & SMS Message Form. 2021-11-07 13:39:29 +02:00
elforjani13
d26ef01afc feat: notify by SMS. 2021-11-06 21:47:17 +02:00
elforjani13
2bd4c5f724 fix: SMS message templates. 2021-11-06 00:08:25 +02:00
elforjani13
2c71d07512 feat: add localization. 2021-11-04 17:05:38 +02:00
elforjani13
17a4744e58 feat: add SMS message template. 2021-11-04 16:55:37 +02:00
elforjani13
46f6380fe6 feat: add notify via SMS. 2021-11-04 15:46:14 +02:00
a.bouhuolia
d94d28f709 chore: remove console log. 2021-11-02 21:24:23 +02:00
a.bouhuolia
94e6b64944 fix: sidebar cashflow links. 2021-11-02 17:31:03 +02:00
elforjani13
d8e9be0246 fix: rename inventory adjustment. 2021-11-02 16:16:10 +02:00
a.bouhuolia
7ef72e8955 fix: invoice details popover menu. 2021-11-02 15:46:03 +02:00
elforjani13
d76cc3d2a2 fix: remove white space 2021-11-02 15:03:25 +02:00
elforjani13
3102329ac0 Merge branch 'feature/BadDebt' 2021-11-02 15:00:16 +02:00
elforjani13
fd09ea12ff fix: localization. 2021-11-02 14:22:55 +02:00
a.bouhuolia
7bd09e7326 fix: BIG-157 incorrect formatted date. 2021-11-02 14:19:10 +02:00
elforjani13
cd3105b320 feat: add Bad-debt & cancel bad-bebt. 2021-11-02 00:23:43 +02:00
elforjani13
91b848f158 feat: Bad Debt. 2021-11-01 20:24:01 +02:00
elforjani13
352e517c2b fix: remove payment made alert in list. 2021-11-01 11:51:55 +02:00
a.bouhuolia
24bd754c72 feat: CellForceWidth component. 2021-11-01 09:34:58 +02:00
a.bouhuolia
613454a862 fix: BIG-158 Quick payment dialog submit button loading state. 2021-10-31 13:49:25 +02:00
a.bouhuolia
33c0c7173a Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow 2021-10-31 13:40:50 +02:00
a.bouhuolia
a0fc25a250 fix: BIG-140Reordering sell, cost and inventory account on item details. 2021-10-31 13:40:10 +02:00
a.bouhuolia
6c663eb8a0 fix: BIG-144 typo adjustment dialog success message. 2021-10-31 13:39:33 +02:00
a.bouhuolia
9211e963c6 fix: BIG-148 items entries ordered by index. 2021-10-31 13:24:12 +02:00
elforjani13
ea466404ec feat: refactoring alerts. 2021-10-31 13:13:38 +02:00
a.bouhuolia
cbce9f6d50 fix: BIG-132 AR/AP aging summary report filter by none transactions/zero contacts. 2021-10-31 12:35:50 +02:00
a.bouhuolia
60f45f281a Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow 2021-10-30 20:56:04 +02:00
a.bouhuolia
b4e1fa4aca feat: BIG-171 alerts global and lazy loading. 2021-10-30 20:55:50 +02:00
elforjani13
93f778ebcc refactoring: account transaction alert. 2021-10-30 19:40:08 +02:00
a.bouhuolia
2d9aaac653 BIG-170: fix cashflow money out owner drawing. 2021-10-30 18:25:58 +02:00
a.bouhuolia
b6fc06ea0c fix: BIG-166 cashflow new bank/cash account in cashflow service. 2021-10-30 17:19:35 +02:00
a.bouhuolia
0ae31d519c Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow 2021-10-30 16:17:45 +02:00
a.bouhuolia
e9964f1ac9 fix: BIG-165 cashflow account context menu z-index issue. 2021-10-30 16:17:39 +02:00
elforjani13
fb14858f16 fix: add invalidate query cash flow in receipt. 2021-10-28 15:15:54 +02:00
elforjani13
8c5552edd8 Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow 2021-10-28 14:43:15 +02:00
elforjani13
4b96ba76f5 feat: fix Money in & out dialog. 2021-10-28 14:39:54 +02:00
a.bouhuolia
0b5c5d83a4 fix: cashflow service Arabic localization. 2021-10-27 22:39:45 +02:00
elforjani13
b0f1584b04 feat: add specific cashflow account transactions. 2021-10-27 19:29:32 +02:00
elforjani13
f378275673 feat: add lang. 2021-10-27 18:08:11 +02:00
elforjani13
f1fec69d52 feat: fix cash flow drawer. 2021-10-27 18:06:26 +02:00
elforjani13
c462681c70 feat: account transaction alerts. 2021-10-26 19:34:16 +02:00
elforjani13
a71ae1813b feat: add onCell Click. 2021-10-26 16:49:06 +02:00
elforjani13
2fd78ca1c4 feat: fix setting cash. 2021-10-26 14:33:41 +02:00
elforjani13
0a21c5fa41 feat: add view detail cash flow transaction. 2021-10-25 17:31:07 +02:00
a.bouhuolia
f99b01de3b fix: activate/inactivate cashflow account. 2021-10-25 13:15:15 +02:00
a.bouhuolia
8f5d44c648 feat: cashflow pages default universal search type. 2021-10-25 13:11:29 +02:00
a.bouhuolia
3c49e8f57a feat: invlidate cashflow queries after mutate assocaited queries. 2021-10-25 13:09:28 +02:00
elforjani13
e94a386fe8 feat: add auto increment/ money out. 2021-10-24 20:01:51 +02:00
elforjani13
9ecc7f58e7 feat: add auto increment/ money in. 2021-10-24 20:01:10 +02:00
a.bouhuolia
26080889df feat: cashflow account transactions. 2021-10-24 18:49:22 +02:00
a.bouhuolia
2cd07066a8 Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow 2021-10-24 17:34:20 +02:00
a.bouhuolia
7dfa280bee feat: cashflow service. 2021-10-24 17:34:00 +02:00
elforjani13
68f8140007 feat: add money in & out to keyboardshortcuts. 2021-10-24 14:35:39 +02:00
elforjani13
c5783896ad feat: delete transaction. 2021-10-24 14:34:30 +02:00
a.bouhuolia
fc67d56d45 feat: Cashflow bank account context menu. 2021-10-24 12:12:43 +02:00
a.bouhuolia
7bad9fc52c Merge branch 'feature/Cash-flow' of https://github.com/bigcapitalhq/client into feature/Cash-flow 2021-10-23 23:11:13 +02:00
a.bouhuolia
65e8d3f26a feat: cashflow account transactions infinity scroll loading. 2021-10-23 23:10:48 +02:00
elforjani13
e29db07c32 feat: money in & out Hotkeys. 2021-10-23 20:59:25 +02:00
elforjani13
75acab3348 feat: money out. 2021-10-23 20:04:59 +02:00
elforjani13
1fa03822f1 feat: money in . 2021-10-23 20:03:31 +02:00
a.bouhuolia
c7013caf12 feart: optimize cashflow account transactions page. 2021-10-20 19:04:01 +02:00
a.bouhuolia
0bb1e57061 feat: cashflow accounts grid layout. 2021-10-20 11:30:42 +02:00
elforjani13
de05667bdc feat: Transfer from & to account. 2021-10-18 16:25:58 +02:00
elforjani13
c148e2976a feat : Cash flow transaction type. 2021-10-17 18:00:40 +02:00
elforjani13
2078b6bc99 feat: Money in & out Dialog. 2021-10-13 19:56:48 +02:00
elforjani13
b848553cf7 feat: cashflow accounts. 2021-10-13 19:54:36 +02:00
elforjani13
4ba750fe11 faet: Account Transcations. 2021-10-13 19:51:52 +02:00
a.bouhuolia
369734ab18 BIG-126: async localization loaded data failed to be injected to application. 2021-10-06 17:47:52 +02:00
a.bouhuolia
862a667ef6 chore: sentry on development env only. 2021-10-01 00:13:43 +02:00
a.bouhuolia
2c86e7d8b3 chore: add missing sentry packages. 2021-10-01 00:01:00 +02:00
a.bouhuolia
467abf2d55 Revert "push new version."
This reverts commit 7e2e25a8b4.
2021-09-30 23:52:07 +02:00
a.bouhuolia
7e2e25a8b4 push new version. 2021-09-30 23:48:36 +02:00
a.bouhuolia
6ce0242386 chore: sentry configuration. 2021-09-30 23:47:04 +02:00
a.bouhuolia
5b23d88796 fix: dockerfile. 2021-09-30 16:49:41 +02:00
a.bouhuolia
77f0a767b3 Merge branch 'develop' 2021-09-30 16:41:57 +02:00
a.bouhuolia
8a982e5c7e feat: avoid changing setup plan slug. 2021-09-29 11:22:59 +02:00
a.bouhuolia
2f7564eb9c fix: tweaks in arabic localization. 2021-09-29 00:23:01 +02:00
a.bouhuolia
7c2c362585 Merge branch 'develop' of https://github.com/BigcapitalTech/bigcapital-client into develop 2021-09-29 00:11:34 +02:00
a.bouhuolia
786aad438a BIG-78: feat: prevent table row click action on some given nested elements. 2021-09-29 00:07:06 +02:00
a.bouhuolia
d6c78a9908 BIG-118: feat: hide the pagination before table has minimum items length. 2021-09-28 19:52:01 +02:00
a.bouhuolia
0aca6d9af7 BIG-125: prevent items entries from send amount computed attribute. 2021-09-28 18:37:10 +02:00
elforjani13
696943153d feat: quick payment receive & made in action Bar. 2021-09-28 18:32:30 +02:00
elforjani13
2e437d7b65 fix: style universal search. 2021-09-28 17:23:38 +02:00
elforjani13
5b12c4a433 fix: style universal input search. 2021-09-28 14:25:47 +02:00
a.bouhuolia
96269ccafb feat: remove blueprint config provider. 2021-09-28 13:53:43 +02:00
a.bouhuolia
f556f061cb chore: revert to @blueprint/core. 2021-09-28 13:46:30 +02:00
a.bouhuolia
b98e8aeeb4 chore: remove github token. 2021-09-28 12:27:23 +02:00
a.bouhuolia
17d5bbd9d1 chore: fix dockerfile. 2021-09-28 12:20:36 +02:00
a.bouhuolia
e1ab4e4d65 chore: fix dockerfile. 2021-09-28 12:14:32 +02:00
a.bouhuolia
b86a3a19dc chore: fix dockerfile. 2021-09-28 12:12:28 +02:00
a.bouhuolia
3b2796cb6d chore: fix dockerfile. 2021-09-28 11:59:04 +02:00
a.bouhuolia
15ee32f6a4 chore: fix docker build 2021-09-28 11:55:11 +02:00
a.bouhuolia
90e550c902 chore: add github registry login. 2021-09-28 11:52:05 +02:00
a.bouhuolia
cbc0ccbfb9 chore: add auth token to github registry. 2021-09-28 11:30:21 +02:00
a.bouhuolia
526c46b24d chore: copy npmrc file to docker container. 2021-09-28 11:06:27 +02:00
a.bouhuolia
6041c175fd chore: remove package-lock file. 2021-09-28 11:02:28 +02:00
a.bouhuolia
0f58665a0d chore: fix blueprintjs registry. 2021-09-28 10:58:41 +02:00
a.bouhuolia
91036c3e52 Merge branch 'develop' of https://github.com/BigcapitalTech/bigcapital-client into develop 2021-09-27 20:17:11 +02:00
a.bouhuolia
555e3a2434 feat: upgrade the blueprint core and datetitme. 2021-09-27 20:16:52 +02:00
elforjani13
b87e85d5ff BIG-124: Prevent the search Hotkey from writing to the field. 2021-09-27 12:45:32 +02:00
elforjani13
288225a0c1 feat: add quick payment receive & made in action Bar detail. 2021-09-26 22:08:13 +02:00
elforjani13
71f9fa47d4 BiG-5: Complete, add switch small and medium table row size. 2021-09-26 21:02:53 +02:00
elforjani13
fcace4213c feat: change default page size pagination. 2021-09-26 14:02:26 +02:00
a.bouhuolia
31d2b1b09a fix: switch small and medium table row size. 2021-09-26 13:14:03 +02:00
elforjani13
cd5116dbcb BIG-3: refactoring financial reports filtering. 2021-09-25 21:17:17 +02:00
elforjani13
010b660318 BIG-123: alert delete showing in vendor & customer. 2021-09-25 17:11:08 +02:00
elforjani13
4e99607b06 BIG-3: add filtering non-zero items. 2021-09-24 19:41:23 +02:00
elforjani13
a3f1857e91 Merge branch 'develop' of https://github.com/BigcapitalTech/bigcapital-client into develop 2021-09-23 15:42:14 +02:00
elforjani13
460ee2718e BIG-5: add switching between compact and medium row size. 2021-09-23 15:39:49 +02:00
a.bouhuolia
87938b8f41 Merge branch 'develop' of https://github.com/BigcapitalTech/bigcapital-client into develop 2021-09-23 13:03:18 +02:00
elforjani13
cd70bf1d80 BIG-94: handle estimate converted to invoice. 2021-09-23 13:02:50 +02:00
a.bouhuolia
c4f2ea405c BIG-119: fix formatted item type with universal search item. 2021-09-23 13:02:34 +02:00
a.bouhuolia
d1cb7eb51b Merge branch 'develop' of https://github.com/BigcapitalTech/bigcapital-client into develop 2021-09-23 12:13:24 +02:00
a.bouhuolia
e949b1b0c7 BIG-5: feat switching between compact and medium table row size. 2021-09-23 10:37:54 +02:00
a.bouhuolia
9b7382e222 BIG-18: missing locales in Arabic. 2021-09-23 09:53:59 +02:00
a.bouhuolia
364859a793 BIG-117: fix dashboard redirect all routes to homepage once refresh the page. 2021-09-23 09:44:30 +02:00
elforjani13
fd07306102 fix: inventory adjustment style. 2021-09-22 15:25:30 +02:00
elforjani13
5fc4897663 BIG-116: payment made transcation. 2021-09-22 13:56:43 +02:00
Ahmed Bouhuolia
7b85dfee5d chore: add circleci build and publish workflow. 2021-09-21 22:32:14 +02:00
Ahmed Bouhuolia
14012c4d7e test circleci 2021-09-21 22:25:24 +02:00
elforjani13
ecf56f3b99 fix: table header overflow. 2021-09-21 22:09:41 +02:00
996 changed files with 38344 additions and 5305 deletions

1
.env.example Normal file
View File

@@ -0,0 +1 @@
APP_VERSION=$npm_package_version

1
.gitignore vendored
View File

@@ -13,6 +13,7 @@
# misc
.DS_Store
.env
.env.local
.env.development.local
.env.test.local

1
.npmrc Normal file
View File

@@ -0,0 +1 @@
@bigcapitalhq:registry=https://npm.pkg.github.com

View File

@@ -2,6 +2,52 @@
All notable changes to Bigcapital server-side will be in this file.
## [1.5.3] - 03-01-2020
### Fixed
- Localize the global errors.
- Expand account name column on trial balance sheet.
## [1.5.0] - 20-12-2021
### Added
- Add credit note on sales module.
- Add vendor credit on purchases module.
- Optimize landed costs on purchase invoices.
- Display associated payment transactions on sale invoice drawer.
- Display associated pamyment transactions on purchase invoice drawer.
- Display item associate invoice, bill, estimate and receipt transactions.
- Transactions locking on all transactions or individual modules.
- Roles and permissions access control module.
- Optimize readonly details style of invoice, receipt, estimate, payment receive,
purchase invoice, expense, manual journal, inventory adjustment and cashflow transaction.
### Changed
- Dashboard meta boot and authenticated user request query.
- Optimize Arabic localization.
## [1.4.0] - 11-09-2021
### Added
- Add SMS notification on sale invoice, receipt, customers payments modules.
- Customer quick create in customers list.
- Item quick create in items list.
### Changes
change: BIG-171 alerts in global scope and lazy loading.
### Fixed
fix: BIG-140 - Reordering sell, cost and inventory account on item details.
fix: BIG-144 - Typo adjustment dialog success message.
fix: BIG-148 - Items entries ordered by index.
fix: BIG-132 AR/AP aging summary report filter by none transactions/zero contacts.
## [1.2.0-RC] - 03-09-2021
Here we write upgrading notes for brands. It's a team effort to make them as
@@ -32,7 +78,7 @@ straightforward as possible.
- Inventory adjustment publish action.
- Customers and vendors activate and inactivate action.
- Add refresh button on dashboard actions bar to all datatables resources.
- Add clickable datatable rows to display each row details.
- Add clickable datatable rows to display each row details.
### Changed

View File

@@ -17,4 +17,4 @@ FROM nginx
COPY ./nginx/sites/default.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/build /usr/share/nginx/html
COPY --from=build /app/build /usr/share/nginx/html

View File

@@ -85,6 +85,9 @@ function getClientEnvironment(publicUrl) {
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
// Application version.
VERSION: paths.appVersion
}
);
// Stringify all values so we can feed into webpack DefinePlugin

View File

@@ -48,6 +48,8 @@ const resolveModule = (resolveFn, filePath) => {
return resolveFn(`${filePath}.js`);
};
const appVersion = require(resolveApp('package.json')).version;
// config after eject: we're in ./config/
module.exports = {
dotenv: resolveApp('.env'),
@@ -65,6 +67,7 @@ module.exports = {
proxySetup: resolveApp('src/setupProxy.js'),
appNodeModules: resolveApp('node_modules'),
publicUrlOrPath,
appVersion
};

598
package-lock.json generated
View File

@@ -1,5 +1,5 @@
{
"name": "client",
"name": "bigcapital-client",
"version": "1.2.0",
"lockfileVersion": 1,
"requires": true,
@@ -282,9 +282,9 @@
}
},
"@babel/helper-validator-identifier": {
"version": "7.15.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz",
"integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w=="
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz",
"integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw=="
},
"@babel/helper-wrap-function": {
"version": "7.8.3",
@@ -1043,12 +1043,18 @@
"to-fast-properties": "^2.0.0"
}
},
"@blueprintjs/colors": {
"version": "4.0.0-alpha.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/colors/-/colors-4.0.0-alpha.0.tgz",
"integrity": "sha512-E5taSTt5gHQcj85W6ln5lpxRVuKIA64nlJZJ9lQ3HjzwSCAF0V3Bmjn+HhfrP312yIMkZQJAutArlNATjz7qlw=="
},
"@blueprintjs/core": {
"version": "3.38.1",
"resolved": "https://registry.npmjs.org/@blueprintjs/core/-/core-3.38.1.tgz",
"integrity": "sha512-ZBqVfMgeIrXiuprsRxBnLM/MPgPSCRf27uckyhMFHRocyEtFS7zrOGmQeJb1Va0nZ/ufNsYk7EiHVxulb1KkSg==",
"version": "3.50.3",
"resolved": "https://registry.npmjs.org/@blueprintjs/core/-/core-3.50.3.tgz",
"integrity": "sha512-wCVmIXqrjmgY3uVC2VFxNTssl5eVVHmyJWfEj+d3msDOqDrFyItJ0G1sVo73e7x4XrBV3K8ElFuybAcAHaxFtA==",
"requires": {
"@blueprintjs/icons": "^3.24.0",
"@blueprintjs/colors": "^4.0.0-alpha.0",
"@blueprintjs/icons": "^3.30.2",
"@types/dom4": "^2.0.1",
"classnames": "^2.2",
"dom4": "^2.1.5",
@@ -1088,27 +1094,28 @@
}
},
"@blueprintjs/datetime": {
"version": "3.15.2",
"resolved": "https://registry.npmjs.org/@blueprintjs/datetime/-/datetime-3.15.2.tgz",
"integrity": "sha512-FQw1BqbO9RBKzLWiXHkSVFxyGFRXHaugG5ST4go+p2IibrxuRDjD6YvrFXo+FLEzi+MsftMo6FkPNm2xApfmHw==",
"version": "3.23.13",
"resolved": "https://registry.npmjs.org/@blueprintjs/datetime/-/datetime-3.23.13.tgz",
"integrity": "sha512-GjQAhZz/Lk1GA1Q2gEg51uqgv0JgiqQUjgwfze/HBvZe6Jj7Q0/WLTgk8hjOXcYJoPLYyAlFi+oyt97IxzzpNQ==",
"requires": {
"@blueprintjs/core": "^3.23.0",
"@blueprintjs/core": "^3.50.3",
"classnames": "^2.2",
"react-day-picker": "7.3.2",
"tslib": "~1.9.0"
"react-day-picker": "7.4.9",
"react-lifecycles-compat": "^3.0.4",
"tslib": "~1.13.0"
},
"dependencies": {
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
}
}
},
"@blueprintjs/icons": {
"version": "3.24.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/icons/-/icons-3.24.0.tgz",
"integrity": "sha512-OvDDI5EUueS1Y3t594iS8LAGoHhLhYjC2GuN/01a85n+ASLSp0jf0/+uix2JeCOj41iTdRRCINbWuRwVQNNGPw==",
"version": "3.30.2",
"resolved": "https://registry.npmjs.org/@blueprintjs/icons/-/icons-3.30.2.tgz",
"integrity": "sha512-t0coke9JWLtAt4eQuGfTD2KQSjD+Q5V9JLnRwt1sEyV9/CHXgeoTvsEEqpiXe6gWOW72Rok6Uo86yLyICRW7wQ==",
"requires": {
"classnames": "^2.2",
"tslib": "~1.13.0"
@@ -1122,11 +1129,11 @@
}
},
"@blueprintjs/popover2": {
"version": "0.11.1",
"resolved": "https://registry.npmjs.org/@blueprintjs/popover2/-/popover2-0.11.1.tgz",
"integrity": "sha512-Uo3oEydB/XoxZ1rzyehgnI0hd7r4bAOiNHbuqrNssASzujTm86Y6o5WvCx3TrsOGqs+YyqS+KtLMm2BioHSKyw==",
"version": "0.11.4",
"resolved": "https://registry.npmjs.org/@blueprintjs/popover2/-/popover2-0.11.4.tgz",
"integrity": "sha512-KTietd+thBzeen9yP0WWzHJDAaqoey1H3AXvjaF94ypQQKdUaIzSmIop9Z3lJK44ynlYiI+dSzFYQbRdbpd0/w==",
"requires": {
"@blueprintjs/core": "^3.47.0",
"@blueprintjs/core": "^3.49.1",
"@popperjs/core": "^2.5.4",
"classnames": "^2.2",
"dom4": "^2.1.5",
@@ -1135,57 +1142,6 @@
"tslib": "~1.13.0"
},
"dependencies": {
"@blueprintjs/core": {
"version": "3.47.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/core/-/core-3.47.0.tgz",
"integrity": "sha512-u+bfmCyPXwKZMnwY4+e/iWjO2vDUvr8hA8ydmV0afyvcEe7Sh85UPEorIgQ/CBuRIbVMNm8FpLsFzDxgkfrCNA==",
"requires": {
"@blueprintjs/icons": "^3.27.0",
"@types/dom4": "^2.0.1",
"classnames": "^2.2",
"dom4": "^2.1.5",
"normalize.css": "^8.0.1",
"popper.js": "^1.16.1",
"react-lifecycles-compat": "^3.0.4",
"react-popper": "^1.3.7",
"react-transition-group": "^2.9.0",
"resize-observer-polyfill": "^1.5.1",
"tslib": "~1.13.0"
},
"dependencies": {
"react-popper": {
"version": "1.3.11",
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-1.3.11.tgz",
"integrity": "sha512-VSA/bS+pSndSF2fiasHK/PTEEAyOpX60+H5EPAjoArr8JGm+oihu4UbrqcEBpQibJxBVCpYyjAX7abJ+7DoYVg==",
"requires": {
"@babel/runtime": "^7.1.2",
"@hypnosphi/create-react-context": "^0.3.1",
"deep-equal": "^1.1.1",
"popper.js": "^1.14.4",
"prop-types": "^15.6.1",
"typed-styles": "^0.0.7",
"warning": "^4.0.2"
}
}
}
},
"@blueprintjs/icons": {
"version": "3.27.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/icons/-/icons-3.27.0.tgz",
"integrity": "sha512-ItRioyrr2s70chclj5q38HS9omKOa15b3JZXv9JcMIFz+6w6rAcoAH7DA+5xIs27bFjax/SdAZp/eYXSw0+QpA==",
"requires": {
"classnames": "^2.2",
"tslib": "~1.13.0"
}
},
"dom-helpers": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz",
"integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==",
"requires": {
"@babel/runtime": "^7.1.2"
}
},
"react-fast-compare": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz",
@@ -1200,17 +1156,6 @@
"warning": "^4.0.2"
}
},
"react-transition-group": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz",
"integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==",
"requires": {
"dom-helpers": "^3.4.0",
"loose-envify": "^1.4.0",
"prop-types": "^15.6.2",
"react-lifecycles-compat": "^3.0.4"
}
},
"tslib": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
@@ -1219,114 +1164,80 @@
}
},
"@blueprintjs/select": {
"version": "3.11.2",
"resolved": "https://registry.npmjs.org/@blueprintjs/select/-/select-3.11.2.tgz",
"integrity": "sha512-fU0Km6QI/ayWhzYeu9N1gTj0+L0XUO4KB3u2LfJXgj648UGY8F4HX2ETdJ+XPdtsu6TesrIL7ghMQhtLcvafBg==",
"version": "3.18.5",
"resolved": "https://registry.npmjs.org/@blueprintjs/select/-/select-3.18.5.tgz",
"integrity": "sha512-KlAzrKRO58DDxd/9TMJX70Sy92qh1LXVh3H8nwPMm9D54VYE2vO+ANj15cswe28eLVTsEx9PYHo+RrMlEnewAw==",
"requires": {
"@blueprintjs/core": "^3.20.0",
"@blueprintjs/core": "^3.50.3",
"classnames": "^2.2",
"tslib": "~1.9.0"
"tslib": "~1.13.0"
},
"dependencies": {
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
}
}
},
"@blueprintjs/table": {
"version": "3.8.3",
"resolved": "https://registry.npmjs.org/@blueprintjs/table/-/table-3.8.3.tgz",
"integrity": "sha512-ppyXy/8USvTe+HHl6VGJk+GqJalwzutTJNAiZMgpTJh8UglH8/245IpDpIlAYlyNW98RhMtloB+5UuBWHpxmhA==",
"version": "3.9.7",
"resolved": "https://registry.npmjs.org/@blueprintjs/table/-/table-3.9.7.tgz",
"integrity": "sha512-jXk6yYv+oab64zJtuapGOtBfLIpZqA0YSC+9BGFGkfc+xa/YLpyYiLnjxbyrmtlliOFt8dodyuamhKFyvTiisA==",
"requires": {
"@blueprintjs/core": "^3.23.1",
"@blueprintjs/core": "^3.50.3",
"classnames": "^2.2",
"prop-types": "^15.6.0",
"prop-types": "^15.7.2",
"react-lifecycles-compat": "^3.0.4",
"tslib": "~1.9.0"
"tslib": "~1.13.0"
},
"dependencies": {
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
}
}
},
"@blueprintjs/timezone": {
"version": "3.6.4",
"resolved": "https://registry.npmjs.org/@blueprintjs/timezone/-/timezone-3.6.4.tgz",
"integrity": "sha512-plgz27yR9xxxqy926iFUCHW/wjjDabxG5Kg7DzvzMR2QyKT1P0mtIFJTIo+51+I9OCZxwGrEcfRv/M0iMqN4yw==",
"version": "3.9.13",
"resolved": "https://registry.npmjs.org/@blueprintjs/timezone/-/timezone-3.9.13.tgz",
"integrity": "sha512-2Tz/InyNOSDELVKw1HA6RgUOtC0rUGydROnStqv099gv3lBsQvSQBMbMtqTZHQf27aGc1Dovty2OumwEu5ZBxQ==",
"requires": {
"@blueprintjs/core": "^3.27.0",
"@blueprintjs/select": "^3.13.0",
"@blueprintjs/core": "^3.50.3",
"@blueprintjs/select": "^3.18.5",
"classnames": "^2.2",
"moment": "^2.24.0",
"moment-timezone": "^0.5.27",
"tslib": "~1.10.0"
"moment": "^2.29.0",
"moment-timezone": "^0.5.31",
"react-lifecycles-compat": "^3.0.4",
"tslib": "~1.13.0"
},
"dependencies": {
"@blueprintjs/core": {
"version": "3.27.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/core/-/core-3.27.0.tgz",
"integrity": "sha512-ZzwXENczeC9FnzTJ2XiDR+6YNzb68u1fj2HstKarvfrepW/C+0g4Eojo5vi2KWlNw5+RUu/MG7sZc8i7698pQw==",
"requires": {
"@blueprintjs/icons": "^3.17.0",
"@types/dom4": "^2.0.1",
"classnames": "^2.2",
"dom4": "^2.1.5",
"normalize.css": "^8.0.1",
"popper.js": "^1.15.0",
"react-lifecycles-compat": "^3.0.4",
"react-popper": "^1.3.7",
"react-transition-group": "^2.9.0",
"resize-observer-polyfill": "^1.5.1",
"tslib": "~1.10.0"
},
"dependencies": {
"react-transition-group": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.9.0.tgz",
"integrity": "sha512-+HzNTCHpeQyl4MJ/bdE0u6XRMe9+XG/+aL4mCxVN4DnPBQ0/5bfHWPDuOZUzYdMj94daZaZdCCc1Dzt9R/xSSg==",
"requires": {
"dom-helpers": "^3.4.0",
"loose-envify": "^1.4.0",
"prop-types": "^15.6.2",
"react-lifecycles-compat": "^3.0.4"
}
}
}
"moment": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
},
"@blueprintjs/icons": {
"version": "3.17.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/icons/-/icons-3.17.0.tgz",
"integrity": "sha512-DRUIxVe0V7eeKYxKFl9bEmQvdpqmMbSUsJjKl9ACgXUQ1wksd2oaFTNLBQEToui/RAWpybWLCl39AG3rlJQeYQ==",
"requires": {
"classnames": "^2.2",
"tslib": "~1.10.0"
}
},
"@blueprintjs/select": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/@blueprintjs/select/-/select-3.13.0.tgz",
"integrity": "sha512-DwLEpZee95xeO1tyCs8SLgP6yb9mp2l/B34N2MOsRL7eXZb+EiILR8fxnCzwx6/D7JL+WKsPP9UHhCOLaTbYug==",
"requires": {
"@blueprintjs/core": "^3.27.0",
"classnames": "^2.2",
"tslib": "~1.10.0"
}
},
"dom-helpers": {
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.4.0.tgz",
"integrity": "sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==",
"requires": {
"@babel/runtime": "^7.1.2"
}
"tslib": {
"version": "1.13.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz",
"integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q=="
}
}
},
"@casl/ability": {
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/@casl/ability/-/ability-5.4.3.tgz",
"integrity": "sha512-X6U79udKkfS7459Y3DCkw58ZQno7BD9VJa5GnTL1rcKRACqERMVDs7qjVMW+JlLUZcT5DB2/GF5uvu0KsudEcA==",
"requires": {
"@ucast/mongo2js": "^1.3.0"
}
},
"@casl/react": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/@casl/react/-/react-2.3.0.tgz",
"integrity": "sha512-xP5G9ShXviE56IrU4mPpj1K7bl8KmNOjz3e4YgwrirmRdtZ38rF70a5AkFotWX9hgdH2mqZK/VHiYDGAIlYu1Q=="
},
"@cnakazawa/watch": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz",
@@ -1346,6 +1257,29 @@
"resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz",
"integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg=="
},
"@emotion/is-prop-valid": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz",
"integrity": "sha512-u5WtneEAr5IDG2Wv65yhunPSMLIpuKsbuOktRojfrEiEvRyC85LgPMZI63cr7NUqT8ZIGdSVg8ZKGxIug4lXcA==",
"requires": {
"@emotion/memoize": "0.7.4"
}
},
"@emotion/memoize": {
"version": "0.7.4",
"resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.4.tgz",
"integrity": "sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw=="
},
"@emotion/stylis": {
"version": "0.8.5",
"resolved": "https://registry.npmjs.org/@emotion/stylis/-/stylis-0.8.5.tgz",
"integrity": "sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ=="
},
"@emotion/unitless": {
"version": "0.7.5",
"resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
"integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
},
"@formatjs/intl-unified-numberformat": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@formatjs/intl-unified-numberformat/-/intl-unified-numberformat-3.2.0.tgz",
@@ -1393,15 +1327,6 @@
"@hapi/hoek": "^8.3.0"
}
},
"@hypnosphi/create-react-context": {
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@hypnosphi/create-react-context/-/create-react-context-0.3.1.tgz",
"integrity": "sha512-V1klUed202XahrWJLLOT3EXNeCpFHCcJntdFGI15ntCwau+jfT386w7OFTMaCqOgXUH1fa0w/I1oZs+i/Rfr0A==",
"requires": {
"gud": "^1.0.0",
"warning": "^4.0.3"
}
},
"@jest/console": {
"version": "24.9.0",
"resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz",
@@ -1668,6 +1593,88 @@
}
}
},
"@sentry/browser": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-6.13.2.tgz",
"integrity": "sha512-bkFXK4vAp2UX/4rQY0pj2Iky55Gnwr79CtveoeeMshoLy5iDgZ8gvnLNAz7om4B9OQk1u7NzLEa4IXAmHTUyag==",
"requires": {
"@sentry/core": "6.13.2",
"@sentry/types": "6.13.2",
"@sentry/utils": "6.13.2",
"tslib": "^1.9.3"
}
},
"@sentry/core": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-6.13.2.tgz",
"integrity": "sha512-snXNNFLwlS7yYxKTX4DBXebvJK+6ikBWN6noQ1CHowvM3ReFBlrdrs0Z0SsSFEzXm2S4q7f6HHbm66GSQZ/8FQ==",
"requires": {
"@sentry/hub": "6.13.2",
"@sentry/minimal": "6.13.2",
"@sentry/types": "6.13.2",
"@sentry/utils": "6.13.2",
"tslib": "^1.9.3"
}
},
"@sentry/hub": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-6.13.2.tgz",
"integrity": "sha512-sppSuJdNMiMC/vFm/dQowCBh11uTrmvks00fc190YWgxHshodJwXMdpc+pN61VSOmy2QA4MbQ5aMAgHzPzel3A==",
"requires": {
"@sentry/types": "6.13.2",
"@sentry/utils": "6.13.2",
"tslib": "^1.9.3"
}
},
"@sentry/minimal": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-6.13.2.tgz",
"integrity": "sha512-6iJfEvHzzpGBHDfLxSHcGObh73XU1OSQKWjuhDOe7UQDyI4BQmTfcXAC+Fr8sm8C/tIsmpVi/XJhs8cubFdSMw==",
"requires": {
"@sentry/hub": "6.13.2",
"@sentry/types": "6.13.2",
"tslib": "^1.9.3"
}
},
"@sentry/react": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/react/-/react-6.13.2.tgz",
"integrity": "sha512-aLkWyn697LTcmK1PPnUg5UJcyBUPoI68motqgBY53SIYDAwOeYNUQt2aanDuOTY5aE2PdnJwU48klA8vuYkoRQ==",
"requires": {
"@sentry/browser": "6.13.2",
"@sentry/minimal": "6.13.2",
"@sentry/types": "6.13.2",
"@sentry/utils": "6.13.2",
"hoist-non-react-statics": "^3.3.2",
"tslib": "^1.9.3"
}
},
"@sentry/tracing": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-6.13.2.tgz",
"integrity": "sha512-bHJz+C/nd6biWTNcYAu91JeRilsvVgaye4POkdzWSmD0XoLWHVMrpCQobGpXe7onkp2noU3YQjhqgtBqPHtnpw==",
"requires": {
"@sentry/hub": "6.13.2",
"@sentry/minimal": "6.13.2",
"@sentry/types": "6.13.2",
"@sentry/utils": "6.13.2",
"tslib": "^1.9.3"
}
},
"@sentry/types": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-6.13.2.tgz",
"integrity": "sha512-6WjGj/VjjN8LZDtqJH5ikeB1o39rO1gYS6anBxiS3d0sXNBb3Ux0pNNDFoBxQpOhmdDHXYS57MEptX9EV82gmg=="
},
"@sentry/utils": {
"version": "6.13.2",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-6.13.2.tgz",
"integrity": "sha512-foF4PbxqPMWNbuqdXkdoOmKm3quu3PP7Q7j/0pXkri4DtCuvF/lKY92mbY0V9rHS/phCoj+3/Se5JvM2ymh2/w==",
"requires": {
"@sentry/types": "6.13.2",
"tslib": "^1.9.3"
}
},
"@sheerun/mutationobserver-shim": {
"version": "0.3.2",
"resolved": "https://registry.npmjs.org/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.2.tgz",
@@ -2294,6 +2301,37 @@
"tsutils": "^3.17.1"
}
},
"@ucast/core": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/@ucast/core/-/core-1.10.1.tgz",
"integrity": "sha512-sXKbvQiagjFh2JCpaHUa64P4UdJbOxYeC5xiZFn8y6iYdb0WkismduE+RmiJrIjw/eLDYmIEXiQeIYYowmkcAw=="
},
"@ucast/js": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/@ucast/js/-/js-3.0.2.tgz",
"integrity": "sha512-zxNkdIPVvqJjHI7D/iK8Aai1+59yqU+N7bpHFodVmiTN7ukeNiGGpNmmSjQgsUw7eNcEBnPrZHNzp5UBxwmaPw==",
"requires": {
"@ucast/core": "^1.0.0"
}
},
"@ucast/mongo": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/@ucast/mongo/-/mongo-2.4.2.tgz",
"integrity": "sha512-/zH1TdBJlYGKKD+Wh0oyD+aBvDSWrwHcD8b4tUL9UgHLhzHtkEnMVFuxbw3SRIRsAa01wmy06+LWt+WoZdj1Bw==",
"requires": {
"@ucast/core": "^1.4.1"
}
},
"@ucast/mongo2js": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/@ucast/mongo2js/-/mongo2js-1.3.3.tgz",
"integrity": "sha512-sBPtMUYg+hRnYeVYKL+ATm8FaRPdlU9PijMhGYKgsPGjV9J4Ks41ytIjGayvKUnBOEhiCaKUUnY4qPeifdqATw==",
"requires": {
"@ucast/core": "^1.6.1",
"@ucast/js": "^3.0.0",
"@ucast/mongo": "^2.4.0"
}
},
"@webassemblyjs/ast": {
"version": "1.8.5",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.8.5.tgz",
@@ -2876,17 +2914,17 @@
"integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug=="
},
"axios": {
"version": "0.21.2",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.2.tgz",
"integrity": "sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==",
"version": "0.21.4",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
"integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
"requires": {
"follow-redirects": "^1.14.0"
},
"dependencies": {
"follow-redirects": {
"version": "1.14.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.4.tgz",
"integrity": "sha512-zwGkiSXC1MUJG/qmeIFH2HBJx9u0V46QGUe3YR1fXG8bXQxq7fLj0RjLZQ5nubr9qNJUZrH+xUcwXEoXNpfS+g=="
"version": "1.14.6",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz",
"integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A=="
}
}
},
@@ -3034,6 +3072,49 @@
"resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.6.tgz",
"integrity": "sha512-1aGDUfL1qOOIoqk9QKGIo2lANk+C7ko/fqH0uIyC71x3PEGz0uVP8ISgfEsFuG+FKmjHTvFK/nNM8dowpmUxLA=="
},
"babel-plugin-styled-components": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-2.0.2.tgz",
"integrity": "sha512-7eG5NE8rChnNTDxa6LQfynwgHTVOYYaHJbUYSlOhk8QBXIQiMBKq4gyfHBBKPrxUcVBXVJL61ihduCpCQbuNbw==",
"requires": {
"@babel/helper-annotate-as-pure": "^7.16.0",
"@babel/helper-module-imports": "^7.16.0",
"babel-plugin-syntax-jsx": "^6.18.0",
"lodash": "^4.17.11"
},
"dependencies": {
"@babel/helper-annotate-as-pure": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz",
"integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==",
"requires": {
"@babel/types": "^7.16.7"
}
},
"@babel/helper-module-imports": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz",
"integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==",
"requires": {
"@babel/types": "^7.16.7"
}
},
"@babel/types": {
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.7.tgz",
"integrity": "sha512-E8HuV7FO9qLpx6OtoGfUQ2cjIYnbFwvZWYBS+87EwtdMvmUPJSwykpovFB+8insbpF0uJcpr8KMUi64XZntZcg==",
"requires": {
"@babel/helper-validator-identifier": "^7.16.7",
"to-fast-properties": "^2.0.0"
}
}
}
},
"babel-plugin-syntax-jsx": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz",
"integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY="
},
"babel-plugin-syntax-object-rest-spread": {
"version": "6.13.0",
"resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz",
@@ -3637,6 +3718,11 @@
}
}
},
"camelize": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz",
"integrity": "sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs="
},
"caniuse-api": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
@@ -4494,6 +4580,11 @@
"postcss": "^7.0.5"
}
},
"css-color-keywords": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz",
"integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU="
},
"css-color-names": {
"version": "0.0.4",
"resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz",
@@ -4593,6 +4684,16 @@
"resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz",
"integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w=="
},
"css-to-react-native": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-3.0.0.tgz",
"integrity": "sha512-Ro1yETZA813eoyUp2GDBhG2j+YggidUmzO1/v9eYBKR2EHVEniE2MI/NqpTQ954BMpTPZFsGNPm46qFB9dpaPQ==",
"requires": {
"camelize": "^1.0.0",
"css-color-keywords": "^1.0.0",
"postcss-value-parser": "^4.0.2"
}
},
"css-tree": {
"version": "1.0.0-alpha.37",
"resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz",
@@ -4957,6 +5058,11 @@
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
},
"dependency-graph": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz",
"integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg=="
},
"des.js": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
@@ -6186,9 +6292,9 @@
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU="
},
"fast-deep-equal": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
"integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA=="
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
},
"fast-glob": {
"version": "3.2.7",
@@ -6241,9 +6347,9 @@
}
},
"picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
"integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw=="
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="
},
"to-regex-range": {
"version": "5.0.1",
@@ -6873,9 +6979,9 @@
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw=="
},
"ignore": {
"version": "5.1.8",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
"integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw=="
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
"integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ=="
},
"slash": {
"version": "3.0.0",
@@ -12268,9 +12374,9 @@
"integrity": "sha512-djJUgGNze7YdWzJA1kYO1eKXAMpP+Z4sMulmEuTVi6vEXzfuQCJs6yD8hhgWj23vvJPZL5b8NyabxteyF8Hq/g=="
},
"react-day-picker": {
"version": "7.3.2",
"resolved": "https://registry.npmjs.org/react-day-picker/-/react-day-picker-7.3.2.tgz",
"integrity": "sha512-mij2j2Un/v2V2ow+hf/hFBMdl6Eis/C/YhBtlI6Xpbvh3Q6WMix78zEkCdw6i9GldafOrpnupWKofv/h5oSI4g==",
"version": "7.4.9",
"resolved": "http://176.58.99.106:4873/react-day-picker/-/react-day-picker-7.4.9.tgz",
"integrity": "sha512-CcXf0p7p6gTYnG0+n/4wNGljZuQDXl4HhgcxsXB0nX+8D4LnRho9EclPA/aLz4WlvvVpfY+AEgj2ylgPj4nm/g==",
"requires": {
"prop-types": "^15.6.2"
}
@@ -12315,11 +12421,11 @@
}
},
"@babel/highlight": {
"version": "7.14.5",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
"integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
"version": "7.16.7",
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.7.tgz",
"integrity": "sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==",
"requires": {
"@babel/helper-validator-identifier": "^7.14.5",
"@babel/helper-validator-identifier": "^7.16.7",
"chalk": "^2.0.0",
"js-tokens": "^4.0.0"
}
@@ -12336,9 +12442,9 @@
}
},
"caniuse-lite": {
"version": "1.0.30001261",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001261.tgz",
"integrity": "sha512-vM8D9Uvp7bHIN0fZ2KQ4wnmYFpJo/Etb4Vwsuc+ka0tfGDHvOPrFm6S/7CCNLSOkAUjenT2HnUPESdOIL91FaA=="
"version": "1.0.30001295",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001295.tgz",
"integrity": "sha512-lSP16vcyC0FEy0R4ECc9duSPoKoZy+YkpGkue9G4D81OfPnliopaZrU10+qtPdT8PbGXad/PNx43TIQrOmJZSQ=="
},
"cross-spawn": {
"version": "7.0.3",
@@ -12351,9 +12457,9 @@
}
},
"electron-to-chromium": {
"version": "1.3.853",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.853.tgz",
"integrity": "sha512-W4U8n+U8I5/SUaFcqZgbKRmYZwcyEIQVBDf+j5QQK6xChjXnQD+wj248eGR9X4u+dDmDR//8vIfbu4PrdBBIoQ=="
"version": "1.4.31",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.31.tgz",
"integrity": "sha512-t3XVQtk+Frkv6aTD4RRk0OqosU+VLe1dQFW83MDer78ZD6a52frgXuYOIsLYTQiH2Lm+JB2OKYcn7zrX+YGAiQ=="
},
"emojis-list": {
"version": "3.0.0",
@@ -12406,9 +12512,9 @@
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
},
"node-releases": {
"version": "1.1.76",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.76.tgz",
"integrity": "sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA=="
"version": "1.1.77",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz",
"integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ=="
},
"p-locate": {
"version": "4.1.0",
@@ -12527,9 +12633,9 @@
}
},
"react-error-overlay": {
"version": "6.0.9",
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz",
"integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew=="
"version": "6.0.10",
"resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz",
"integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA=="
},
"react-fast-compare": {
"version": "2.0.4",
@@ -13963,6 +14069,11 @@
}
}
},
"shallowequal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz",
"integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ=="
},
"shebang-command": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
@@ -14680,6 +14791,23 @@
}
}
},
"styled-components": {
"version": "5.3.3",
"resolved": "https://registry.npmjs.org/styled-components/-/styled-components-5.3.3.tgz",
"integrity": "sha512-++4iHwBM7ZN+x6DtPPWkCI4vdtwumQ+inA/DdAsqYd4SVgUKJie5vXyzotA00ttcFdQkCng7zc6grwlfIfw+lw==",
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/traverse": "^7.4.5",
"@emotion/is-prop-valid": "^0.8.8",
"@emotion/stylis": "^0.8.4",
"@emotion/unitless": "^0.7.4",
"babel-plugin-styled-components": ">= 1.12.0",
"css-to-react-native": "^3.0.0",
"hoist-non-react-statics": "^3.0.0",
"shallowequal": "^1.1.0",
"supports-color": "^5.5.0"
}
},
"stylehacks": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz",
@@ -14707,6 +14835,56 @@
"resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz",
"integrity": "sha512-pP7yXN6dwMzAR29Q0mBrabPCe0/mNO1MSr93bhay+hcZondvMMTpeGyd8nbhYJdyperNT2DRxONQuUGcJr5iPw=="
},
"stylis-rtlcss": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/stylis-rtlcss/-/stylis-rtlcss-2.1.1.tgz",
"integrity": "sha512-xkX24OO/U0hLGW9m2SUpz3yPDQBX+ltV0mkQLfj3SwcCzm3NZe5spONHpZU2uTQ01MuDQzfOx/5GQWZ6APjmHw==",
"requires": {
"rtlcss": "^2.6.0"
},
"dependencies": {
"@choojs/findup": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/@choojs/findup/-/findup-0.2.1.tgz",
"integrity": "sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw==",
"requires": {
"commander": "^2.15.1"
}
},
"postcss": {
"version": "6.0.23",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz",
"integrity": "sha512-soOk1h6J3VMTZtVeVpv15/Hpdl2cBLX3CAw4TAbkpTJiNPk9YP/zWcD1ND+xEtvyuuvKzbxliTOIyvkSeSJ6ag==",
"requires": {
"chalk": "^2.4.1",
"source-map": "^0.6.1",
"supports-color": "^5.4.0"
}
},
"rtlcss": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/rtlcss/-/rtlcss-2.6.2.tgz",
"integrity": "sha512-06LFAr+GAPo+BvaynsXRfoYTJvSaWRyOhURCQ7aeI1MKph9meM222F+Zkt3bDamyHHJuGi3VPtiRkpyswmQbGA==",
"requires": {
"@choojs/findup": "^0.2.1",
"chalk": "^2.4.2",
"mkdirp": "^0.5.1",
"postcss": "^6.0.23",
"strip-json-comments": "^2.0.0"
}
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
}
}
},
"supports-color": {
"version": "5.5.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",

View File

@@ -1,16 +1,20 @@
{
"name": "bigcapital-client",
"version": "1.2.0",
"version": "1.5.3",
"private": true,
"dependencies": {
"@babel/core": "7.8.4",
"@blueprintjs/core": "^3.38.1",
"@blueprintjs/datetime": "^3.15.2",
"@blueprintjs/core": "^3.50.2",
"@blueprintjs/datetime": "^3.23.12",
"@blueprintjs/popover2": "^0.11.1",
"@blueprintjs/select": "^3.11.2",
"@blueprintjs/table": "^3.8.3",
"@blueprintjs/timezone": "^3.6.2",
"@casl/ability": "^5.4.3",
"@casl/react": "^2.3.0",
"@reduxjs/toolkit": "^1.2.5",
"@sentry/react": "^6.13.2",
"@sentry/tracing": "^6.13.2",
"@svgr/webpack": "4.3.3",
"@tanem/react-nprogress": "^3.0.24",
"@testing-library/jest-dom": "^4.2.4",
@@ -32,6 +36,7 @@
"cross-env": "^7.0.2",
"css-loader": "3.4.2",
"deep-map-keys": "^2.0.1",
"dependency-graph": "^0.11.0",
"dotenv": "8.2.0",
"dotenv-expand": "5.1.0",
"eslint": "^6.6.0",
@@ -42,6 +47,7 @@
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.18.0",
"eslint-plugin-react-hooks": "^1.6.1",
"fast-deep-equal": "^3.1.3",
"file-loader": "4.3.0",
"flow-bin": "^0.123.0",
"formik": "^2.2.5",
@@ -101,6 +107,8 @@
"sass-loader": "8.0.2",
"semver": "6.3.0",
"style-loader": "0.23.1",
"styled-components": "^5.3.1",
"stylis-rtlcss": "^2.1.1",
"terser-webpack-plugin": "2.3.4",
"ts-pnp": "1.1.5",
"url-loader": "2.3.0",

View File

@@ -2,7 +2,11 @@
<html dir="ltr" lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicons/favicon-32.ico" sizes="32x32">
<link
rel="icon"
href="%PUBLIC_URL%/favicons/favicon-32.ico"
sizes="32x32"
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
@@ -15,6 +19,22 @@
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!-- Hotjar Tracking Code for https://app.bigcapital.ly/ -->
<script>
(function (h, o, t, j, a, r) {
h.hj =
h.hj ||
function () {
(h.hj.q = h.hj.q || []).push(arguments);
};
h._hjSettings = { hjid: 2774528, hjsv: 6 };
a = o.getElementsByTagName('head')[0];
r = o.createElement('script');
r.async = 1;
r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
a.appendChild(r);
})(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
</script>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
@@ -41,7 +61,11 @@
To create a production bundle, use `npm run build` or `yarn build`.
-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css" type="text/css" >
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/flexboxgrid/6.3.1/flexboxgrid.min.css"
type="text/css"
/>
<!-- <link href="https://cdn.syncfusion.com/ej2/material.css" rel="stylesheet"> -->
<!-- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" /> -->
</body>

6
src/common/TableStyle.js Normal file
View File

@@ -0,0 +1,6 @@
export const TableStyle = {
Constrant: 'constrant',
Regular: 'regular'
}

178
src/common/abilityOption.js Normal file
View File

@@ -0,0 +1,178 @@
export const AbilitySubject = {
Item: 'Item',
InventoryAdjustment: 'InventoryAdjustment',
Estimate: 'SaleEstimate',
Invoice: 'SaleInvoice',
Receipt: 'SaleReceipt',
PaymentReceive: 'PaymentReceive',
Bill: 'Bill',
PaymentMade: 'PaymentMade',
Customer: 'Customer',
Vendor: 'Vendor',
Account: 'Account',
ManualJournal: 'ManualJournal',
Expense: 'Expense',
Cashflow: 'Cashflow',
Report: 'Report',
Preferences: 'Preferences',
ExchangeRate: 'ExchangeRate',
SubscriptionBilling: 'SubscriptionBilling',
CreditNote: 'CreditNote',
VendorCredit: 'VendorCredit',
};
export const ItemAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const InventoryAdjustmentAction = {
Create: 'Create',
Edit: 'Edit',
View: 'View',
Delete: 'Delete',
};
export const SaleEstimateAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const SaleInvoiceAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
Writeoff: 'bad-debt',
NotifyBySms: 'NotifyBySms',
};
export const SaleReceiptAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const PaymentReceiveAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const CreditNoteAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
Refund: 'Refund'
};
export const VendorCreditAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
Refund: 'Refund'
};
export const BillAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
NotifyBySms: 'NotifyBySms',
};
export const PaymentMadeAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const CustomerAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const VendorAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const AccountAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
TransactionsLocking: 'TransactionsLocking',
};
export const ManualJournalAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
TransactionLocking: 'TransactionLocking',
};
export const ExpenseAction = {
View: 'View',
Create: 'Create',
Edit: 'Edit',
Delete: 'Delete',
};
export const CashflowAction = {
View: 'View',
Create: 'Create',
Delete: 'Delete',
};
export const ReportsAction = {
ALL: 'all',
READ_BALANCE_SHEET: 'read-balance-sheet',
READ_TRIAL_BALANCE_SHEET: 'read-trial-balance-sheet',
READ_PROFIT_LOSS: 'read-profit-loss',
READ_JOURNAL: 'read-journal',
READ_GENERAL_LEDGET: 'read-general-ledger',
READ_CASHFLOW: 'read-cashflow',
READ_AR_AGING_SUMMARY: 'read-ar-aging-summary',
READ_AP_AGING_SUMMARY: 'read-ap-aging-summary',
READ_PURCHASES_BY_ITEMS: 'read-purchases-by-items',
READ_SALES_BY_ITEMS: 'read-sales-by-items',
READ_CUSTOMERS_TRANSACTIONS: 'read-customers-transactions',
READ_VENDORS_TRANSACTIONS: 'read-vendors-transactions',
READ_CUSTOMERS_SUMMARY_BALANCE: 'read-customers-summary-balance',
READ_VENDORS_SUMMARY_BALANCE: 'read-vendors-summary-balance',
READ_INVENTORY_VALUATION_SUMMARY: 'read-inventory-valuation-summary',
READ_INVENTORY_ITEM_DETAILS: 'read-inventory-item-details',
READ_CASHFLOW_ACCOUNT_TRANSACTION: 'read-cashflow-account-transactions',
};
export const PreferencesAbility = {
Mutate: 'Mutate',
};
export const ExchangeRateAbility = {
View: 'view',
Create: 'create',
Delete: 'delete',
};
export const SubscriptionBillingAbility = {
View: 'view',
Payment: 'payment',
};

View File

@@ -0,0 +1,40 @@
import intl from 'react-intl-universal';
export const addMoneyIn = [
{
name: intl.get('cash_flow.owner_contribution'),
value: 'owner_contribution',
},
{
name: intl.get('cash_flow.other_income'),
value: 'other_income',
},
{
name: intl.get('cash_flow.transfer_form_account'),
value: 'transfer_from_account',
},
];
export const addMoneyOut = [
{
name: intl.get('cash_flow.owner_drawings'),
value: 'OwnerDrawing',
},
{
name: intl.get('cash_flow.expenses'),
value: 'other_expense',
},
{
name: intl.get('cash_flow.transfer_to_account'),
value: 'transfer_to_account',
},
];
export const TRANSACRIONS_TYPE = [
'OwnerContribution',
'OtherIncome',
'TransferFromAccount',
'OnwersDrawing',
'OtherExpense',
'TransferToAccount',
];

View File

@@ -39,6 +39,8 @@ const CLASSES = {
PAGE_FORM_ITEM: 'page-form--item',
PAGE_FORM_MAKE_JOURNAL: 'page-form--make-journal-entries',
PAGE_FORM_EXPENSE: 'page-form--expense',
PAGE_FORM_CREDIT_NOTE:'page-form--credit-note',
PAGE_FORM_VENDOR_CREDIT_NOTE:'page-form--vendor-credit-note',
FORM_GROUP_LIST_SELECT: 'form-group--select-list',
@@ -66,6 +68,8 @@ const CLASSES = {
PREFERENCES_PAGE_INSIDE_CONTENT_USERS: 'preferences-page__inside-content--users',
PREFERENCES_PAGE_INSIDE_CONTENT_CURRENCIES: 'preferences-page__inside-content--currencies',
PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT: 'preferences-page__inside-content--accountant',
PREFERENCES_PAGE_INSIDE_CONTENT_SMS_INTEGRATION: 'preferences-page__inside-content--sms-integration',
PREFERENCES_PAGE_INSIDE_CONTENT_ROLES_FORM: 'preferences-page__inside-content--roles-form',
FINANCIAL_REPORT_INSIDER: 'dashboard__insider--financial-report',

View File

@@ -9,4 +9,13 @@ export const DRAWERS = {
EXPENSE_DRAWER: 'expense-drawer',
BILL_DRAWER: 'bill-drawer',
INVENTORY_ADJUSTMENT_DRAWER: 'inventory-adjustment-drawer',
CASHFLOW_TRNASACTION_DRAWER: 'cashflow-transaction-drawer',
QUICK_WRITE_VENDOR: 'quick-write-vendor',
QUICK_CREATE_CUSTOMER: 'quick-create-customer',
QUICK_CREATE_ITEM: 'quick-create-item',
CREDIT_NOTE_DETAIL_DRAWER: 'credit-note-detail-drawer',
VENDOR_CREDIT_DETAIL_DRAWER: 'vendor-credit-detail-drawer',
REFUND_CREDIT_NOTE_DETAIL_DRAWER:'refund-credit-detail-drawer',
REFUND_VENDOR_CREDIT_DETAIL_DRAWER:'refund-vendor-detail-drawer'
};

View File

@@ -1,5 +1,21 @@
import React from 'react';
import { FormattedMessage as T } from 'components';
import {
SaleInvoiceAction,
SaleEstimateAction,
AbilitySubject,
SaleReceiptAction,
CustomerAction,
PaymentReceiveAction,
BillAction,
VendorAction,
PaymentMadeAction,
AccountAction,
ManualJournalAction,
ExpenseAction,
ItemAction,
ReportsAction,
} from '../common/abilityOption';
export const accountsReceivable = [
{
@@ -9,21 +25,29 @@ export const accountsReceivable = [
title: <T id={'sales_invoices'} />,
description: <T id={'tracking_sales_invoices_with_your_customers'} />,
link: '/invoices',
subject: AbilitySubject.Invoice,
ability: SaleInvoiceAction.View,
},
{
title: <T id={'sales_estimates'} />,
description: <T id={'manage_your_sales_estimates_to_create_quotes'} />,
link: '/estimates',
subject: AbilitySubject.Estimate,
ability: SaleEstimateAction.View,
},
{
title: <T id={'sales_receipts'} />,
description: <T id={'manage_sales_receipts_for_sales_that_get_paid'} />,
link: '/receipts',
subject: AbilitySubject.Receipt,
ability: SaleReceiptAction.View,
},
{
title: <T id={'customers'} />,
description: <T id={'manage_the_customers_relations_with_customer'} />,
link: '/customers',
subject: AbilitySubject.Customer,
ability: CustomerAction.View,
},
{
title: <T id={'customers_payments'} />,
@@ -31,6 +55,8 @@ export const accountsReceivable = [
<T id={'manage_payment_transactions_from_your_customers'} />
),
link: '/payment-receives',
subject: AbilitySubject.PaymentReceive,
ability: PaymentReceiveAction.View,
},
],
},
@@ -46,6 +72,8 @@ export const accountsPayable = [
<T id={'manage_the_purchase_invoices_with_your_vendors'} />
),
link: '/bills',
subject: AbilitySubject.Bill,
ability: BillAction.View,
},
{
title: <T id={'vendors'} />,
@@ -53,11 +81,15 @@ export const accountsPayable = [
<T id={'manage_the_vendors_relations_with_vendor_relations'} />
),
link: '/vendors',
subject: AbilitySubject.Vendor,
ability: VendorAction.View,
},
{
title: <T id={'vendors_payments'} />,
description: <T id={'manage_payments_transactions_to_your_vendors'} />,
link: '/payment-mades',
subject: AbilitySubject.PaymentMade,
ability: PaymentMadeAction.View,
},
],
},
@@ -77,21 +109,35 @@ export const financialAccounting = [
/>
),
link: '/accounts',
subject: AbilitySubject.Account,
ability: AccountAction.View,
},
{
title: <T id={'manual_journal'}/>,
description:<T id={'manage_manual_journal_transactions_on_accounts'}/>,
title: <T id={'manual_journal'} />,
description: (
<T id={'manage_manual_journal_transactions_on_accounts'} />
),
link: '/manual-journals',
subject: AbilitySubject.ManualJournal,
ability: ManualJournalAction.View,
},
{
title: <T id={'expenses'}/>,
description:<T id={'track_your_indirect_expenses_under_specific_categories'}/>,
title: <T id={'expenses'} />,
description: (
<T id={'track_your_indirect_expenses_under_specific_categories'} />
),
link: '/expenses',
subject: AbilitySubject.Expense,
ability: ExpenseAction.View,
},
{
title: <T id={'financial_statements'}/>,
description:<T id={'show_financial_reports_about_your_organization'}/>,
title: <T id={'financial_statements'} />,
description: (
<T id={'show_financial_reports_about_your_organization'} />
),
link: '/financial-reports',
subject: AbilitySubject.Report,
ability: ReportsAction.ALL,
},
],
},
@@ -102,19 +148,27 @@ export const productsServices = [
sectionTitle: <T id={'products_services_inventory'} />,
shortcuts: [
{
title: <T id={'products_services'}/>,
description:<T id={'manage_your_products_inventory_or_non_inventory'}/>,
title: <T id={'products_services'} />,
description: (
<T id={'manage_your_products_inventory_or_non_inventory'} />
),
link: '/items',
subject: AbilitySubject.Item,
ability: ItemAction.View,
},
{
title: <T id={'products_services_categories'}/>,
description:<T id={'group_your_products_and_service'}/>,
title: <T id={'products_services_categories'} />,
description: <T id={'group_your_products_and_service'} />,
link: 'items/categories',
},
{
title: <T id={'inventory_adjustments'}/>,
description: <T id={'manage_your_inventory_adjustment_of_inventory_items'}/>,
title: <T id={'inventory_adjustments'} />,
description: (
<T id={'manage_your_inventory_adjustment_of_inventory_items'} />
),
link: '/inventory-adjustments',
subject: AbilitySubject.InventoryAdjustment,
ability: SaleInvoiceAction.View,
},
],
},

4
src/common/index.js Normal file
View File

@@ -0,0 +1,4 @@
export * from './TableStyle';

View File

@@ -0,0 +1,51 @@
import intl from 'react-intl-universal';
import {
AbilitySubject,
SaleEstimateAction,
SaleReceiptAction,
SaleInvoiceAction,
BillAction,
} from '../common/abilityOption';
import { useAbilitiesFilter } from '../hooks';
export const getItemPaymentTransactions = () => [
{
name: 'invoices',
label: intl.get('invoices'),
permission: {
subject: AbilitySubject.Invoice,
ability: SaleInvoiceAction.View,
},
},
{
name: 'estimates',
label: intl.get('estimates'),
permission: {
subject: AbilitySubject.Estimate,
ability: SaleEstimateAction.View,
},
},
{
name: 'receipts',
label: intl.get('receipts'),
permission: {
subject: AbilitySubject.Receipt,
ability: SaleReceiptAction.View,
},
},
{
name: 'bills',
label: intl.get('bills'),
permission: {
subject: AbilitySubject.Bill,
ability: BillAction.View,
},
},
];
export const useGetItemPaymentTransactionsMenu = () => {
const itemTransactionMenu = getItemPaymentTransactions();
const abilitiesFilter = useAbilitiesFilter();
return abilitiesFilter(itemTransactionMenu);
};

View File

@@ -1,102 +1,228 @@
import React from 'react';
import intl from 'react-intl-universal';
import {
AbilitySubject,
AccountAction,
BillAction,
CashflowAction,
CustomerAction,
ExpenseAction,
ItemAction,
ManualJournalAction,
ReportsAction,
SaleEstimateAction,
SaleInvoiceAction,
SaleReceiptAction,
VendorAction,
} from './abilityOption';
export default [
{
shortcut_key: 'Shift + I',
description: intl.get('jump_to_the_invoices'),
permission: {
ability: SaleInvoiceAction.View,
subject: AbilitySubject.Invoice,
},
},
{
shortcut_key: 'Shift + E',
description: intl.get('jump_to_the_estimates'),
permission: {
ability: SaleEstimateAction.View,
subject: AbilitySubject.Estimate,
},
},
{
shortcut_key: 'Shift + R',
description: intl.get('jump_to_the_receipts'),
permission: {
ability: SaleReceiptAction.View,
subject: AbilitySubject.Receipt,
},
},
{
shortcut_key: 'Shift + X',
description: intl.get('jump_to_the_expenses'),
permission: {
ability: ExpenseAction.View,
subject: AbilitySubject.Expense,
},
},
{
shortcut_key: 'Shift + C',
description: intl.get('jump_to_the_customers'),
permission: {
ability: CustomerAction.View,
subject: AbilitySubject.Customer,
},
},
{
shortcut_key: 'Shift + V',
description: intl.get('jump_to_the_vendors'),
permission: {
ability: VendorAction.View,
subject: AbilitySubject.Vendor,
},
},
{
shortcut_key: 'Shift + A',
description: intl.get('jump_to_the_chart_of_accounts'),
permission: {
ability: AccountAction.View,
subject: AbilitySubject.Account,
},
},
{
shortcut_key: 'Shift + B',
description: intl.get('jump_to_the_bills'),
permission: {
ability: BillAction.View,
subject: AbilitySubject.Bill,
},
},
{
shortcut_key: 'Shift + M',
description: intl.get('jump_to_the_manual_journals'),
permission: {
ability: ManualJournalAction.View,
subject: AbilitySubject.ManualJournal,
},
},
{
shortcut_key: 'Shift + W',
description: intl.get('jump_to_the_items'),
permission: {
ability: ItemAction.View,
subject: AbilitySubject.Item,
},
},
{
shortcut_key: 'Shift + D',
description: intl.get('jump_to_the_add_money_in'),
permission: {
ability: CashflowAction.Create,
subject: AbilitySubject.Cashflow,
},
},
{
shortcut_key: 'Shift + Q',
description: intl.get('jump_to_the_add_money_out'),
permission: {
ability: CashflowAction.Create,
subject: AbilitySubject.Cashflow,
},
},
{
shortcut_key: 'Shift + 1',
description: intl.get('jump_to_the_balance_sheet'),
permission: {
ability: ReportsAction.READ_BALANCE_SHEET,
subject: AbilitySubject.Report,
},
},
{
shortcut_key: 'Shift + 2',
description: intl.get('jump_to_the_profit_loss_sheet'),
permission: {
ability: ReportsAction.READ_PROFIT_LOSS,
subject: AbilitySubject.Report,
},
},
{
shortcut_key: 'Shift + 3',
description: intl.get('jump_to_the_journal_sheet'),
permission: {
ability: ReportsAction.READ_JOURNAL,
subject: AbilitySubject.Report,
},
},
{
shortcut_key: 'Shift + 4',
description: intl.get('jump_to_the_general_ledger_sheet'),
permission: {
ability: ReportsAction.READ_GENERAL_LEDGET,
subject: AbilitySubject.Report,
},
},
{
shortcut_key: 'Shift + 5',
description: intl.get('jump_to_the_trial_balance_sheet'),
permission: {
ability: ReportsAction.READ_TRIAL_BALANCE_SHEET,
subject: AbilitySubject.Report,
},
},
{
shortcut_key: 'Ctrl + Shift + I ',
description: intl.get('create_a_new_invoice'),
permission: {
ability: SaleInvoiceAction.Create,
subject: AbilitySubject.Invoice,
},
},
{
shortcut_key: 'Ctrl + Shift + E ',
description: intl.get('create_a_new_estimate'),
permission: {
ability: SaleEstimateAction.Create,
subject: AbilitySubject.Estimate,
},
},
{
shortcut_key: 'Ctrl + Shift + R ',
description: intl.get('create_a_new_receipt'),
permission: {
ability: SaleReceiptAction.Create,
subject: AbilitySubject.Receipt,
},
},
{
shortcut_key: 'Ctrl + Shift + X ',
description: intl.get('create_a_new_expense'),
permission: {
ability: ExpenseAction.Create,
subject: AbilitySubject.Expense,
},
},
{
shortcut_key: 'Ctrl + Shift + C ',
description: intl.get('create_a_new_customer'),
permission: {
ability: CustomerAction.Create,
subject: AbilitySubject.Customer,
},
},
{
shortcut_key: 'Ctrl + Shift + V ',
description: intl.get('create_a_new_vendor'),
permission: {
ability: VendorAction.Create,
subject: AbilitySubject.Vendor,
},
},
{
shortcut_key: 'Ctrl + Shift + B ',
description: intl.get('create_a_new_bill'),
permission: {
ability: BillAction.Create,
subject: AbilitySubject.Bill,
},
},
{
shortcut_key: 'Ctrl + Shift + M ',
description: intl.get('create_a_new_journal'),
permission: {
ability: ManualJournalAction.Create,
subject: AbilitySubject.ManualJournal,
},
},
{
shortcut_key: 'Ctrl + Shift + W ',
description: intl.get('create_a_new_item'),
permission: {
ability: ItemAction.Create,
subject: AbilitySubject.Item,
},
},
{
shortcut_key: 'Ctrl + / ',

View File

@@ -0,0 +1,12 @@
import intl from 'react-intl-universal';
export const moreVertOptions = [
{
name: intl.get('bad_debt.dialog.bad_debt'),
value: 'bad debt',
},
{
name: intl.get('bad_debt.dialog.cancel_bad_debt'),
value: 'cancel bad debt',
},
];

View File

@@ -0,0 +1,659 @@
import { chain } from 'lodash';
import intl from 'react-intl-universal';
import {
AbilitySubject,
AccountAction,
BillAction,
CreditNoteAction,
CustomerAction,
ExpenseAction,
ItemAction,
ManualJournalAction,
PaymentMadeAction,
PaymentReceiveAction,
ReportsAction,
SaleEstimateAction,
SaleInvoiceAction,
SaleReceiptAction,
VendorAction,
VendorCreditAction,
} from './abilityOption';
export const ModulePermissionsStyle = {
Columns: 'columns',
Vertical: 'vertical',
};
const PermissionColumn = {
View: 'view',
Create: 'create',
Delete: 'delete',
Edit: 'edit',
};
export const getPermissionsSchema = () => [
{
label: intl.get('permissions.items_inventory'),
type: ModulePermissionsStyle.Columns,
serviceFullAccess: true,
columns: [
{ label: intl.get('permissions.column.view'), key: 'view' },
{ label: intl.get('permissions.column.create'), key: 'create' },
{ label: intl.get('permissions.column.edit'), key: 'edit' },
{ label: intl.get('permissions.column.delete'), key: 'delete' },
],
services: [
{
label: intl.get('permissions.items'),
subject: AbilitySubject.Item,
permissions: [
{
label: intl.get('permissions.column.view'),
key: ItemAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: ItemAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: ItemAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: ItemAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: ItemAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: ItemAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: ItemAction.Edit }],
},
],
},
{
label: intl.get('permissions.inventory_adjustment'),
subject: AbilitySubject.InventoryAdjustment,
permissions: [
{
label: 'View',
key: ItemAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: 'Create',
key: ItemAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: ItemAction.View }],
},
{
label: 'Edit',
key: ItemAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: ItemAction.Create }],
},
{
label: 'Delete',
key: ItemAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: ItemAction.Edit }],
},
],
},
],
},
{
label: intl.get('permissions.contacts'),
type: ModulePermissionsStyle.Columns,
serviceFullAccess: true,
moduleFullAccess: true,
columns: [
{ label: intl.get('permissions.column.view'), key: 'view' },
{ label: intl.get('permissions.column.create'), key: 'create' },
{ label: intl.get('permissions.column.edit'), key: 'edit' },
{ label: intl.get('permissions.column.delete'), key: 'delete' },
],
services: [
{
label: intl.get('permissions.customers'),
subject: AbilitySubject.Customer,
permissions: [
{
label: intl.get('permissions.column.view'),
key: CustomerAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: CustomerAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: CustomerAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: CustomerAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: CustomerAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: CustomerAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: CustomerAction.Edit }],
},
],
},
{
label: intl.get('permissions.vendors'),
subject: AbilitySubject.Vendor,
permissions: [
{
label: intl.get('permissions.column.view'),
key: VendorAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: VendorAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: VendorAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: VendorAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: VendorAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: VendorAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: VendorAction.Edit }],
},
],
},
],
},
{
label: intl.get('permissions.sales'),
type: ModulePermissionsStyle.Columns,
serviceFullAccess: true,
moduleFullAccess: true,
columns: [
{ label: intl.get('permissions.column.view'), key: 'view' },
{ label: intl.get('permissions.column.create'), key: 'create' },
{ label: intl.get('permissions.column.edit'), key: 'edit' },
{ label: intl.get('permissions.column.delete'), key: 'delete' },
],
services: [
{
label: intl.get('permissions.sale_invoice'),
subject: AbilitySubject.Invoice,
permissions: [
{
label: intl.get('permissions.column.view'),
key: SaleInvoiceAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: SaleInvoiceAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: SaleInvoiceAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: SaleInvoiceAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: SaleInvoiceAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: SaleInvoiceAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: SaleInvoiceAction.Edit }],
},
{
label: intl.get('permissions.column.written_off_invoice'),
key: SaleInvoiceAction.Writeoff,
depend: [{ key: SaleInvoiceAction.Edit }],
},
],
},
{
label: intl.get('permissions.sale_estimate'),
subject: AbilitySubject.Estimate,
permissions: [
{
label: intl.get('permissions.column.view'),
key: SaleEstimateAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: SaleEstimateAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: SaleEstimateAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: SaleEstimateAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: SaleEstimateAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: SaleEstimateAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: SaleEstimateAction.Edit }],
},
],
},
{
label: intl.get('permissions.sale_receipt'),
subject: AbilitySubject.Receipt,
permissions: [
{
label: intl.get('permissions.column.view'),
key: SaleReceiptAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: SaleReceiptAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: SaleReceiptAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: SaleReceiptAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: SaleReceiptAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: SaleReceiptAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: SaleReceiptAction.Edit }],
},
],
},
{
label: intl.get('permissions.credit_note'),
subject: AbilitySubject.CreditNote,
permissions: [
{
label: intl.get('permissions.column.view'),
key: CreditNoteAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: CreditNoteAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: CreditNoteAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: CreditNoteAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: CreditNoteAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: CreditNoteAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: CreditNoteAction.Edit }],
},
{
label: intl.get('permissions.column.refund_credit_note'),
key: CreditNoteAction.Refund,
depend: [{ key: CreditNoteAction.View }],
},
],
},
{
label: intl.get('permissions.payment_receive'),
subject: AbilitySubject.PaymentReceive,
permissions: [
{
label: intl.get('permissions.column.view'),
key: PaymentReceiveAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: PaymentReceiveAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: PaymentReceiveAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: PaymentReceiveAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: PaymentReceiveAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: PaymentReceiveAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: PaymentReceiveAction.Edit }],
},
],
},
],
},
{
label: intl.get('permissions.purchases'),
type: ModulePermissionsStyle.Columns,
serviceFullAccess: true,
moduleFullAccess: true,
columns: [
{ label: intl.get('permissions.column.view'), key: 'view' },
{ label: intl.get('permissions.column.create'), key: 'create' },
{ label: intl.get('permissions.column.edit'), key: 'edit' },
{ label: intl.get('permissions.column.delete'), key: 'delete' },
],
services: [
{
label: intl.get('permissions.bills'),
subject: AbilitySubject.Bill,
permissions: [
{
label: intl.get('permissions.column.view'),
key: BillAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: BillAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: BillAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: BillAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: BillAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: BillAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: BillAction.Edit }],
},
],
},
{
label: intl.get('permissions.vendor_credits'),
subject: AbilitySubject.VendorCredit,
permissions: [
{
label: intl.get('permissions.column.view'),
key: VendorCreditAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: VendorCreditAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: VendorCreditAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: VendorCreditAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: VendorCreditAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: VendorCreditAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: VendorCreditAction.Edit }],
},
{
label: intl.get('permissions.column.refund_vendor_credit'),
key: VendorCreditAction.Refund,
depend: [{ key: VendorCreditAction.View }],
},
],
},
{
label: intl.get('permissions.payment_made'),
subject: AbilitySubject.PaymentMade,
permissions: [
{
label: intl.get('permissions.column.view'),
key: PaymentMadeAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: PaymentMadeAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: PaymentMadeAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: PaymentMadeAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: PaymentMadeAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: PaymentMadeAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: PaymentMadeAction.Edit }],
},
],
},
],
},
{
label: intl.get('permissions.financial_accounting'),
type: ModulePermissionsStyle.Columns,
serviceFullAccess: true,
moduleFullAccess: true,
columns: [
{ label: intl.get('permissions.column.view'), key: 'view' },
{ label: intl.get('permissions.column.create'), key: 'create' },
{ label: intl.get('permissions.column.edit'), key: 'edit' },
{ label: intl.get('permissions.column.delete'), key: 'delete' },
],
services: [
{
label: intl.get('permissions.manual_journals'),
subject: AbilitySubject.ManualJournal,
permissions: [
{
label: intl.get('permissions.column.view'),
key: ManualJournalAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: ManualJournalAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: ManualJournalAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: ManualJournalAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: ManualJournalAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: ManualJournalAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: ManualJournalAction.Edit }],
},
],
},
{
label: intl.get('permissions.chart_of_accounts'),
subject: AbilitySubject.Account,
permissions: [
{
label: intl.get('permissions.column.view'),
key: AccountAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: AccountAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: AccountAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: AccountAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: AccountAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: AccountAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: AccountAction.Edit }],
},
{
label: intl.get('permissions.column.transactions_locking'),
key: AccountAction.TransactionsLocking,
},
],
},
{
label: intl.get('permissions.expenses'),
subject: AbilitySubject.Expense,
permissions: [
{
label: intl.get('permissions.column.view'),
key: ExpenseAction.View,
relatedColumn: PermissionColumn.View,
},
{
label: intl.get('permissions.column.create'),
key: ExpenseAction.Create,
relatedColumn: PermissionColumn.Create,
depend: [{ key: ExpenseAction.View }],
},
{
label: intl.get('permissions.column.edit'),
key: ExpenseAction.Edit,
relatedColumn: PermissionColumn.Edit,
depend: [{ key: ExpenseAction.Create }],
},
{
label: intl.get('permissions.column.delete'),
key: ExpenseAction.Delete,
relatedColumn: PermissionColumn.Delete,
depend: [{ key: ExpenseAction.Edit }],
},
],
},
],
},
{
label: intl.get('permissions.reports'),
type: ModulePermissionsStyle.Vertical,
serviceFullAccess: true,
moduleFullAccess: true,
services: [
{
label: intl.get('permissions.financial_reports'),
subject: AbilitySubject.Report,
permissions: [
{
label: intl.get('permissions.balance_sheet'),
key: ReportsAction.READ_BALANCE_SHEET,
},
{
label: intl.get('permissions.trial_balance_sheet'),
key: ReportsAction.READ_TRIAL_BALANCE_SHEET,
},
{
label: intl.get('permissions.profit_loss_sheet'),
key: ReportsAction.READ_PROFIT_LOSS,
},
{
label: intl.get('permissions.cash_flow_sheet'),
key: ReportsAction.READ_CASHFLOW,
},
{
label: intl.get('permissions.journal_sheet'),
key: ReportsAction.READ_JOURNAL,
},
{
label: intl.get('permissions.general_ledger'),
key: ReportsAction.READ_GENERAL_LEDGET,
},
{
label: intl.get('permissions.a_r_aging_summary_report'),
key: ReportsAction.READ_AR_AGING_SUMMARY,
},
{
label: intl.get('permissions.a_r_aging_summary_report'),
key: ReportsAction.READ_AP_AGING_SUMMARY,
},
{
label: intl.get('permissions.purchases_by_items'),
key: ReportsAction.READ_PURCHASES_BY_ITEMS,
},
{
label: intl.get('permissions.sales_by_items'),
key: ReportsAction.READ_SALES_BY_ITEMS,
},
{
label: intl.get('permissions.customers_transactions'),
key: ReportsAction.READ_CUSTOMERS_TRANSACTIONS,
},
{
label: intl.get('permissions.vendors_transactions'),
key: ReportsAction.READ_VENDORS_TRANSACTIONS,
},
{
label: intl.get('permissions.customers_summary_balance'),
key: ReportsAction.READ_CUSTOMERS_SUMMARY_BALANCE,
},
{
label: intl.get('permissions.vendors_summary_balance'),
key: ReportsAction.READ_VENDORS_SUMMARY_BALANCE,
},
{
label: intl.get('permissions.inventory_valuation_summary'),
key: ReportsAction.READ_INVENTORY_VALUATION_SUMMARY,
},
{
label: intl.get('permissions.inventory_items_details'),
key: ReportsAction.READ_INVENTORY_ITEM_DETAILS,
},
{
label: intl.get('permissions.cashflow_account_transactions'),
key: ReportsAction.READ_CASHFLOW_ACCOUNT_TRANSACTION,
},
],
},
],
},
];
export function getPermissionsSchemaService(subject) {
const permissions = getPermissionsSchema();
return chain(permissions)
.map((perm) => perm.services)
.flatten()
.find((service) => service.subject === subject)
.value();
}
export function getPermissionsSchemaServices() {
const permissions = getPermissionsSchema();
return chain(permissions)
.map((module) => module.services)
.flatten()
.value();
}

View File

@@ -1,10 +1,71 @@
import intl from 'react-intl-universal';
import {
AbilitySubject,
SaleInvoiceAction,
CustomerAction,
VendorAction,
ManualJournalAction,
ExpenseAction,
} from '../common/abilityOption';
import { useAbilitiesFilter } from '../hooks';
export const getQuickNewActions = () => [
{ path: 'invoices/new', name: intl.get('sale_invoice') },
{ path: 'bills/new', name: intl.get('purchase_invoice') },
{ path: 'make-journal-entry', name: intl.get('manual_journal') },
{ path: 'expenses/new', name: intl.get('expense') },
{ path: 'customers/new', name: intl.get('customer') },
{ path: 'vendors/new', name: intl.get('vendor') },
{
path: 'invoices/new',
name: intl.get('sale_invoice'),
permission: {
subject: AbilitySubject.Invoice,
ability: SaleInvoiceAction.Create,
},
},
{
path: 'bills/new',
name: intl.get('purchase_invoice'),
permission: {
subject: AbilitySubject.Invoice,
ability: SaleInvoiceAction.Create,
},
},
{
path: 'make-journal-entry',
name: intl.get('manual_journal'),
permission: {
subject: AbilitySubject.ManualJournal,
ability: ManualJournalAction.Create,
},
},
{
path: 'expenses/new',
name: intl.get('expense'),
permission: {
subject: AbilitySubject.Expense,
ability: ExpenseAction.Create,
},
},
{
path: 'customers/new',
name: intl.get('customer'),
permission: {
subject: AbilitySubject.Customer,
ability: CustomerAction.Create,
},
},
{
path: 'vendors/new',
name: intl.get('vendor'),
permission: {
subject: AbilitySubject.Vendor,
ability: VendorAction.Vendor,
},
},
];
/**
* Retrieve the dashboard quick new menu items.
*/
export const useGetQuickNewMenu = () => {
const quickNewMenu = getQuickNewActions();
const abilitiesFilter = useAbilitiesFilter();
return abilitiesFilter(quickNewMenu);
};

View File

@@ -11,4 +11,6 @@ export const RESOURCES_TYPES = {
EXPENSE: 'expense',
MANUAL_JOURNAL: 'manual_journal',
ACCOUNT: 'account',
CREDIT_NOTE: 'credit_note',
VENDOR_CREDIT:'vendor_credit'
};

View File

@@ -12,4 +12,14 @@ export const TABLES = {
ACCOUNTS: 'accounts',
MANUAL_JOURNALS: 'manual_journal',
EXPENSES: 'expenses',
CASHFLOW_ACCOUNTS: 'cashflow_accounts',
CASHFLOW_Transactions: 'cashflow_transactions',
CREDIT_NOTES: 'credit_notes',
VENDOR_CREDITS: 'vendor_credits',
};
export const TABLE_SIZE = {
COMPACT: 'compact',
SMALL: 'small',
MEDIUM: 'medium',
};

View File

@@ -1,13 +1,56 @@
import React, { useCallback, useState, useEffect, useMemo } from 'react';
import { MenuItem, Button } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import { MenuItemNestedText, FormattedMessage as T } from 'components';
import * as R from 'ramda';
import classNames from 'classnames';
import intl from 'react-intl-universal'
import { MenuItemNestedText, FormattedMessage as T } from 'components';
import { filterAccountsByQuery } from './utils';
import { nestedArrayToflatten } from 'utils';
import { CLASSES } from 'common/classes';
export default function AccountsSelectList({
import withDialogActions from 'containers/Dialog/withDialogActions';
// Create new account renderer.
const createNewItemRenderer = (query, active, handleClick) => {
return (
<MenuItem
icon="add"
text={intl.get('list.create', { value: `"${query}"` })}
active={active}
onClick={handleClick}
/>
);
};
// Create new item from the given query string.
const createNewItemFromQuery = (name) => {
return {
name,
};
};
// Filters accounts items.
const filterAccountsPredicater = (query, account, _index, exactMatch) => {
const normalizedTitle = account.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return `${account.code} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0;
}
};
/**
* Accounts select list.
*/
function AccountsSelectList({
// #withDialogActions
openDialog,
// #ownProps
accounts,
initialAccountId,
selectedAccountId,
@@ -21,6 +64,8 @@ export default function AccountsSelectList({
filterByNormal,
filterByRootTypes,
allowCreate,
buttonProps = {},
}) {
const flattenAccounts = useMemo(
@@ -51,6 +96,7 @@ export default function AccountsSelectList({
[initialAccountId, filteredAccounts],
);
// Select account item.
const [selectedAccount, setSelectedAccount] = useState(
initialAccount || null,
);
@@ -76,31 +122,25 @@ export default function AccountsSelectList({
);
}, []);
const onAccountSelect = useCallback(
// Handle the account item select.
const handleAccountSelect = useCallback(
(account) => {
setSelectedAccount({ ...account });
onAccountSelected && onAccountSelected(account);
},
[setSelectedAccount, onAccountSelected],
);
// Filters accounts items.
const filterAccountsPredicater = useCallback(
(query, account, _index, exactMatch) => {
const normalizedTitle = account.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
if (account.id) {
setSelectedAccount({ ...account });
onAccountSelected && onAccountSelected(account);
} else {
return (
`${account.code} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0
);
openDialog('account-form');
}
},
[],
[setSelectedAccount, onAccountSelected, openDialog],
);
// Maybe inject new item props to select component.
const maybeCreateNewItemRenderer = allowCreate ? createNewItemRenderer : null;
const maybeCreateNewItemFromQuery = allowCreate
? createNewItemFromQuery
: null;
return (
<Select
items={filteredAccounts}
@@ -113,11 +153,13 @@ export default function AccountsSelectList({
inline: popoverFill,
}}
filterable={true}
onItemSelect={onAccountSelect}
onItemSelect={handleAccountSelect}
disabled={disabled}
className={classNames('form-group--select-list', {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
createNewItemRenderer={maybeCreateNewItemRenderer}
createNewItemFromQuery={maybeCreateNewItemFromQuery}
>
<Button
disabled={disabled}
@@ -127,3 +169,5 @@ export default function AccountsSelectList({
</Select>
);
}
export default R.compose(withDialogActions)(AccountsSelectList);

View File

@@ -2,6 +2,7 @@ import React, { useState, useCallback, useEffect, useMemo } from 'react';
import { MenuItem } from '@blueprintjs/core';
import { Suggest } from '@blueprintjs/select';
import intl from 'react-intl-universal';
import * as R from 'ramda';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
@@ -10,10 +11,55 @@ import { MenuItemNestedText, FormattedMessage as T } from 'components';
import { filterAccountsByQuery } from './utils';
import { nestedArrayToflatten } from 'utils';
import withDialogActions from 'containers/Dialog/withDialogActions';
// Create new account renderer.
const createNewItemRenderer = (query, active, handleClick) => {
return (
<MenuItem
icon="add"
text={intl.get('list.create', { value: `"${query}"` })}
active={active}
onClick={handleClick}
/>
);
};
// Create new item from the given query string.
const createNewItemFromQuery = (name) => {
return {
name,
};
};
// Handle input value renderer.
const handleInputValueRenderer = (inputValue) => {
if (inputValue) {
return inputValue.name.toString();
}
return '';
};
// Filters accounts items.
const filterAccountsPredicater = (query, account, _index, exactMatch) => {
const normalizedTitle = account.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return `${account.code} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0;
}
};
/**
* Accounts suggest field.
*/
export default function AccountsSuggestField({
function AccountsSuggestField({
// #withDialogActions
openDialog,
// #ownProps
accounts,
initialAccountId,
selectedAccountId,
@@ -26,6 +72,8 @@ export default function AccountsSuggestField({
filterByNormal,
filterByRootTypes = [],
allowCreate,
...suggestProps
}) {
const flattenAccounts = useMemo(
@@ -69,23 +117,6 @@ export default function AccountsSuggestField({
}
}, [selectedAccountId, filteredAccounts, setSelectedAccount]);
// Filters accounts items.
const filterAccountsPredicater = useCallback(
(query, account, _index, exactMatch) => {
const normalizedTitle = account.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return (
`${account.code} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0
);
}
},
[],
);
// Account item of select accounts field.
const accountItem = useCallback((item, { handleClick, modifiers, query }) => {
return (
@@ -98,28 +129,31 @@ export default function AccountsSuggestField({
);
}, []);
const handleInputValueRenderer = (inputValue) => {
if (inputValue) {
return inputValue.name.toString();
}
return '';
};
const onAccountSelect = useCallback(
const handleAccountSelect = useCallback(
(account) => {
setSelectedAccount({ ...account });
onAccountSelected && onAccountSelected(account);
if (account.id) {
setSelectedAccount({ ...account });
onAccountSelected && onAccountSelected(account);
} else {
openDialog('account-form');
}
},
[setSelectedAccount, onAccountSelected],
[setSelectedAccount, onAccountSelected, openDialog],
);
// Maybe inject new item props to select component.
const maybeCreateNewItemRenderer = allowCreate ? createNewItemRenderer : null;
const maybeCreateNewItemFromQuery = allowCreate
? createNewItemFromQuery
: null;
return (
<Suggest
items={filteredAccounts}
noResults={<MenuItem disabled={true} text={<T id={'no_accounts'} />} />}
itemRenderer={accountItem}
itemPredicate={filterAccountsPredicater}
onItemSelect={onAccountSelect}
onItemSelect={handleAccountSelect}
selectedItem={selectedAccount}
inputProps={{ placeholder: defaultSelectText }}
resetOnClose={true}
@@ -129,7 +163,11 @@ export default function AccountsSuggestField({
className={classNames(CLASSES.FORM_GROUP_LIST_SELECT, {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
createNewItemRenderer={maybeCreateNewItemRenderer}
createNewItemFromQuery={maybeCreateNewItemFromQuery}
{...suggestProps}
/>
);
}
export default R.compose(withDialogActions)(AccountsSuggestField);

View File

@@ -4,8 +4,9 @@ import { DateInput } from '@blueprintjs/datetime';
import moment from 'moment';
import intl from 'react-intl-universal';
import { isUndefined } from 'lodash';
import { useAutofocus } from 'hooks';
import { Choose, ListSelect } from 'components';
import { T, Choose, ListSelect } from 'components';
import { momentFormatter } from 'utils';
function AdvancedFilterEnumerationField({ options, value, ...rest }) {
@@ -19,7 +20,7 @@ function AdvancedFilterEnumerationField({ options, value, ...rest }) {
minimal: true,
captureDismiss: true,
}}
defaultText={`Select an option`}
defaultText={<T id={'filter.select_option'} />}
textProp={'label'}
selectedItemProp={'key'}
{...rest}
@@ -32,8 +33,7 @@ const IFieldType = {
BOOLEAN: 'boolean',
NUMBER: 'number',
DATE: 'date',
}
};
function tansformDateValue(date, defaultValue = null) {
return date ? moment(date).toDate() : defaultValue;
@@ -46,13 +46,13 @@ export default function AdvancedFilterValueField2({
fieldType,
options,
onChange,
isFocus
isFocus,
}) {
const [localValue, setLocalValue] = React.useState(value);
React.useEffect(() => {
if (localValue !== value && !isUndefined(value)) {
setLocalValue(value)
setLocalValue(value);
}
}, [localValue, value]);
@@ -106,10 +106,10 @@ export default function AdvancedFilterValueField2({
position: Position.BOTTOM,
}}
shortcuts={true}
placeholder={'Enter date'}
placeholder={intl.get('filter.enter_date')}
fill={true}
inputProps={{
fill: true
fill: true,
}}
/>
</Choose.When>
@@ -120,7 +120,7 @@ export default function AdvancedFilterValueField2({
<Choose.Otherwise>
<InputGroup
placeholder={intl.get('value')}
placeholder={intl.get('filter.value')}
onChange={handleInputChange}
value={localValue}
inputRef={valueRef}
@@ -128,4 +128,4 @@ export default function AdvancedFilterValueField2({
</Choose.Otherwise>
</Choose>
);
}
}

View File

@@ -1,17 +1,60 @@
import React from 'react';
import clsx from 'classnames';
import styled from 'styled-components';
import Style from './style.module.scss';
export function Alert({ title, description, intent }) {
export function Alert({ title, description, children, intent, className }) {
return (
<div
className={clsx(Style.root, {
[`${Style['root_' + intent]}`]: intent,
})}
>
{title && <h3 className={clsx(Style.title)}>{title}</h3>}
{description && <p class={clsx(Style.description)}>{description}</p>}
</div>
<AlertRoot className={clsx(className)} intent={intent}>
{title && <AlertTitle>{title}</AlertTitle>}
{description && <AlertDesc>{description}</AlertDesc>}
{children && <AlertDesc>{children}</AlertDesc>}
</AlertRoot>
);
}
const AlertRoot = styled.div`
border: 1px solid rgb(223, 227, 230);
padding: 12px;
border-radius: 6px;
margin-bottom: 20px;
${(props) =>
props.intent === 'danger' &&
`
border-color: rgb(249, 198, 198);
background: rgb(255, 248, 248);
${AlertDesc} {
color: #d95759;
}
${AlertTitle} {
color: rgb(205, 43, 49);
}
`}
${(props) =>
props.intent === 'primary' &&
`
background: #fff;
border-color: #98a8ee;
${AlertTitle} {
color: #1a3bd4;
}
${AlertDesc} {
color: #455883;
}
`}
`;
export const AlertTitle = styled.h3`
color: rgb(17, 24, 28);
margin-bottom: 4px;
font-size: 14px;
font-weight: 600;
`;
export const AlertDesc = styled.p`
color: rgb(104, 112, 118);
margin: 0;
`;

View File

@@ -1,32 +0,0 @@
.root {
border: 1px solid rgb(223, 227, 230);
padding: 12px;
border-radius: 6px;
margin-bottom: 20px;
&_danger {
border-color: rgb(249, 198, 198);
background: rgb(255, 248, 248);
.description {
color: #d95759;
}
.title {
color: rgb(205, 43, 49);
}
}
}
.title {
color: rgb(17, 24, 28);
margin-bottom: 4px;
font-size: 14px;
font-weight: 600;
}
.description {
color: rgb(104, 112, 118);
margin: 0;
}

View File

@@ -6,15 +6,38 @@ import { ReactQueryDevtools } from 'react-query/devtools';
import 'style/App.scss';
import 'moment/locale/ar-ly';
import 'moment/locale/es-us'
import 'moment/locale/es-us';
import AppIntlLoader from './AppIntlLoader';
import PrivateRoute from 'components/Guards/PrivateRoute';
import GlobalErrors from 'containers/GlobalErrors/GlobalErrors';
import DashboardPrivatePages from 'components/Dashboard/PrivatePages';
import Authentication from 'components/Authentication';
import { SplashScreen } from '../components';
import { queryConfig } from '../hooks/query/base'
import { SplashScreen, DashboardThemeProvider } from '../components';
import { queryConfig } from '../hooks/query/base';
/**
* App inner.
*/
function AppInsider({ history }) {
return (
<div className="App">
<DashboardThemeProvider>
<Router history={history}>
<Switch>
<Route path={'/auth'} component={Authentication} />
<Route path={'/'}>
<PrivateRoute component={DashboardPrivatePages} />
</Route>
</Switch>
</Router>
<GlobalErrors />
</DashboardThemeProvider>
</div>
);
}
/**
* Core application.
@@ -31,21 +54,10 @@ export default function App() {
<SplashScreen />
<AppIntlLoader>
<div className="App">
<Router history={history}>
<Switch>
<Route path={'/auth'} component={Authentication} />
<Route path={'/'}>
<PrivateRoute component={DashboardPrivatePages} />
</Route>
</Switch>
</Router>
<GlobalErrors />
</div>
<AppInsider history={history} />
</AppIntlLoader>
<ReactQueryDevtools initialIsOpen />
</QueryClientProvider>
);
}
}

View File

@@ -7,9 +7,10 @@ import rtlDetect from 'rtl-detect';
import * as R from 'ramda';
import { AppIntlProvider } from './AppIntlProvider';
import { useSplashLoading } from '../hooks/state';
import { useWatchImmediate } from '../hooks';
import withDashboardActions from '../containers/Dashboard/withDashboardActions';
import withDashboard from '../containers/Dashboard/withDashboard';
const SUPPORTED_LOCALES = [
{ name: 'English', value: 'en' },
@@ -63,20 +64,13 @@ function transformMomentLocale(currentLocale) {
}
/**
* Application Intl loader.
* Loads application locales of the given current locale.
* @param {string} currentLocale
* @returns {{ isLoading: boolean }}
*/
function AppIntlLoader({ appIntlIsLoading, setAppIntlIsLoading, children }) {
const [isLocalsLoading, setIsLocalsLoading] = React.useState(true);
const [isYupLoading, setIsYupLoading] = React.useState(true);
// Retrieve the current locale.
const currentLocale = getCurrentLocal();
// Detarmines the document direction based on the given locale.
const isRTL = rtlDetect.isRtlLang(currentLocale);
// Modifies the html document direction
useDocumentDirectionModifier(currentLocale, isRTL);
function useAppLoadLocales(currentLocale) {
const [startLoading, stopLoading] = useSplashLoading();
const [isLoading, setIsLoading] = React.useState(true);
React.useEffect(() => {
// Lodas the locales data file.
@@ -91,33 +85,72 @@ function AppIntlLoader({ appIntlIsLoading, setAppIntlIsLoading, children }) {
})
.then(() => {
moment.locale(transformMomentLocale(currentLocale));
setIsLocalsLoading(false);
setIsLoading(false);
});
}, [currentLocale, setIsLocalsLoading]);
}, [currentLocale, stopLoading]);
// Watches the value to start/stop splash screen.
useWatchImmediate(
(value) => (value ? startLoading() : stopLoading()),
isLoading,
);
return { isLoading };
}
/**
* Loads application yup locales based on the given current locale.
* @param {string} currentLocale
* @returns {{ isLoading: boolean }}
*/
function useAppYupLoadLocales(currentLocale) {
const [startLoading, stopLoading] = useSplashLoading();
const [isLoading, setIsLoading] = React.useState(true);
React.useEffect(() => {
loadYupLocales(currentLocale)
.then(({ locale }) => {
setLocale(locale);
setIsYupLoading(false);
setIsLoading(false);
})
.then(() => {});
}, [currentLocale]);
}, [currentLocale, stopLoading]);
React.useEffect(() => {
if (!isLocalsLoading && !isYupLoading) {
setAppIntlIsLoading(false);
}
});
// Watches the valiue to start/stop splash screen.
useWatchImmediate(
(value) => (value ? startLoading() : stopLoading()),
isLoading,
);
return { isLoading };
}
/**
* Application Intl loader.
*/
function AppIntlLoader({ children }) {
// Retrieve the current locale.
const currentLocale = getCurrentLocal();
// Detarmines the document direction based on the given locale.
const isRTL = rtlDetect.isRtlLang(currentLocale);
// Modifies the html document direction
useDocumentDirectionModifier(currentLocale, isRTL);
// Loads yup localization of the given locale.
const { isLoading: isAppYupLocalesLoading } =
useAppYupLoadLocales(currentLocale);
// Loads application locales of the given locale.
const { isLoading: isAppLocalesLoading } = useAppLoadLocales(currentLocale);
// Detarmines whether the app locales loading.
const isLoading = isAppYupLocalesLoading || isAppLocalesLoading;
return (
<AppIntlProvider currentLocale={currentLocale} isRTL={isRTL}>
{appIntlIsLoading ? null : children}
{isLoading ? null : children}
</AppIntlProvider>
);
}
export default R.compose(
withDashboardActions,
withDashboard(({ appIntlIsLoading }) => ({ appIntlIsLoading })),
)(AppIntlLoader);
export default R.compose(withDashboardActions)(AppIntlLoader);

View File

@@ -10,6 +10,7 @@ function AppIntlProvider({ currentLocale, isRTL, children }) {
currentLocale,
isRTL,
isLTR: !isRTL,
direction: isRTL ? 'rtl' : 'ltr',
};
return (

View File

@@ -6,7 +6,6 @@ import authenticationRoutes from 'routes/authentication';
import { FormattedMessage as T } from 'components';
import Icon from 'components/Icon';
import { useIsAuthenticated } from 'hooks/state';
import {AuthenticationBoot} from '../containers/Authentication/AuthenticationBoot';
import 'style/pages/Authentication/Auth.scss';
function PageFade(props) {
@@ -26,7 +25,6 @@ export default function AuthenticationWrapper({ ...rest }) {
) : (
<BodyClassName className={'authentication'}>
<div class="authentication-page">
<AuthenticationBoot />
<a
href={'http://bigcapital.ly'}
className={'authentication-page__goto-bigcapital'}

View File

@@ -0,0 +1,10 @@
import React from 'react';
import { firstLettersArgs } from 'utils';
export default function AvatarCell({ row: { original }, size }) {
return (
<span className="avatar" data-size={size}>
{firstLettersArgs(original?.display_name)}
</span>
);
}

View File

@@ -0,0 +1,205 @@
import React from 'react';
import intl from 'react-intl-universal';
import styled from 'styled-components';
import { Classes } from '@blueprintjs/core';
import clsx from 'classnames';
import Icon from '../Icon';
const ACCOUNT_TYPE = {
CASH: 'cash',
BANK: 'bank',
CREDIT_CARD: 'credit-card',
};
const ACCOUNT_TYPE_PAIR_ICON = {
[ACCOUNT_TYPE.CASH]: 'payments',
[ACCOUNT_TYPE.CREDIT_CARD]: 'credit-card',
[ACCOUNT_TYPE.BANK]: 'account-balance',
};
function BankAccountMetaLine({ title, value, className }) {
return (
<MetaLineWrap className={className}>
<MetaLineTitle>{title}</MetaLineTitle>
{value && <MetaLineValue>{value}</MetaLineValue>}
</MetaLineWrap>
);
}
function BankAccountBalance({ amount, loading }) {
return (
<BankAccountBalanceWrap>
<BankAccountBalanceAmount
className={clsx({
[Classes.SKELETON]: loading,
})}
>
{amount}
</BankAccountBalanceAmount>
<BankAccountBalanceLabel>{intl.get('balance')}</BankAccountBalanceLabel>
</BankAccountBalanceWrap>
);
}
function BankAccountTypeIcon({ type }) {
const icon = ACCOUNT_TYPE_PAIR_ICON[type];
if (!icon) {
return;
}
return (
<AccountIconWrap>
<Icon icon={icon} iconSize={18} />
</AccountIconWrap>
);
}
export function BankAccount({
title,
code,
type,
balance,
loading = false,
updatedBeforeText,
...restProps
}) {
return (
<BankAccountWrap {...restProps}>
<BankAccountHeader>
<BankAccountTitle className={clsx({ [Classes.SKELETON]: loading })}>
{title}
</BankAccountTitle>
<BnakAccountCode className={clsx({ [Classes.SKELETON]: loading })}>
{code}
</BnakAccountCode>
{!loading && <BankAccountTypeIcon type={type} />}
</BankAccountHeader>
<BankAccountMeta>
<BankAccountMetaLine
title={intl.get('cash_flow.label_account_transcations')}
value={2}
className={clsx({ [Classes.SKELETON]: loading })}
/>
<BankAccountMetaLine
title={updatedBeforeText}
className={clsx({ [Classes.SKELETON]: loading })}
/>
</BankAccountMeta>
<BankAccountBalance amount={balance} loading={loading} />
</BankAccountWrap>
);
}
const BankAccountWrap = styled.div`
width: 225px;
height: 180px;
display: flex;
flex-direction: column;
border-radius: 3px;
background: #fff;
margin: 8px;
border: 1px solid #c8cad0;
transition: all 0.1s ease-in-out;
&:hover {
border-color: #0153cc;
}
`;
const BankAccountHeader = styled.div`
padding: 10px 12px;
padding-top: 16px;
position: relative;
`;
const BankAccountTitle = styled.div`
font-size: 15px;
font-style: inherit;
letter-spacing: -0.003em;
color: rgb(23, 43, 77);
white-space: nowrap;
font-weight: 600;
line-height: 1;
overflow: hidden;
text-overflow: ellipsis;
margin: 0px;
`;
const BnakAccountCode = styled.div`
font-size: 11px;
margin-top: 4px;
color: rgb(23, 43, 77);
display: inline-block;
`;
const BankAccountBalanceWrap = styled.div`
display: flex;
flex-direction: column;
margin-top: auto;
border-top: 1px solid #dfdfdf;
padding: 10px 12px;
`;
const BankAccountBalanceAmount = styled.div`
font-size: 16px;
font-weight: 600;
line-height: 1;
color: #57657e;
`;
const BankAccountBalanceLabel = styled.div`
text-transform: uppercase;
font-size: 10px;
letter-spacing: 0.5px;
margin-top: 3px;
opacity: 0.6;
`;
const MetaLineWrap = styled.div`
font-size: 11px;
display: flex;
color: #2f3c58;
&:not(:first-of-type) {
margin-top: 6px;
}
`;
const MetaLineTitle = styled.div``;
const MetaLineValue = styled.div`
box-sizing: border-box;
font-style: inherit;
background: rgb(223, 225, 230);
line-height: initial;
align-content: center;
padding: 0px 2px;
border-radius: 9.6px;
font-weight: normal;
text-transform: none;
width: 30px;
min-width: 30px;
height: 16px;
text-align: center;
color: rgb(23, 43, 77);
font-size: 11px;
margin-left: auto;
`;
const BankAccountMeta = styled.div`
padding: 0 12px 10px;
`;
export const BankAccountsList = styled.div`
display: flex;
margin: -8px;
flex-wrap: wrap;
`;
const AccountIconWrap = styled.div`
position: absolute;
top: 14px;
color: #abb3bb;
right: 12px;
`;

View File

@@ -0,0 +1,14 @@
import styled from 'styled-components';
export const ButtonLink = styled.button`
color: #0052cc;
border: 0;
background: transparent;
cursor: pointer;
text-align: inherit;
&:hover,
&:active {
text-decoration: underline;
}
`;

View File

@@ -0,0 +1,3 @@
export * from './ButtonLink';

View File

@@ -1,6 +0,0 @@
import React from 'react';
import classNames from 'classnames';
export default function Card({ className, children }) {
return <div className={classNames('card', className)}>{children}</div>;
}

View File

@@ -0,0 +1,27 @@
import React from 'react';
import styled from 'styled-components';
export function Card({ className, children }) {
return <CardRoot className={className}>{children}</CardRoot>;
}
const CardRoot = styled.div`
padding: 15px;
margin: 15px;
background: #fff;
border: 1px solid #d2dce2;
`;
export const CardFooterActions = styled.div`
padding-top: 16px;
border-top: 1px solid #e0e7ea;
margin-top: 30px;
.bp3-button {
min-width: 70px;
+ .bp3-button {
margin-left: 10px;
}
}
`;

View File

@@ -0,0 +1,25 @@
import styled from 'styled-components';
import { Card } from '../Card';
import DataTable from '../DataTable';
export const CommercialDocBox = styled(Card)`
padding: 22px 20px;
`;
export const CommercialDocHeader = styled.div`
margin-bottom: 25px;
`;
export const CommercialDocTopHeader = styled.div`
margin-bottom: 25px;
`;
export const CommercialDocEntriesTable = styled(DataTable)`
.tbody .tr:last-child .td {
border-bottom: 1px solid #d2dce2;
}
`;
export const CommercialDocFooter = styled.div`
margin-top: 25px;
`;

View File

@@ -11,12 +11,14 @@ export default function ContactSelecetList({
contactsList,
initialContactId,
selectedContactId,
selectedContactType,
createNewItemFrom,
defaultSelectText = <T id={'select_contact'} />,
onContactSelected,
popoverFill = false,
disabled = false,
buttonProps,
...restProps
}) {
const contacts = useMemo(
() =>
@@ -65,7 +67,7 @@ export default function ContactSelecetList({
);
// Filter Contact List
const filterContacts = (query, contact, index, exactMatch) => {
const itemPredicate = (query, contact, index, exactMatch) => {
const normalizedTitle = contact.display_name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
@@ -83,7 +85,7 @@ export default function ContactSelecetList({
items={contacts}
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
itemRenderer={handleContactRenderer}
itemPredicate={filterContacts}
itemPredicate={itemPredicate}
filterable={true}
disabled={disabled}
onItemSelect={onContactSelect}
@@ -92,8 +94,9 @@ export default function ContactSelecetList({
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
inputProps={{
placeholder: intl.get('filter_')
placeholder: intl.get('filter_'),
}}
{...restProps}
>
<Button
disabled={disabled}

View File

@@ -0,0 +1,86 @@
import React, { useCallback, useState, useEffect, useMemo } from 'react';
import { FormattedMessage as T } from 'components';
import intl from 'react-intl-universal';
import { MenuItem, Button } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import { itemPredicate, handleContactRenderer } from './utils';
export default function ContactSelectField({
contacts,
initialContactId,
selectedContactId,
defaultSelectText = <T id={'select_contact'} />,
onContactSelected,
popoverFill = false,
disabled = false,
buttonProps,
...restProps
}) {
const localContacts = useMemo(
() =>
contacts.map((contact) => ({
...contact,
_id: `${contact.id}_${contact.contact_type}`,
})),
[contacts],
);
const initialContact = useMemo(
() => contacts.find((a) => a.id === initialContactId),
[initialContactId, contacts],
);
const [selecetedContact, setSelectedContact] = useState(
initialContact || null,
);
useEffect(() => {
if (typeof selectedContactId !== 'undefined') {
const account = selectedContactId
? contacts.find((a) => a.id === selectedContactId)
: null;
setSelectedContact(account);
}
}, [selectedContactId, contacts, setSelectedContact]);
const handleContactSelect = useCallback(
(contact) => {
setSelectedContact({ ...contact });
onContactSelected && onContactSelected(contact);
},
[setSelectedContact, onContactSelected],
);
return (
<Select
items={localContacts}
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
itemRenderer={handleContactRenderer}
itemPredicate={itemPredicate}
filterable={true}
disabled={disabled}
onItemSelect={handleContactSelect}
popoverProps={{ minimal: true, usePortal: !popoverFill }}
className={classNames(CLASSES.FORM_GROUP_LIST_SELECT, {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
inputProps={{
placeholder: intl.get('filter_'),
}}
{...restProps}
>
<Button
disabled={disabled}
text={
selecetedContact ? selecetedContact.display_name : defaultSelectText
}
{...buttonProps}
/>
</Select>
);
}

View File

@@ -0,0 +1,116 @@
import React, { useCallback, useState, useEffect, useMemo } from 'react';
import { FormattedMessage as T } from 'components';
import intl from 'react-intl-universal';
import * as R from 'ramda';
import { MenuItem, Button } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import {
itemPredicate,
handleContactRenderer,
createNewItemRenderer,
createNewItemFromQuery,
} from './utils';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { DRAWERS } from 'common/drawers';
function CustomerSelectField({
// #withDrawerActions
openDrawer,
// #ownProps
contacts,
initialContactId,
selectedContactId,
defaultSelectText = <T id={'select_contact'} />,
onContactSelected,
popoverFill = false,
disabled = false,
allowCreate,
buttonProps,
...restProps
}) {
const localContacts = useMemo(
() =>
contacts.map((contact) => ({
...contact,
_id: `${contact.id}_${contact.contact_type}`,
})),
[contacts],
);
const initialContact = useMemo(
() => contacts.find((a) => a.id === initialContactId),
[initialContactId, contacts],
);
const [selecetedContact, setSelectedContact] = useState(
initialContact || null,
);
useEffect(() => {
if (typeof selectedContactId !== 'undefined') {
const account = selectedContactId
? contacts.find((a) => a.id === selectedContactId)
: null;
setSelectedContact(account);
}
}, [selectedContactId, contacts, setSelectedContact]);
const handleContactSelect = useCallback(
(contact) => {
if (contact.id) {
setSelectedContact({ ...contact });
onContactSelected && onContactSelected(contact);
} else {
openDrawer(DRAWERS.QUICK_CREATE_CUSTOMER);
}
},
[setSelectedContact, onContactSelected, openDrawer],
);
// Maybe inject create new item props to suggest component.
const maybeCreateNewItemRenderer = allowCreate ? createNewItemRenderer : null;
const maybeCreateNewItemFromQuery = allowCreate
? createNewItemFromQuery
: null;
return (
<Select
items={localContacts}
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
itemRenderer={handleContactRenderer}
itemPredicate={itemPredicate}
filterable={true}
disabled={disabled}
onItemSelect={handleContactSelect}
popoverProps={{ minimal: true, usePortal: !popoverFill }}
className={classNames(CLASSES.FORM_GROUP_LIST_SELECT, {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
inputProps={{
placeholder: intl.get('filter_'),
}}
createNewItemRenderer={maybeCreateNewItemRenderer}
createNewItemFromQuery={maybeCreateNewItemFromQuery}
createNewItemPosition={'top'}
{...restProps}
>
<Button
disabled={disabled}
text={
selecetedContact ? selecetedContact.display_name : defaultSelectText
}
{...buttonProps}
/>
</Select>
);
}
export default R.compose(withDrawerActions)(CustomerSelectField);

View File

@@ -0,0 +1,115 @@
import React, { useCallback, useState, useEffect, useMemo } from 'react';
import { FormattedMessage as T } from 'components';
import intl from 'react-intl-universal';
import * as R from 'ramda';
import { MenuItem, Button } from '@blueprintjs/core';
import { Select } from '@blueprintjs/select';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import {
itemPredicate,
handleContactRenderer,
createNewItemFromQuery,
createNewItemRenderer,
} from './utils';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { DRAWERS } from 'common/drawers';
function VendorSelectField({
// #withDrawerActions
openDrawer,
// #ownProps
contacts,
initialContactId,
selectedContactId,
defaultSelectText = <T id={'select_contact'} />,
onContactSelected,
popoverFill = false,
disabled = false,
allowCreate,
buttonProps,
...restProps
}) {
const localContacts = useMemo(
() =>
contacts.map((contact) => ({
...contact,
_id: `${contact.id}_${contact.contact_type}`,
})),
[contacts],
);
const initialContact = useMemo(
() => contacts.find((a) => a.id === initialContactId),
[initialContactId, contacts],
);
const [selecetedContact, setSelectedContact] = useState(
initialContact || null,
);
useEffect(() => {
if (typeof selectedContactId !== 'undefined') {
const account = selectedContactId
? contacts.find((a) => a.id === selectedContactId)
: null;
setSelectedContact(account);
}
}, [selectedContactId, contacts, setSelectedContact]);
const handleContactSelect = useCallback(
(contact) => {
if (contact.id) {
setSelectedContact({ ...contact });
onContactSelected && onContactSelected(contact);
} else {
openDrawer(DRAWERS.QUICK_WRITE_VENDOR);
}
},
[setSelectedContact, onContactSelected, openDrawer],
);
// Maybe inject create new item props to suggest component.
const maybeCreateNewItemRenderer = allowCreate ? createNewItemRenderer : null;
const maybeCreateNewItemFromQuery = allowCreate
? createNewItemFromQuery
: null;
return (
<Select
items={localContacts}
noResults={<MenuItem disabled={true} text={<T id={'no_results'} />} />}
itemRenderer={handleContactRenderer}
itemPredicate={itemPredicate}
filterable={true}
disabled={disabled}
onItemSelect={handleContactSelect}
popoverProps={{ minimal: true, usePortal: !popoverFill }}
className={classNames(CLASSES.FORM_GROUP_LIST_SELECT, {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
inputProps={{
placeholder: intl.get('filter_'),
}}
createNewItemRenderer={maybeCreateNewItemRenderer}
createNewItemFromQuery={maybeCreateNewItemFromQuery}
createNewItemPosition={'top'}
{...restProps}
>
<Button
disabled={disabled}
text={
selecetedContact ? selecetedContact.display_name : defaultSelectText
}
{...buttonProps}
/>
</Select>
);
}
export default R.compose(withDrawerActions)(VendorSelectField);

View File

@@ -0,0 +1,5 @@
import ContactSelectField from './ContactSelectField';
import CustomerSelectField from './CustomerSelectField';
import VendorSelectField from './VendorSelectField';
export { ContactSelectField, CustomerSelectField, VendorSelectField };

View File

@@ -0,0 +1,44 @@
import React from 'react';
import intl from 'react-intl-universal';
import { MenuItem } from '@blueprintjs/core';
// Filter Contact List
export const itemPredicate = (query, contact, index, exactMatch) => {
const normalizedTitle = contact.display_name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return (
`${contact.display_name} ${normalizedTitle}`.indexOf(normalizedQuery) >= 0
);
}
};
export const handleContactRenderer = (contact, { handleClick }) => (
<MenuItem
key={contact.id}
text={contact.display_name}
onClick={handleClick}
/>
);
// Creates a new item from query.
export const createNewItemFromQuery = (name) => {
return {
name,
};
};
// Handle quick create new customer.
export const createNewItemRenderer = (query, active, handleClick) => {
return (
<MenuItem
icon="add"
text={intl.get('list.create', { value: `"${query}"` })}
active={active}
shouldDismissPopover={false}
onClick={handleClick}
/>
);
};

View File

@@ -0,0 +1,25 @@
import React from 'react';
import * as R from 'ramda';
import { ButtonLink } from 'components';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
function CustomerDrawerLinkComponent({
// #ownProps
children,
customerId,
// #withDrawerActions
openDrawer,
}) {
// Handle view customer drawer.
const handleCustomerDrawer = () => {
openDrawer('customer-details-drawer', { customerId });
};
return <ButtonLink onClick={handleCustomerDrawer}>{children}</ButtonLink>;
}
export const CustomerDrawerLink = R.compose(withDrawerActions)(
CustomerDrawerLinkComponent,
);

View File

@@ -0,0 +1 @@
export * from './CustomerDrawerLink';

View File

@@ -1,28 +0,0 @@
import React from 'react';
import { useUser } from 'hooks/query';
import withAuthentication from '../../containers/Authentication/withAuthentication';
const AuthenticatedUserContext = React.createContext();
function AuthenticatedUserComponent({ authenticatedUserId, children }) {
const { data: user, ...restProps } = useUser(authenticatedUserId);
return (
<AuthenticatedUserContext.Provider
value={{
user,
...restProps,
}}
children={children}
/>
);
}
export const AuthenticatedUser = withAuthentication(
({ authenticatedUserId }) => ({
authenticatedUserId,
}),
)(AuthenticatedUserComponent);
export const useAuthenticatedUser = () =>
React.useContext(AuthenticatedUserContext);

View File

@@ -12,6 +12,7 @@ import DashboardSplitPane from 'components/Dashboard/DashboardSplitePane';
import GlobalHotkeys from './GlobalHotkeys';
import DashboardProvider from './DashboardProvider';
import DrawersContainer from 'components/DrawersContainer';
import AlertsContainer from 'containers/AlertsContainer';
import EnsureSubscriptionIsActive from '../Guards/EnsureSubscriptionIsActive';
/**
@@ -55,6 +56,7 @@ export default function Dashboard() {
<DialogsContainer />
<GlobalHotkeys />
<DrawersContainer />
<AlertsContainer />
</DashboardProvider>
);
}

View File

@@ -0,0 +1,25 @@
import React from 'react';
import { Ability } from '@casl/ability';
import { createContextualCan } from '@casl/react';
import { useDashboardMeta } from '../../hooks/query';
export const AbilityContext = React.createContext();
export const Can = createContextualCan(AbilityContext.Consumer);
/**
* Dashboard ability provider.
*/
export function DashboardAbilityProvider({ children }) {
const {
data: { abilities },
} = useDashboardMeta();
// Ability instance.
const ability = new Ability(abilities);
return (
<AbilityContext.Provider value={ability}>
{children}
</AbilityContext.Provider>
);
}

View File

@@ -1,16 +1,19 @@
import React from 'react';
import classnames from 'classnames';
import clsx from 'classnames';
import { Navbar } from '@blueprintjs/core';
export default function DashboardActionsBar({ children, name }) {
export default function DashboardActionsBar({ className, children, name }) {
return (
<div
className={classnames({
'dashboard__actions-bar': true,
[`dashboard__actions-bar--${name}`]: !!name
})}
className={clsx(
{
'dashboard__actions-bar': true,
[`dashboard__actions-bar--${name}`]: !!name,
},
className,
)}
>
<Navbar className='navbar--dashboard-actions-bar'>{children}</Navbar>
<Navbar className="navbar--dashboard-actions-bar">{children}</Navbar>
</div>
);
}

View File

@@ -1,23 +1,63 @@
import React from 'react';
import * as R from 'ramda';
import { useUser, useCurrentOrganization } from 'hooks/query';
import withAuthentication from '../../containers/Authentication/withAuthentication';
import withDashboardActions from '../../containers/Dashboard/withDashboardActions';
import {
useAuthenticatedAccount,
useCurrentOrganization,
useDashboardMeta,
} from '../../hooks/query';
import { useSplashLoading } from '../../hooks/state';
import { useWatch, useWatchImmediate, useWhen } from '../../hooks';
import { setCookie, getCookie } from '../../utils';
/**
* Dashboard async booting.
* Dashboard meta async booting.
*/
function DashboardBootJSX({ setAppIsLoading, authenticatedUserId }) {
export function useDashboardMetaBoot() {
const {
data: dashboardMeta,
isLoading: isDashboardMetaLoading,
isSuccess: isDashboardMetaSuccess,
} = useDashboardMeta({
keepPreviousData: true,
});
const [startLoading, stopLoading] = useSplashLoading();
useWatchImmediate((value) => {
value && startLoading();
}, isDashboardMetaLoading);
useWatchImmediate(() => {
isDashboardMetaSuccess && stopLoading();
}, isDashboardMetaSuccess);
return {
isLoading: isDashboardMetaLoading,
};
}
/**
* Dashboard async booting.
* @returns {{ isLoading: boolean }}
*/
export function useDashboardBoot() {
const { isLoading } = useDashboardMetaBoot();
return { isLoading };
}
/**
* Application async booting.
*/
export function useApplicationBoot() {
// Fetches the current user's organization.
const { isSuccess: isCurrentOrganizationSuccess, data: organization } =
useCurrentOrganization();
const {
isSuccess: isCurrentOrganizationSuccess,
isLoading: isOrgLoading,
data: organization,
} = useCurrentOrganization();
// Authenticated user.
const { isSuccess: isAuthUserSuccess, data: authUser } =
useUser(authenticatedUserId);
const { isSuccess: isAuthUserSuccess, isLoading: isAuthUserLoading } =
useAuthenticatedAccount();
// Initial locale cookie value.
const localeCookie = getCookie('locale');
@@ -48,29 +88,41 @@ function DashboardBootJSX({ setAppIsLoading, authenticatedUserId }) {
}
}, [localeCookie, organization]);
React.useEffect(() => {
// Once the all requests complete change the app loading state.
if (
isAuthUserSuccess &&
isCurrentOrganizationSuccess &&
localeCookie === organization?.metadata?.language
) {
setAppIsLoading(false);
isBooted.current = true;
}
}, [
isAuthUserSuccess,
isCurrentOrganizationSuccess,
organization,
setAppIsLoading,
localeCookie,
]);
return null;
}
const [startLoading, stopLoading] = useSplashLoading();
export const DashboardBoot = R.compose(
withAuthentication(({ authenticatedUserId }) => ({
authenticatedUserId,
})),
withDashboardActions,
)(DashboardBootJSX);
// Splash loading when organization request loading and
// applicaiton still not booted.
useWatchImmediate((value) => {
value && !isBooted.current && startLoading();
}, isOrgLoading);
// Splash loading when request authenticated user loading and
// application still not booted yet.
useWatchImmediate((value) => {
value && !isBooted.current && startLoading();
}, isAuthUserLoading);
// Stop splash loading once organization request success.
useWatch((value) => {
value && stopLoading();
}, isCurrentOrganizationSuccess);
// Stop splash loading once authenticated user request success.
useWatch((value) => {
value && stopLoading();
}, isAuthUserSuccess);
// Once the all requests complete change the app loading state.
useWhen(
isAuthUserSuccess &&
isCurrentOrganizationSuccess &&
localeCookie === organization?.metadata?.language,
() => {
isBooted.current = true;
},
);
return {
isLoading: isOrgLoading || isAuthUserLoading,
};
}

View File

@@ -2,7 +2,6 @@ import React from 'react';
import { ErrorBoundary } from 'react-error-boundary';
import DashboardTopbar from 'components/Dashboard/DashboardTopbar';
import DashboardContentRoutes from 'components/Dashboard/DashboardContentRoute';
import DashboardFooter from 'components/Dashboard/DashboardFooter';
import DashboardErrorBoundary from './DashboardErrorBoundary';
export default React.forwardRef(({}, ref) => {
@@ -11,7 +10,6 @@ export default React.forwardRef(({}, ref) => {
<div className="dashboard-content" id="dashboard" ref={ref}>
<DashboardTopbar />
<DashboardContentRoutes />
<DashboardFooter />
</div>
</ErrorBoundary>
);

View File

@@ -1,8 +1,16 @@
import React from 'react';
import { DashboardAbilityProvider } from '../../components';
import { useDashboardBoot } from './DashboardBoot';
/**
* Dashboard provider.
*/
export default function DashboardProvider({ children }) {
return children;
const { isLoading } = useDashboardBoot();
// Avoid display any dashboard component before complete booting.
if (isLoading) {
return null;
}
return <DashboardAbilityProvider>{children}</DashboardAbilityProvider>;
}

View File

@@ -1,36 +0,0 @@
import React from 'react';
import {
Button,
PopoverInteractionKind,
Popover,
Menu,
MenuItem,
MenuDivider,
Classes
} from '@blueprintjs/core';
import { Icon } from 'components';
export function DashboardRowsHeightButton() {
return (
<Popover
minimal={true}
content={
<Menu>
<MenuDivider title={'Rows height'} />
<MenuItem text="Compact" />
<MenuItem text="Medium" />
</Menu>
}
placement="bottom-start"
modifiers={{
offset: { offset: '0, 4' },
}}
interactionKind={PopoverInteractionKind.CLICK}
>
<Button
className={Classes.MINIMAL}
icon={<Icon icon="rows-height" iconSize={16} />}
/>
</Popover>
);
}

View File

@@ -0,0 +1,70 @@
import React from 'react';
import {
Button,
PopoverInteractionKind,
Popover,
Menu,
MenuItem,
MenuDivider,
Classes,
Tooltip,
Position,
} from '@blueprintjs/core';
import clsx from 'classnames';
import { Icon, T } from 'components';
import Style from './style.module.scss';
/**
* Dashboard rows height button control.
*/
export function DashboardRowsHeightButton({ initialValue, value, onChange }) {
const [localSize, setLocalSize] = React.useState(initialValue);
// Handle menu item click.
const handleItemClick = (size) => (event) => {
setLocalSize(size);
onChange && onChange(size, event);
};
// Button icon name.
const btnIcon = `table-row-${localSize}`;
return (
<Popover
minimal={true}
content={
<Menu className={Style.menu}>
<MenuDivider title={<T id={'dashboard.rows_height'} />} />
<MenuItem
onClick={handleItemClick('small')}
text={<T id={'dashboard.row_small'} />}
/>
<MenuItem
onClick={handleItemClick('medium')}
text={<T id={'dashboard.row_medium'} />}
/>
</Menu>
}
placement="bottom-start"
modifiers={{
offset: { offset: '0, 4' },
}}
interactionKind={PopoverInteractionKind.CLICK}
>
<Tooltip
content={<T id={'dashboard.rows_height'} />}
minimal={true}
position={Position.BOTTOM}
>
<Button
className={clsx(Classes.MINIMAL, Style.button)}
icon={<Icon icon={btnIcon} iconSize={16} />}
/>
</Tooltip>
</Popover>
);
}
DashboardRowsHeightButton.defaultProps = {
initialValue: 'medium',
};

View File

@@ -0,0 +1,12 @@
.menu{
:global .bp3-heading{
font-weight: 400;
opacity: 0.5;
font-size: 12px;
}
}
.button{
min-width: 34px;
}

View File

@@ -0,0 +1,16 @@
import React from 'react';
import { ThemeProvider, StyleSheetManager } from 'styled-components';
import rtlcss from 'stylis-rtlcss';
import { useAppIntlContext } from '../AppIntlProvider';
export function DashboardThemeProvider({ children }) {
const { direction } = useAppIntlContext();
return (
<StyleSheetManager
{...(direction === 'rtl' ? { stylisPlugins: [rtlcss] } : {})}
>
<ThemeProvider theme={{ dir: direction }}>{children}</ThemeProvider>
</StyleSheetManager>
);
}

View File

@@ -23,6 +23,7 @@ import withDashboard from 'containers/Dashboard/withDashboard';
import QuickNewDropdown from 'containers/QuickNewDropdown/QuickNewDropdown';
import { compose } from 'utils';
import withSubscriptions from '../../containers/Subscriptions/withSubscriptions';
import { useGetUniversalSearchTypeOptions } from '../../containers/UniversalSearch/utils';
function DashboardTopbarSubscriptionMessage() {
return (
@@ -142,11 +143,8 @@ function DashboardTopbar({
<Navbar class="dashboard__topbar-navbar">
<NavbarGroup>
<If condition={isSubscriptionActive}>
<Button
<DashboardQuickSearchButton
onClick={() => openGlobalSearch(true)}
className={Classes.MINIMAL}
icon={<Icon icon={'search-24'} iconSize={20} />}
text={<T id={'quick_find'} />}
/>
<QuickNewDropdown />
@@ -195,3 +193,23 @@ export default compose(
'main',
),
)(DashboardTopbar);
/**
* Dashboard quick search button.
*/
function DashboardQuickSearchButton({ ...rest }) {
const searchTypeOptions = useGetUniversalSearchTypeOptions();
// Can't continue if there is no any search type option.
if (searchTypeOptions.length <= 0) {
return null;
}
return (
<Button
className={Classes.MINIMAL}
icon={<Icon icon={'search-24'} iconSize={20} />}
text={<T id={'quick_find'} />}
{...rest}
/>
);
}

View File

@@ -3,11 +3,16 @@ import { useHotkeys } from 'react-hotkeys-hook';
import { useHistory } from 'react-router-dom';
import { getDashboardRoutes } from 'routes/dashboard';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
import withDialogActions from 'containers/Dialog/withDialogActions';
import { compose } from 'utils';
function GlobalHotkeys({
// #withDashboardActions
toggleSidebarExpend,
// #withDialogActions
openDialog,
}) {
const history = useHistory();
const routes = getDashboardRoutes();
@@ -16,8 +21,8 @@ function GlobalHotkeys({
.filter(({ hotkey }) => hotkey)
.map(({ hotkey }) => hotkey)
.toString();
const handleSidebarToggleBtn = () => {
const handleSidebarToggleBtn = () => {
toggleSidebarExpend();
};
useHotkeys(
@@ -32,7 +37,9 @@ function GlobalHotkeys({
[history],
);
useHotkeys('ctrl+/', (event, handle) => handleSidebarToggleBtn());
useHotkeys('shift+d', (event, handle) => openDialog('money-in', {}));
useHotkeys('shift+q', (event, handle) => openDialog('money-out', {}));
return <div></div>;
}
export default compose(withDashboardActions)(GlobalHotkeys);
export default compose(withDashboardActions, withDialogActions)(GlobalHotkeys);

View File

@@ -4,10 +4,9 @@ import { Switch, Route } from 'react-router';
import Dashboard from 'components/Dashboard/Dashboard';
import SetupWizardPage from 'containers/Setup/WizardSetupPage';
import EnsureOrganizationIsReady from 'components/Guards/EnsureOrganizationIsReady';
import EnsureOrganizationIsNotReady from 'components/Guards/EnsureOrganizationIsNotReady';
import EnsureOrganizationIsReady from '../../components/Guards/EnsureOrganizationIsReady';
import EnsureOrganizationIsNotReady from '../../components/Guards/EnsureOrganizationIsNotReady';
import { PrivatePagesProvider } from './PrivatePagesProvider';
import { DashboardBoot } from '../../components';
import 'style/pages/Dashboard/Dashboard.scss';
@@ -17,8 +16,6 @@ import 'style/pages/Dashboard/Dashboard.scss';
export default function DashboardPrivatePages() {
return (
<PrivatePagesProvider>
<DashboardBoot />
<Switch>
<Route path={'/setup'}>
<EnsureOrganizationIsNotReady>

View File

@@ -1,9 +1,15 @@
import React from 'react';
import { AuthenticatedUser } from './AuthenticatedUser';
import { useApplicationBoot } from '../../components';
/**
* Private pages provider.
*/
export function PrivatePagesProvider({ children }) {
return <AuthenticatedUser>{children}</AuthenticatedUser>;
export function PrivatePagesProvider({
// #ownProps
children,
}) {
const { isLoading } = useApplicationBoot();
return <React.Fragment>{!isLoading ? children : null}</React.Fragment>;
}

View File

@@ -3,13 +3,12 @@ import * as R from 'ramda';
import BigcapitalLoading from './BigcapitalLoading';
import withDashboard from '../../containers/Dashboard/withDashboard';
function SplashScreenComponent({ appIsLoading, appIntlIsLoading }) {
return appIsLoading || appIntlIsLoading ? <BigcapitalLoading /> : null;
function SplashScreenComponent({ splashScreenLoading }) {
return splashScreenLoading ? <BigcapitalLoading /> : null;
}
export const SplashScreen = R.compose(
withDashboard(({ appIsLoading, appIntlIsLoading }) => ({
appIsLoading,
appIntlIsLoading,
withDashboard(({ splashScreenLoading }) => ({
splashScreenLoading,
})),
)(SplashScreenComponent);

View File

@@ -14,10 +14,14 @@ import { firstLettersArgs } from 'utils';
import { useAuthActions } from 'hooks/state';
import withDialogActions from 'containers/Dialog/withDialogActions';
import { compose } from 'utils';
import withSubscriptions from '../../containers/Subscriptions/withSubscriptions';
import { useAuthenticatedUser } from './AuthenticatedUser';
import { useAuthenticatedAccount } from 'hooks/query'
import { compose } from 'utils';
/**
* Dashboard topbar user.
*/
function DashboardTopbarUser({
openDialog,
@@ -28,7 +32,7 @@ function DashboardTopbarUser({
const { setLogout } = useAuthActions();
// Retrieve authenticated user information.
const { user } = useAuthenticatedUser();
const { data: user } = useAuthenticatedAccount();
const onClickLogout = () => {
setLogout();

View File

@@ -1,4 +1,4 @@
export * from './SplashScreen';
export * from './DashboardBoot';
export * from './DashboardBoot';
export * from './DashboardThemeProvider';
export * from './DashboardAbilityProvider';

View File

@@ -196,6 +196,9 @@ export default function DataTable(props) {
DataTable.defaultProps = {
pagination: false,
hidePaginationNoPages: true,
size: null,
spinnerProps: { size: 30 },
expandToggleColumn: 1,

View File

@@ -17,6 +17,8 @@ export default function AccountCellRenderer({
accountsDataProp,
filterAccountsByRootTypes,
filterAccountsByTypes,
fieldProps,
formGroupProps,
},
row: { index, original },
cell: { value: initialValue },
@@ -53,6 +55,7 @@ export default function AccountCellRenderer({
'form-group--account',
Classes.FILL,
)}
{...formGroupProps}
>
<AccountsSuggestField
accounts={accounts}
@@ -66,6 +69,7 @@ export default function AccountCellRenderer({
}}
openOnKeyDown={true}
blurOnSelectClose={false}
{...fieldProps}
/>
</FormGroup>
);

View File

@@ -1,15 +1,17 @@
import React, { useCallback, useRef } from 'react';
// import ItemsListField from 'components/ItemsListField';
import ItemsSuggestField from 'components/ItemsSuggestField';
import classNames from 'classnames';
import { FormGroup, Classes, Intent } from '@blueprintjs/core';
import intl from 'react-intl-universal';
import ItemsSuggestField from 'components/ItemsSuggestField';
import { useCellAutoFocus } from 'hooks';
/**
* Items list cell.
*/
export default function ItemsListCell({
column: { id, filterSellable, filterPurchasable },
column: { id, filterSellable, filterPurchasable, fieldProps, formGroupProps },
row: { index },
cell: { value: initialValue },
payload: { items, updateData, errors, autoFocus },
@@ -19,6 +21,7 @@ export default function ItemsListCell({
// Auto-focus the items list input field.
useCellAutoFocus(fieldRef, autoFocus, id, index);
// Handle the item selected.
const handleItemSelected = useCallback(
(item) => {
updateData(index, id, item.id);
@@ -32,6 +35,7 @@ export default function ItemsListCell({
<FormGroup
intent={error ? Intent.DANGER : null}
className={classNames('form-group--select-list', Classes.FILL)}
{...formGroupProps}
>
<ItemsSuggestField
items={items}
@@ -45,6 +49,7 @@ export default function ItemsListCell({
}}
openOnKeyDown={true}
blurOnSelectClose={false}
{...fieldProps}
/>
</FormGroup>
);

View File

@@ -0,0 +1,51 @@
import React from 'react';
import classNames from 'classnames';
import { Classes, Switch, FormGroup, Intent } from '@blueprintjs/core';
import { safeInvoke } from 'utils';
/**
* Switch editable cell.
*/
const SwitchEditableCell = ({
row: { index, original },
column: { id, switchProps, onSwitchChange },
cell: { value: initialValue },
payload,
}) => {
const [value, setValue] = React.useState(initialValue);
// Handle the switch change.
const onChange = (e) => {
const newValue = e.target.checked;
setValue(newValue);
safeInvoke(payload.updateData, index, id, newValue);
safeInvoke(onSwitchChange, e, newValue, original);
};
React.useEffect(() => {
setValue(initialValue);
}, [initialValue]);
const error = payload.errors?.[index]?.[id];
return (
<FormGroup
intent={error ? Intent.DANGER : null}
className={classNames(Classes.FILL)}
>
<Switch
value={value}
onChange={onChange}
checked={initialValue}
minimal={true}
className="ml2"
{...switchProps}
/>
</FormGroup>
);
};
export default SwitchEditableCell;

View File

@@ -0,0 +1,42 @@
import React, { useState, useEffect } from 'react';
import classNames from 'classnames';
import { Classes, TextArea, FormGroup, Intent } from '@blueprintjs/core';
const TextAreaEditableCell = ({
row: { index },
column: { id },
cell: { value: initialValue },
payload,
}) => {
const [value, setValue] = useState(initialValue);
const onChange = (e) => {
setValue(e.target.value);
};
const onBlur = () => {
payload.updateData(index, id, value);
};
useEffect(() => {
setValue(initialValue);
}, [initialValue]);
const error = payload.errors?.[index]?.[id];
return (
<FormGroup
intent={error ? Intent.DANGER : null}
className={classNames(Classes.FILL)}
>
<TextArea
growVertically={true}
large={true}
value={value}
onChange={onChange}
onBlur={onBlur}
fill={true}
/>
</FormGroup>
);
};
export default TextAreaEditableCell;

View File

@@ -6,7 +6,9 @@ import ItemsListCell from './ItemsListCell';
import PercentFieldCell from './PercentFieldCell';
import { DivFieldCell, EmptyDiv } from './DivFieldCell';
import NumericInputCell from './NumericInputCell';
import CheckBoxFieldCell from './CheckBoxFieldCell'
import CheckBoxFieldCell from './CheckBoxFieldCell';
import SwitchFieldCell from './SwitchFieldCell';
import TextAreaCell from './TextAreaCell';
export {
AccountsListFieldCell,
@@ -18,5 +20,7 @@ export {
DivFieldCell,
EmptyDiv,
NumericInputCell,
CheckBoxFieldCell
CheckBoxFieldCell,
SwitchFieldCell,
TextAreaCell,
};

View File

@@ -0,0 +1,29 @@
import React from 'react';
import { get } from 'lodash';
import { getForceWidth } from 'utils';
export function CellForceWidth({
value,
column: { forceWidthAccess },
row: { original },
}) {
const forceWidthValue = forceWidthAccess
? get(original, forceWidthAccess)
: value;
return <ForceWidth forceValue={forceWidthValue}>{value}</ForceWidth>;
}
export function ForceWidth({ children, forceValue }) {
const forceWidthValue = forceValue || children;
return (
<span
className={'force-width'}
style={{ minWidth: getForceWidth(forceWidthValue) }}
>
{children}
</span>
);
}

View File

@@ -4,9 +4,11 @@ import { If } from 'components';
import { Skeleton } from 'components';
import { useAppIntlContext } from 'components/AppIntlProvider';
import TableContext from './TableContext';
import { saveInvoke } from 'utils';
import { saveInvoke, ignoreEventFromSelectors } from 'utils';
import { isCellLoading } from './utils';
const ROW_CLICK_SELECTORS_INGORED = ['.expand-toggle', '.selection-checkbox'];
/**
* Table cell.
*/
@@ -50,6 +52,9 @@ export default function TableCell({ cell, row, index }) {
}
// Handle cell click action.
const handleCellClick = (event) => {
if (ignoreEventFromSelectors(event, ROW_CLICK_SELECTORS_INGORED)) {
return;
}
saveInvoke(onCellClick, cell, event);
};
@@ -58,7 +63,7 @@ export default function TableCell({ cell, row, index }) {
{...cell.getCellProps({
className: classNames(cell.column.className, 'td', {
'is-text-overview': cell.column.textOverview,
'clickable': cell.column.clickable,
clickable: cell.column.clickable,
'align-right': cell.column.align === 'right',
}),
onClick: handleCellClick,
@@ -83,11 +88,15 @@ export default function TableCell({ cell, row, index }) {
// to build the toggle for expanding a row
}
<If condition={cell.row.canExpand && expandable && isExpandColumn}>
<span {...getToggleRowExpandedProps({ className: 'expand-toggle' })}>
<span
{...getToggleRowExpandedProps({
className: 'expand-toggle',
})}
style={{}}
>
<span
className={classNames({
'arrow-down': isExpanded,
'arrow-right': !isExpanded,
className={classNames('expand-arrow', {
'is-expanded': isExpanded,
})}
/>
</span>

View File

@@ -3,7 +3,7 @@ import { Checkbox } from '@blueprintjs/core';
export default function TableIndeterminateCheckboxRow({ row }) {
return (
<div>
<div class="selection-checkbox">
<Checkbox {...row.getToggleRowSelectedProps()} />
</div>
);

View File

@@ -14,12 +14,15 @@ export default function TablePagination() {
pageCount,
state: { pageIndex, pageSize },
},
props: { pagination, loading, onPaginationChange },
props: { pagination, loading, onPaginationChange, hidePaginationNoPages },
} = useContext(TableContext);
const triggerOnPaginationChange = useCallback((payload) => {
saveInvoke(onPaginationChange, payload)
}, [onPaginationChange]);
const triggerOnPaginationChange = useCallback(
(payload) => {
saveInvoke(onPaginationChange, payload);
},
[onPaginationChange],
);
// Handles the page changing.
const handlePageChange = useCallback(
@@ -45,8 +48,14 @@ export default function TablePagination() {
[gotoPage, setPageSize, triggerOnPaginationChange],
);
// Detarmines when display the pagination.
const showPagination =
pagination &&
((hidePaginationNoPages && pageCount > 1) || !hidePaginationNoPages) &&
!loading;
return (
<If condition={pagination && !loading}>
showPagination && (
<Pagination
currentPage={pageIndex + 1}
total={pageSize * pageCount}
@@ -54,6 +63,6 @@ export default function TablePagination() {
onPageChange={handlePageChange}
onPageSizeChange={handlePageSizeChange}
/>
</If>
)
);
}

View File

@@ -1,5 +1,5 @@
import React, { useContext } from 'react';
import classNames from 'classnames';
import clsx from 'classnames';
import { ScrollSync } from 'react-scroll-sync';
import TableContext from './TableContext';
@@ -9,23 +9,35 @@ import TableContext from './TableContext';
export default function TableWrapper({ children }) {
const {
table: { getTableProps },
props: { sticky, pagination, loading, expandable, virtualizedRows, className },
props: {
sticky,
pagination,
loading,
expandable,
virtualizedRows,
className,
styleName,
size,
},
} = useContext(TableContext);
return (
<div
className={classNames('bigcapital-datatable', className, {
className={clsx('bigcapital-datatable', className, {
'has-sticky': sticky,
'has-pagination': pagination,
'is-expandable': expandable,
'is-loading': loading,
'has-virtualized-rows': virtualizedRows,
[`table--${styleName}`]: styleName,
})}
>
<ScrollSync>
<div
{...getTableProps({ style: { minWidth: 'none' } })}
className="table"
className={clsx('table', {
[`table-size--${size}`]: size,
})}
>
{children}
</div>

View File

@@ -0,0 +1,4 @@
export * from './CellForceWidth';

View File

@@ -17,6 +17,7 @@ const useDetailsMenuContext = () => React.useContext(DetailsMenuContext);
export function DetailsMenu({
children,
direction = DIRECTION.VERTICAL,
textAlign,
minLabelSize,
className,
}) {
@@ -27,6 +28,7 @@ export function DetailsMenu({
{
'details-menu--vertical': direction === DIRECTION.VERTICAL,
'details-menu--horizantal': direction === DIRECTION.HORIZANTAL,
[`align-${textAlign}`]: textAlign,
},
className,
)}

View File

@@ -9,16 +9,16 @@ function DialogComponent(props) {
const { name, children, closeDialog, onClose } = props;
const handleClose = (event) => {
closeDialog(name)
closeDialog(name);
onClose && onClose(event);
};
return (
<Dialog {...props} onClose={handleClose}>
{ children }
{children}
</Dialog>
);
}
export default compose(
withDialogActions,
)(DialogComponent);
const DialogRoot = compose(withDialogActions)(DialogComponent);
export { DialogRoot as Dialog };

View File

@@ -2,7 +2,7 @@ import React from 'react';
import { Spinner, Classes } from '@blueprintjs/core';
import classNames from 'classnames';
export default function DialogContent(props) {
export function DialogContent(props) {
const { isLoading, children } = props;
const loadingContent = (

View File

@@ -0,0 +1,15 @@
import React from 'react';
import styled from 'styled-components';
import { Classes } from '@blueprintjs/core';
export function DialogFooter({ children }) {
return (
<DialogFooterRoot className={Classes.DIALOG_FOOTER}>
{children}
</DialogFooterRoot>
);
}
const DialogFooterRoot = styled.div`
display: flex;
`;

View File

@@ -0,0 +1,41 @@
import React from 'react';
import styled from 'styled-components';
import { Classes } from '@blueprintjs/core';
/**
* Dialog footer actions.
* @returns {React.JSX}
*/
export function DialogFooterActions({ alignment = 'right', children }) {
return (
<DialogFooterActionsRoot
className={Classes.DIALOG_FOOTER_ACTIONS}
alignment={alignment}
>
{children}
</DialogFooterActionsRoot>
);
}
/**
* Dialog footer.
* @returns {React.JSX}
*/
export function DialogFooter({ ...props }) {
return <DialogFooterRoot {...props} />;
}
const DialogFooterRoot = styled.div`
flex: 0 0 auto;
margin: 0 20px;
`;
const DialogFooterActionsRoot = styled.div`
${(props) =>
props.alignment === 'right' ? 'margin-left: auto;' : 'margin-right: auto;'};
.bp3-button {
margin-left: 5px;
margin-left: 5px;
}
`;

View File

@@ -5,7 +5,7 @@ function LoadingContent() {
return (<div className={Classes.DIALOG_BODY}><Spinner size={30} /></div>);
}
export default function DialogSuspense({
export function DialogSuspense({
children
}) {
return (

View File

@@ -0,0 +1,7 @@
export * from './Dialog';
export * from './DialogFooterActions';
export * from './DialogSuspense';
export * from './DialogContent';
export * from './DialogFooter';

View File

@@ -17,6 +17,21 @@ import AllocateLandedCostDialog from 'containers/Dialogs/AllocateLandedCostDialo
import InvoicePdfPreviewDialog from 'containers/Dialogs/InvoicePdfPreviewDialog';
import EstimatePdfPreviewDialog from 'containers/Dialogs/EstimatePdfPreviewDialog';
import ReceiptPdfPreviewDialog from '../containers/Dialogs/ReceiptPdfPreviewDialog';
import MoneyInDialog from '../containers/Dialogs/MoneyInDialog';
import MoneyOutDialog from '../containers/Dialogs/MoneyOutDialog';
import BadDebtDialog from '../containers/Dialogs/BadDebtDialog';
import NotifyInvoiceViaSMSDialog from '../containers/Dialogs/NotifyInvoiceViaSMSDialog';
import NotifyReceiptViaSMSDialog from '../containers/Dialogs/NotifyReceiptViaSMSDialog';
import NotifyEstimateViaSMSDialog from '../containers/Dialogs/NotifyEstimateViaSMSDialog';
import NotifyPaymentReceiveViaSMSDialog from '../containers/Dialogs/NotifyPaymentReceiveViaSMSDialog';
import SMSMessageDialog from '../containers/Dialogs/SMSMessageDialog';
import RefundCreditNoteDialog from '../containers/Dialogs/RefundCreditNoteDialog';
import RefundVendorCreditDialog from '../containers/Dialogs/RefundVendorCreditDialog';
import ReconcileCreditNoteDialog from '../containers/Dialogs/ReconcileCreditNoteDialog';
import ReconcileVendorCreditDialog from '../containers/Dialogs/ReconcileVendorCreditDialog';
import LockingTransactionsDialog from '../containers/Dialogs/LockingTransactionsDialog';
import UnlockingTransactionsDialog from '../containers/Dialogs/UnlockingTransactionsDialog';
import UnlockingPartialTransactionsDialog from '../containers/Dialogs/UnlockingPartialTransactionsDialog';
/**
* Dialogs container.
@@ -40,6 +55,25 @@ export default function DialogsContainer() {
<InvoicePdfPreviewDialog dialogName={'invoice-pdf-preview'} />
<EstimatePdfPreviewDialog dialogName={'estimate-pdf-preview'} />
<ReceiptPdfPreviewDialog dialogName={'receipt-pdf-preview'} />
<MoneyInDialog dialogName={'money-in'} />
<MoneyOutDialog dialogName={'money-out'} />
<NotifyInvoiceViaSMSDialog dialogName={'notify-invoice-via-sms'} />
<NotifyReceiptViaSMSDialog dialogName={'notify-receipt-via-sms'} />
<NotifyEstimateViaSMSDialog dialogName={'notify-estimate-via-sms'} />
<NotifyPaymentReceiveViaSMSDialog dialogName={'notify-payment-via-sms'} />
<BadDebtDialog dialogName={'write-off-bad-debt'} />
<SMSMessageDialog dialogName={'sms-message-form'} />
<RefundCreditNoteDialog dialogName={'refund-credit-note'} />
<RefundVendorCreditDialog dialogName={'refund-vendor-credit'} />
<ReconcileCreditNoteDialog dialogName={'reconcile-credit-note'} />
<ReconcileVendorCreditDialog dialogName={'reconcile-vendor-credit'} />
<LockingTransactionsDialog dialogName={'locking-transactions'} />
<UnlockingTransactionsDialog dialogName={'unlocking-transactions'} />
<UnlockingPartialTransactionsDialog
dialogName={'unlocking-partial-transactions'}
/>
</div>
);
}

View File

@@ -1,5 +1,6 @@
import React from 'react';
import ListSelect from "./ListSelect";
import intl from 'react-intl-universal';
import ListSelect from './ListSelect';
export default function DisplayNameList({
salutation,
@@ -9,25 +10,32 @@ export default function DisplayNameList({
...restProps
}) {
const formats = [
{ format: '{1} {2} {3}', values: [salutation, firstName, lastName], required: [1] },
{
format: '{1} {2} {3}',
values: [salutation, firstName, lastName],
required: [1],
},
{ format: '{1} {2}', values: [firstName, lastName], required: [] },
{ format: '{1}, {2}', values: [firstName, lastName], required: [1, 2] },
{ format: '{1}', values: [company], required: [1] }
{ format: '{1}', values: [company], required: [1] },
];
const formatOptions = formats
.filter((format) => !format.values.some((value, index) => {
return !value && format.required.indexOf(index + 1) !== -1;
}))
.filter(
(format) =>
!format.values.some((value, index) => {
return !value && format.required.indexOf(index + 1) !== -1;
}),
)
.map((formatOption) => {
const { format, values } = formatOption;
let label = format;
values.forEach((value, index) => {
const replaceWith = (value || '');
const replaceWith = value || '';
label = label.replace(`{${index + 1}}`, replaceWith).trim();
});
return { label: label.replace(/\s+/g, " ") };
return { label: label.replace(/\s+/g, ' ') };
});
return (
@@ -35,9 +43,9 @@ export default function DisplayNameList({
items={formatOptions}
selectedItemProp={'label'}
textProp={'label'}
defaultText={'Select display name as'}
defaultText={intl.get('select_display_name_as')}
filterable={false}
{ ...restProps }
{...restProps}
/>
);
}
}

View File

@@ -3,6 +3,7 @@ import { Position, Drawer } from '@blueprintjs/core';
import 'style/components/Drawer.scss';
import { DrawerProvider } from './DrawerProvider';
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { compose } from 'utils';
@@ -27,7 +28,7 @@ function DrawerComponent(props) {
portalClassName={'drawer-portal'}
{...props}
>
{children}
<DrawerProvider {...props}>{children}</DrawerProvider>
</Drawer>
);
}

View File

@@ -0,0 +1,12 @@
import React from 'react';
import styled from 'styled-components';
import DashboardActionsBar from 'components/Dashboard/DashboardActionsBar';
export function DrawerActionsBar({ ...props }) {
return <DrawerActionsBarRoot {...props} />;
}
const DrawerActionsBarRoot = styled(DashboardActionsBar)`
border-bottom: 1px solid #d9d9da;
`;

View File

@@ -1,15 +1,54 @@
import React from 'react';
import { Tabs } from '@blueprintjs/core';
import styled from 'styled-components';
/**
* Drawer main tabs.
*/
export function DrawerMainTabs({ children, ...restProps }) {
return (
<div class="drawer__main-tabs">
<DrawerMainTabsRoot>
<Tabs animate={true} large={true} {...restProps}>
{children}
</Tabs>
</div>
</DrawerMainTabsRoot>
);
}
const DrawerMainTabsRoot = styled.div`
.bp3-tabs {
.bp3-tab-list {
position: relative;
background-color: #fff;
padding: 0 15px;
border-bottom: 2px solid #e1e2e8;
> *:not(:last-child) {
margin-right: 25px;
}
&.bp3-large > .bp3-tab {
font-size: 15px;
color: #7f8596;
margin: 0 1rem;
&[aria-selected='true'],
&:not([aria-disabled='true']):hover {
color: #0052cc;
}
}
.bp3-tab-indicator-wrapper .bp3-tab-indicator {
height: 2px;
bottom: -2px;
}
}
.bp3-tab-panel {
margin-top: 0;
.card {
margin: 15px;
}
}
}
`;

View File

@@ -0,0 +1,16 @@
import React, { createContext, useContext } from 'react';
const DrawerContext = createContext();
/**
* Account form provider.
*/
function DrawerProvider({ ...props }) {
const provider = { ...props };
return <DrawerContext.Provider value={provider} {...props} />;
}
const useDrawerContext = () => useContext(DrawerContext);
export { DrawerProvider, useDrawerContext };

View File

@@ -13,3 +13,5 @@ export function DrawerLoading({ loading, mount = false, children }) {
export function DrawerBody({ children }) {
return <div className={Classes.DRAWER_BODY}>{children}</div>;
}
export * from './DrawerActionsBar';

View File

@@ -13,6 +13,14 @@ import ItemDetailDrawer from '../containers/Drawers/ItemDetailDrawer';
import CustomerDetailsDrawer from '../containers/Drawers/CustomerDetailsDrawer';
import VendorDetailsDrawer from '../containers/Drawers/VendorDetailsDrawer';
import InventoryAdjustmentDetailDrawer from '../containers/Drawers/InventoryAdjustmentDetailDrawer';
import CashflowTransactionDetailDrawer from '../containers/Drawers/CashflowTransactionDetailDrawer';
import QuickCreateCustomerDrawer from '../containers/Drawers/QuickCreateCustomerDrawer';
import QuickCreateItemDrawer from '../containers/Drawers/QuickCreateItemDrawer';
import QuickWriteVendorDrawer from '../containers/Drawers/QuickWriteVendorDrawer';
import CreditNoteDetailDrawer from '../containers/Drawers/CreditNoteDetailDrawer';
import VendorCreditDetailDrawer from '../containers/Drawers/VendorCreditDetailDrawer';
import RefundCreditNoteDetailDrawer from '../containers/Drawers/RefundCreditNoteDetailDrawer';
import RefundVendorCreditDetailDrawer from '../containers/Drawers/RefundVendorCreditDetailDrawer';
import { DRAWERS } from 'common/drawers';
@@ -37,6 +45,20 @@ export default function DrawersContainer() {
<InventoryAdjustmentDetailDrawer
name={DRAWERS.INVENTORY_ADJUSTMENT_DRAWER}
/>
<CashflowTransactionDetailDrawer
name={DRAWERS.CASHFLOW_TRNASACTION_DRAWER}
/>
<QuickCreateCustomerDrawer name={DRAWERS.QUICK_CREATE_CUSTOMER} />
<QuickCreateItemDrawer name={DRAWERS.QUICK_CREATE_ITEM} />
<QuickWriteVendorDrawer name={DRAWERS.QUICK_WRITE_VENDOR} />
<CreditNoteDetailDrawer name={DRAWERS.CREDIT_NOTE_DETAIL_DRAWER} />
<VendorCreditDetailDrawer name={DRAWERS.VENDOR_CREDIT_DETAIL_DRAWER} />
<RefundCreditNoteDetailDrawer
name={DRAWERS.REFUND_CREDIT_NOTE_DETAIL_DRAWER}
/>
<RefundVendorCreditDetailDrawer
name={DRAWERS.REFUND_VENDOR_CREDIT_DETAIL_DRAWER}
/>
</div>
);
}

View File

@@ -1,7 +1,7 @@
import intl from 'react-intl-universal';
export function FormattedMessage({ id }) {
return intl.get(id);
export function FormattedMessage({ id, values }) {
return intl.get(id, values);
}
export function FormattedHTMLMessage({ ...args }) {

View File

@@ -0,0 +1,14 @@
import { useDeepCompareEffect } from 'hooks/utils';
export function FormikObserver({ onChange, values }) {
useDeepCompareEffect(() => {
onChange(values);
}, [values]);
return null;
}
FormikObserver.defaultProps = {
onChange: () => null,
};

View File

@@ -1 +1,2 @@
export * from './FormObserver';
export * from './FormObserver';
export * from './FormikObserver';

View File

@@ -6,7 +6,6 @@ import { compose } from 'utils';
import withAuthentication from 'containers/Authentication/withAuthentication';
import withOrganization from 'containers/Organization/withOrganization';
function EnsureOrganizationIsReady({
// #ownProps
children,
@@ -15,10 +14,10 @@ function EnsureOrganizationIsReady({
// #withOrganizationByOrgId
isOrganizationReady,
}) {
return (isOrganizationReady) ? children : (
<Redirect
to={{ pathname: redirectTo }}
/>
return isOrganizationReady ? (
children
) : (
<Redirect to={{ pathname: redirectTo }} />
);
}
@@ -28,4 +27,4 @@ export default compose(
organizationId: props.currentOrganizationId,
})),
withOrganization(({ isOrganizationReady }) => ({ isOrganizationReady })),
)(EnsureOrganizationIsReady);
)(EnsureOrganizationIsReady);

View File

@@ -0,0 +1,26 @@
import React from 'react';
import { useIntersectionObserver } from 'hooks/utils';
/**
* Intersection observer.
*/
export function IntersectionObserver({ onIntersect }) {
const loadMoreButtonRef = React.useRef();
useIntersectionObserver({
// enabled: !isItemsLoading && !isResourceLoading,
target: loadMoreButtonRef,
onIntersect: () => {
onIntersect && onIntersect();
},
});
return (
<div
ref={loadMoreButtonRef}
style={{ opacity: 0, height: 0, width: 0, padding: 0, margin: 0 }}
>
Load Newer
</div>
);
}

View File

@@ -1,13 +1,68 @@
import React, { useState, useCallback, useEffect, useMemo } from 'react';
import { MenuItem } from '@blueprintjs/core';
import classNames from 'classnames';
import { CLASSES } from 'common/classes';
import { Suggest } from '@blueprintjs/select';
import classNames from 'classnames';
import * as R from 'ramda';
import intl from 'react-intl-universal';
import { CLASSES } from 'common/classes';
import { FormattedMessage as T } from 'components';
export default function ItemsSuggestField({
import withDrawerActions from 'containers/Drawer/withDrawerActions';
import { DRAWERS } from 'common/drawers';
// Creates a new item from query.
const createNewItemFromQuery = (name) => {
return {
name,
};
};
// Handle quick create new customer.
const createNewItemRenderer = (query, active, handleClick) => {
return (
<MenuItem
icon="add"
text={intl.get('list.create', { value: `"${query}"` })}
active={active}
shouldDismissPopover={false}
onClick={handleClick}
/>
);
};
// Item renderer.
const itemRenderer = (item, { modifiers, handleClick }) => (
<MenuItem
key={item.id}
text={item.name}
label={item.code}
onClick={handleClick}
/>
);
// Filters items.
const filterItemsPredicater = (query, item, _index, exactMatch) => {
const normalizedTitle = item.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return `${normalizedTitle} ${item.code}`.indexOf(normalizedQuery) >= 0;
}
};
// Handle input value renderer.
const handleInputValueRenderer = (inputValue) => {
if (inputValue) {
return inputValue.name.toString();
}
return '';
};
function ItemsSuggestField({
items,
initialItemId,
selectedItemId,
@@ -18,6 +73,10 @@ export default function ItemsSuggestField({
sellable = false,
purchasable = false,
popoverFill = false,
allowCreate = true,
openDrawer,
...suggestProps
}) {
// Filters items based on filter props.
@@ -36,28 +95,23 @@ export default function ItemsSuggestField({
// Find initial item object.
const initialItem = useMemo(
() => filteredItems.some((a) => a.id === initialItemId),
[initialItemId],
[initialItemId, filteredItems],
);
const [selectedItem, setSelectedItem] = useState(initialItem || null);
const onItemSelect = useCallback(
(item) => {
setSelectedItem({ ...item });
onItemSelected && onItemSelected(item);
if (item.id) {
setSelectedItem({ ...item });
onItemSelected && onItemSelected(item);
} else {
openDrawer(DRAWERS.QUICK_CREATE_ITEM);
}
},
[setSelectedItem, onItemSelected],
[setSelectedItem, onItemSelected, openDrawer],
);
const itemRenderer = useCallback((item, { modifiers, handleClick }) => (
<MenuItem
key={item.id}
text={item.name}
label={item.code}
onClick={handleClick}
/>
));
useEffect(() => {
if (typeof selectedItemId !== 'undefined') {
const item = selectedItemId
@@ -67,27 +121,12 @@ export default function ItemsSuggestField({
}
}, [selectedItemId, filteredItems, setSelectedItem]);
const handleInputValueRenderer = (inputValue) => {
if (inputValue) {
return inputValue.name.toString();
}
return '';
};
// Maybe inject create new item props to suggest component.
const maybeCreateNewItemRenderer = allowCreate ? createNewItemRenderer : null;
const maybeCreateNewItemFromQuery = allowCreate
? createNewItemFromQuery
: null;
// Filters items.
const filterItemsPredicater = useCallback(
(query, item, _index, exactMatch) => {
const normalizedTitle = item.name.toLowerCase();
const normalizedQuery = query.toLowerCase();
if (exactMatch) {
return normalizedTitle === normalizedQuery;
} else {
return `${normalizedTitle} ${item.code}`.indexOf(normalizedQuery) >= 0;
}
},
[],
);
return (
<Suggest
items={filteredItems}
@@ -104,7 +143,12 @@ export default function ItemsSuggestField({
className={classNames(CLASSES.FORM_GROUP_LIST_SELECT, {
[CLASSES.SELECT_LIST_FILL_POPOVER]: popoverFill,
})}
createNewItemRenderer={maybeCreateNewItemRenderer}
createNewItemFromQuery={maybeCreateNewItemFromQuery}
createNewItemPosition={'top'}
{...suggestProps}
/>
);
}
export default R.compose(withDrawerActions)(ItemsSuggestField);

View File

@@ -0,0 +1,36 @@
import React from 'react';
import {
Button,
Popover,
PopoverInteractionKind,
Position,
MenuItem,
Menu,
} from '@blueprintjs/core';
import { Icon, FormattedMessage as T } from 'components';
function MoreMenuItems({ payload: { onNotifyViaSMS } }) {
return (
<Popover
minimal={true}
content={
<Menu>
<MenuItem
onClick={onNotifyViaSMS}
text={<T id={'notify_via_sms.dialog.notify_via_sms'} />}
/>
</Menu>
}
interactionKind={PopoverInteractionKind.CLICK}
position={Position.BOTTOM_LEFT}
modifiers={{
offset: { offset: '0, 4' },
}}
>
<Button icon={<Icon icon="more-vert" iconSize={16} />} minimal={true} />
</Popover>
);
}
export default MoreMenuItems;

Some files were not shown because too many files have changed in this diff Show More