x25 3.0.0 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Account/Load.js +75 -0
- package/Account/actions.js +15 -0
- package/Account/index.js +20 -0
- package/Account/reducer.js +122 -0
- package/Account/request.js +44 -0
- package/Async/InitModule.js +190 -0
- package/Async/RouteLoading.js +64 -0
- package/Async/SimulatedException.js +44 -0
- package/Async/index.js +95 -0
- package/Async/types.js +1 -0
- package/Company/Load.js +82 -0
- package/Company/actions.js +15 -0
- package/Company/index.js +20 -0
- package/Company/reducer.js +165 -0
- package/Company/request.js +36 -0
- package/Company/util.js +10 -0
- package/Header/AccountOptionsContainer.js +144 -0
- package/Header/AdminSelectCompany.js +109 -0
- package/Header/ClientSelectCompany.js +104 -0
- package/Header/Header.js +127 -0
- package/Header/HeaderContainer.js +39 -0
- package/Header/Logo.js +30 -0
- package/Header/LogoutButton.js +39 -0
- package/Header/index.js +19 -0
- package/Header/request.js +26 -0
- package/Header/types.js +1 -0
- package/Header/util.js +58 -0
- package/Inputs/Business/BankAccount.js +48 -0
- package/Inputs/Business/BankName.js +49 -0
- package/Inputs/Business/CifField.js +112 -0
- package/Inputs/Business/CifFieldContainer.js +157 -0
- package/Inputs/Business/Email.js +37 -0
- package/Inputs/Business/NidField.js +91 -0
- package/Inputs/Business/Phone.js +37 -0
- package/Inputs/Business/index.js +34 -0
- package/Inputs/Business/request.js +39 -0
- package/Inputs/CaptchaBox.js +151 -0
- package/Inputs/DateInput.js +172 -0
- package/Inputs/DateTemplate.js +200 -0
- package/Inputs/DelayInputChange.js +135 -0
- package/Inputs/FocusTemplate.js +47 -0
- package/Inputs/InputTemplate.js +78 -0
- package/Inputs/LabelTemplate.js +59 -0
- package/Inputs/NumericInput.js +139 -0
- package/Inputs/NumericTemplate.js +148 -0
- package/Inputs/Selects/County.js +29 -0
- package/Inputs/Selects/Custom.js +56 -0
- package/Inputs/Selects/Simple.js +75 -0
- package/Inputs/Selects/index.js +52 -0
- package/Inputs/SimpleInput.js +42 -0
- package/Inputs/SimpleTextarea.js +47 -0
- package/Inputs/TextareaTemplate.js +55 -0
- package/Inputs/Tooltip.js +82 -0
- package/Inputs/index.js +185 -0
- package/Messages/Error.js +106 -0
- package/Messages/Loading.js +68 -0
- package/Messages/index.js +29 -0
- package/Modal/Delete.js +240 -0
- package/Modal/Root.js +81 -0
- package/Modal/SimpleModal.js +57 -0
- package/Modal/actions.js +10 -0
- package/Modal/getComponent.js +42 -0
- package/Modal/index.js +22 -0
- package/Modal/reducer.js +53 -0
- package/Modal/types.js +7 -0
- package/Modal/util.js +17 -0
- package/Payment/EstimatePrice/Description.js +92 -0
- package/Payment/EstimatePrice/PayBox.js +220 -0
- package/Payment/EstimatePrice/index.js +92 -0
- package/Payment/EstimatePrice/util.js +21 -0
- package/Payment/MobilpayForm.js +86 -0
- package/Payment/Modal/BankTransfer.js +233 -0
- package/Payment/Modal/CompanyValability.js +28 -0
- package/Payment/Modal/DoneForm.js +222 -0
- package/Payment/Modal/PaymentDone.js +53 -0
- package/Payment/Modal/index.js +27 -0
- package/Payment/actions.js +23 -0
- package/{src/Payment → Payment}/codes.js +19 -16
- package/Payment/index.js +141 -0
- package/Payment/request.js +49 -0
- package/Payment/types.js +1 -0
- package/Payment/util.js +50 -0
- package/Payment/validate.js +23 -0
- package/Sidebar.js +156 -0
- package/Things.js +53 -0
- package/actions.js +73 -0
- package/config.js +10 -0
- package/dev/ErrorBoundary.js +109 -0
- package/dev/TheError.js +113 -0
- package/dev/index.js +132 -0
- package/dev/types.js +1 -0
- package/package.json +13 -13
- package/prod/SentryErrorBoundary.js +150 -0
- package/reducer/captchas.js +51 -0
- package/reducer/counties.js +57 -0
- package/reducer/index.js +38 -0
- package/reducer/module.js +48 -0
- package/style/index.css +1 -0
- package/style/sidebar.css +1 -0
- package/types.js +1 -0
- package/utility/calendar.js +45 -0
- package/utility/date.js +111 -0
- package/utility/index.js +125 -0
- package/utility/language.js +20 -0
- package/utility/mql.js +6 -0
- package/utility/normalize-test.js +54 -0
- package/utility/normalize.js +108 -0
- package/utility/numbers.js +93 -0
- package/utility/numeric.js +103 -0
- package/utility/others.js +142 -0
- package/utility/strings-test.js +216 -0
- package/utility/strings.js +85 -0
- package/utility/validation/common.js +278 -0
- package/utility/validation/index.js +110 -0
- package/utility/validation/specific.js +14 -0
- package/utility/validation/validate/bank-test.js +41 -0
- package/utility/validation/validate/bank.js +176 -0
- package/utility/validation/validate/cif-test.js +37 -0
- package/utility/validation/validate/cif.js +44 -0
- package/utility/validation/validate/cnp-test.js +68 -0
- package/utility/validation/validate/cnp.js +193 -0
- package/{src/utility → utility}/validation/validate/date.js +61 -73
- package/utility/validation/validate/email-test.js +30 -0
- package/utility/validation/validate/email.js +11 -0
- package/utility/validation/validate/index.js +65 -0
- package/.eslintignore +0 -2
- package/.eslintrc.json +0 -275
- package/.flowconfig +0 -23
- package/conf/dev.js +0 -19
- package/conf/dist.js +0 -19
- package/conf/polyfills/tempPolyfills.js +0 -7
- package/src/Account/Load.jsx +0 -79
- package/src/Account/actions.js +0 -10
- package/src/Account/index.js +0 -11
- package/src/Account/reducer.js +0 -139
- package/src/Account/request.js +0 -36
- package/src/Async/InitModule.jsx +0 -114
- package/src/Async/RouteLoading.jsx +0 -52
- package/src/Async/SimulatedException.jsx +0 -19
- package/src/Async/index.jsx +0 -75
- package/src/Async/types.js +0 -39
- package/src/Company/Load.jsx +0 -84
- package/src/Company/actions.js +0 -10
- package/src/Company/index.js +0 -11
- package/src/Company/reducer.js +0 -201
- package/src/Company/request.js +0 -30
- package/src/Company/util.js +0 -7
- package/src/Header/AccountOptionsContainer.jsx +0 -124
- package/src/Header/AdminSelectCompany.jsx +0 -101
- package/src/Header/ClientSelectCompany.jsx +0 -90
- package/src/Header/Header.jsx +0 -120
- package/src/Header/HeaderContainer.jsx +0 -30
- package/src/Header/Logo.jsx +0 -16
- package/src/Header/LogoutButton.jsx +0 -34
- package/src/Header/index.jsx +0 -9
- package/src/Header/request.js +0 -28
- package/src/Header/types.js +0 -6
- package/src/Header/util.jsx +0 -61
- package/src/Inputs/Business/BankAccount.jsx +0 -39
- package/src/Inputs/Business/BankName.jsx +0 -40
- package/src/Inputs/Business/CifField.jsx +0 -93
- package/src/Inputs/Business/CifFieldContainer.jsx +0 -142
- package/src/Inputs/Business/Email.jsx +0 -23
- package/src/Inputs/Business/NidField.jsx +0 -77
- package/src/Inputs/Business/Phone.jsx +0 -23
- package/src/Inputs/Business/index.js +0 -16
- package/src/Inputs/Business/request.js +0 -39
- package/src/Inputs/CaptchaBox.jsx +0 -131
- package/src/Inputs/DateInput.jsx +0 -188
- package/src/Inputs/DateTemplate.jsx +0 -213
- package/src/Inputs/DelayInputChange.jsx +0 -130
- package/src/Inputs/FocusTemplate.jsx +0 -41
- package/src/Inputs/InputTemplate.jsx +0 -79
- package/src/Inputs/LabelTemplate.jsx +0 -47
- package/src/Inputs/NumericInput.jsx +0 -142
- package/src/Inputs/NumericTemplate.jsx +0 -155
- package/src/Inputs/Selects/County.jsx +0 -19
- package/src/Inputs/Selects/Custom.jsx +0 -55
- package/src/Inputs/Selects/Simple.jsx +0 -73
- package/src/Inputs/Selects/index.jsx +0 -37
- package/src/Inputs/SimpleInput.jsx +0 -40
- package/src/Inputs/SimpleTextarea.jsx +0 -55
- package/src/Inputs/TextareaTemplate.jsx +0 -57
- package/src/Inputs/Tooltip.jsx +0 -61
- package/src/Inputs/index.js +0 -22
- package/src/Messages/Error.jsx +0 -83
- package/src/Messages/Loading.jsx +0 -43
- package/src/Messages/index.jsx +0 -4
- package/src/Modal/Delete.jsx +0 -237
- package/src/Modal/Root.jsx +0 -57
- package/src/Modal/SimpleModal.jsx +0 -47
- package/src/Modal/actions.js +0 -7
- package/src/Modal/getComponent.jsx +0 -32
- package/src/Modal/index.jsx +0 -12
- package/src/Modal/reducer.js +0 -40
- package/src/Modal/types.js +0 -6
- package/src/Modal/util.js +0 -15
- package/src/Payment/EstimatePrice/Description.jsx +0 -101
- package/src/Payment/EstimatePrice/PayBox.jsx +0 -173
- package/src/Payment/EstimatePrice/index.jsx +0 -63
- package/src/Payment/EstimatePrice/util.js +0 -15
- package/src/Payment/MobilpayForm.jsx +0 -77
- package/src/Payment/Modal/BankTransfer.jsx +0 -129
- package/src/Payment/Modal/CompanyValability.jsx +0 -14
- package/src/Payment/Modal/DoneForm.jsx +0 -209
- package/src/Payment/Modal/PaymentDone.jsx +0 -27
- package/src/Payment/Modal/index.js +0 -13
- package/src/Payment/actions.jsx +0 -22
- package/src/Payment/index.jsx +0 -124
- package/src/Payment/request.js +0 -50
- package/src/Payment/types.js +0 -14
- package/src/Payment/util.jsx +0 -52
- package/src/Payment/validate.js +0 -25
- package/src/Sidebar.jsx +0 -158
- package/src/Things.jsx +0 -35
- package/src/actions.js +0 -36
- package/src/config.js +0 -7
- package/src/dev/ErrorBoundary.jsx +0 -98
- package/src/dev/TheError.jsx +0 -87
- package/src/dev/index.js +0 -127
- package/src/dev/types.js +0 -10
- package/src/prod/SentryErrorBoundary.jsx +0 -98
- package/src/reducer/captchas.js +0 -44
- package/src/reducer/counties.js +0 -46
- package/src/reducer/index.js +0 -25
- package/src/reducer/module.jsx +0 -43
- package/src/style/.sass-lint.yml +0 -84
- package/src/style/.stylelintrc.json +0 -161
- package/src/style/_fancy-text.scss +0 -37
- package/src/style/_fix_bootstrap_placeholder_color.scss +0 -14
- package/src/style/_header-company.scss +0 -69
- package/src/style/_inputs.scss +0 -12
- package/src/style/_minimal.scss +0 -31
- package/src/style/_navigation.scss +0 -24
- package/src/style/_others.scss +0 -79
- package/src/style/index.scss +0 -7
- package/src/style/sidebar/_animations.scss +0 -21
- package/src/style/sidebar/_dark-theme.scss +0 -77
- package/src/style/sidebar/_scroll.scss +0 -37
- package/src/style/sidebar/_structure.scss +0 -299
- package/src/style/sidebar.scss +0 -4
- package/src/types.js +0 -31
- package/src/utility/calendar.js +0 -39
- package/src/utility/date.js +0 -100
- package/src/utility/index.js +0 -12
- package/src/utility/language.js +0 -17
- package/src/utility/mql.js +0 -3
- package/src/utility/normalize-test.js +0 -58
- package/src/utility/normalize.js +0 -119
- package/src/utility/numbers.js +0 -87
- package/src/utility/numeric.js +0 -114
- package/src/utility/others.jsx +0 -160
- package/src/utility/strings-test.js +0 -136
- package/src/utility/strings.js +0 -80
- package/src/utility/validation/common.js +0 -360
- package/src/utility/validation/index.js +0 -70
- package/src/utility/validation/specific.js +0 -9
- package/src/utility/validation/validate/bank-test.js +0 -129
- package/src/utility/validation/validate/bank.js +0 -176
- package/src/utility/validation/validate/cif-test.js +0 -105
- package/src/utility/validation/validate/cif.js +0 -44
- package/src/utility/validation/validate/cnp-test.js +0 -216
- package/src/utility/validation/validate/cnp.js +0 -261
- package/src/utility/validation/validate/email-test.js +0 -36
- package/src/utility/validation/validate/email.js +0 -6
- package/src/utility/validation/validate/index.js +0 -7
- package/webpack.config.js +0 -90
- package/x25.wiki/Account.md +0 -41
- package/x25.wiki/Company.md +0 -39
- package/x25.wiki/Header.md +0 -21
- package/x25.wiki/Home.md +0 -1
- package/x25.wiki/Inputs.md +0 -33
- package/x25.wiki/Messages.md +0 -27
- package/x25.wiki/Payment.md +0 -42
package/Header/Header.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
|
|
9
|
+
var _react2 = _interopRequireDefault(_react);
|
|
10
|
+
|
|
11
|
+
var _moment = require("moment");
|
|
12
|
+
|
|
13
|
+
var _moment2 = _interopRequireDefault(_moment);
|
|
14
|
+
|
|
15
|
+
var _reactstrap = require("reactstrap");
|
|
16
|
+
|
|
17
|
+
var _AccountOptionsContainer = require("./AccountOptionsContainer");
|
|
18
|
+
|
|
19
|
+
var _AccountOptionsContainer2 = _interopRequireDefault(_AccountOptionsContainer);
|
|
20
|
+
|
|
21
|
+
var _AdminSelectCompany = require("./AdminSelectCompany");
|
|
22
|
+
|
|
23
|
+
var _AdminSelectCompany2 = _interopRequireDefault(_AdminSelectCompany);
|
|
24
|
+
|
|
25
|
+
var _ClientSelectCompany = require("./ClientSelectCompany");
|
|
26
|
+
|
|
27
|
+
var _ClientSelectCompany2 = _interopRequireDefault(_ClientSelectCompany);
|
|
28
|
+
|
|
29
|
+
var _util = require("./util");
|
|
30
|
+
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
32
|
+
|
|
33
|
+
var monthsUntilShowNotice = 30;
|
|
34
|
+
|
|
35
|
+
var Header = function Header(_ref) {
|
|
36
|
+
var brand = _ref.brand,
|
|
37
|
+
company = _ref.company,
|
|
38
|
+
account = _ref.account,
|
|
39
|
+
isAdmin = _ref.isAdmin,
|
|
40
|
+
showPayModal = _ref.showPayModal,
|
|
41
|
+
sidebarDocked = _ref.sidebarDocked,
|
|
42
|
+
toggleNavbar = _ref.toggleNavbar,
|
|
43
|
+
showNavbar = _ref.showNavbar,
|
|
44
|
+
showSidebar = _ref.showSidebar;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
var showNoticeToPay = false;
|
|
48
|
+
|
|
49
|
+
var countDays = typeof company !== "undefined" && account.get("ID") === company.get("OwnerID");
|
|
50
|
+
|
|
51
|
+
if (countDays) {
|
|
52
|
+
var daysLeft = (0, _moment2.default)(company.get("ValabilityDate")).diff((0, _moment2.default)().endOf("day"), "days") + 1;
|
|
53
|
+
|
|
54
|
+
showNoticeToPay = daysLeft <= monthsUntilShowNotice;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return _react2.default.createElement(
|
|
58
|
+
_react2.default.Fragment,
|
|
59
|
+
null,
|
|
60
|
+
_react2.default.createElement(
|
|
61
|
+
"nav",
|
|
62
|
+
{ className: "d-print-none navbar navbar-expand-md navbar-dark bg-dark" },
|
|
63
|
+
sidebarDocked ? null : _react2.default.createElement(
|
|
64
|
+
"button",
|
|
65
|
+
{
|
|
66
|
+
"aria-label": "Comut\u0103 meniul",
|
|
67
|
+
className: "btn btn-outline-secondary btn-sm me-2",
|
|
68
|
+
onClick: showSidebar,
|
|
69
|
+
type: "button" },
|
|
70
|
+
_react2.default.createElement("i", { className: "fa fa-bars" })
|
|
71
|
+
),
|
|
72
|
+
_react2.default.createElement(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: "brand-wrapper truncate text-left d-inline-block text-light",
|
|
76
|
+
onClick: (0, _util.isSmall)() ? toggleNavbar : null },
|
|
77
|
+
_react2.default.createElement(
|
|
78
|
+
"a",
|
|
79
|
+
{ className: "navbar-brand" },
|
|
80
|
+
brand
|
|
81
|
+
)
|
|
82
|
+
),
|
|
83
|
+
_react2.default.createElement(
|
|
84
|
+
"button",
|
|
85
|
+
{
|
|
86
|
+
className: "mt-3 text-dark navbar-toggler",
|
|
87
|
+
onClick: toggleNavbar,
|
|
88
|
+
type: "button" },
|
|
89
|
+
showNavbar ? _react2.default.createElement("i", { className: "fa fa-arrow-up text-light" }) : _react2.default.createElement("i", { className: "fa fa-arrow-down text-light" })
|
|
90
|
+
),
|
|
91
|
+
_react2.default.createElement(
|
|
92
|
+
_reactstrap.Collapse,
|
|
93
|
+
{ isOpen: showNavbar, navbar: true },
|
|
94
|
+
_react2.default.createElement(
|
|
95
|
+
"ul",
|
|
96
|
+
{ className: "ms-auto navbar-nav" },
|
|
97
|
+
_react2.default.createElement(
|
|
98
|
+
"a",
|
|
99
|
+
{ className: "nav-link", href: "/settings/companies" },
|
|
100
|
+
"Setări"
|
|
101
|
+
),
|
|
102
|
+
isAdmin ? _react2.default.createElement(_AdminSelectCompany2.default, { toggleNavbar: toggleNavbar }) : _react2.default.createElement(_ClientSelectCompany2.default, { toggleNavbar: toggleNavbar }),
|
|
103
|
+
_react2.default.createElement(
|
|
104
|
+
"div",
|
|
105
|
+
{ className: "d-inline-block" },
|
|
106
|
+
_react2.default.createElement(_AccountOptionsContainer2.default, { accountName: account.get("Name") })
|
|
107
|
+
)
|
|
108
|
+
)
|
|
109
|
+
)
|
|
110
|
+
),
|
|
111
|
+
typeof company === "undefined" || company.size === 0 ? null : showNoticeToPay ? _react2.default.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{ className: "alert alert-warning m-2" },
|
|
114
|
+
"Abonamentul la serviciile online Sidework va expira " + (0, _moment2.default)(company.get("ValabilityDate")).endOf("day").fromNow() + ". ",
|
|
115
|
+
_react2.default.createElement(
|
|
116
|
+
"button",
|
|
117
|
+
{
|
|
118
|
+
className: "btn btn-primary",
|
|
119
|
+
onClick: showPayModal(company.get("ID")),
|
|
120
|
+
type: "button" },
|
|
121
|
+
"Reînnoiește abonamentul"
|
|
122
|
+
)
|
|
123
|
+
) : null
|
|
124
|
+
);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
exports.default = Header;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _reactRedux = require("react-redux");
|
|
8
|
+
|
|
9
|
+
var _Header = require("./Header");
|
|
10
|
+
|
|
11
|
+
var _Header2 = _interopRequireDefault(_Header);
|
|
12
|
+
|
|
13
|
+
var _reducer = require("../Account/reducer");
|
|
14
|
+
|
|
15
|
+
var _utility = require("../utility");
|
|
16
|
+
|
|
17
|
+
var _actions = require("../Payment/actions");
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
var mapStateToProps = function mapStateToProps(state) {
|
|
22
|
+
var data = _reducer.selectors.getCurrentAccount(state);
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
account: data,
|
|
26
|
+
isAdmin: (0, _utility.isAdministratorAccount)(data.get("Type"))
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
30
|
+
return {
|
|
31
|
+
showPayModal: function showPayModal(id) {
|
|
32
|
+
return function () {
|
|
33
|
+
dispatch((0, _actions.estimateCompanyPriceModal)(id));
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_Header2.default);
|
package/Header/Logo.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
|
|
9
|
+
var _react2 = _interopRequireDefault(_react);
|
|
10
|
+
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
|
|
13
|
+
var SideworkLogo = function SideworkLogo() {
|
|
14
|
+
return _react2.default.createElement(
|
|
15
|
+
"div",
|
|
16
|
+
{ className: "sidework-logo" },
|
|
17
|
+
_react2.default.createElement(
|
|
18
|
+
"span",
|
|
19
|
+
{ className: "first-char" },
|
|
20
|
+
"S"
|
|
21
|
+
),
|
|
22
|
+
_react2.default.createElement(
|
|
23
|
+
"span",
|
|
24
|
+
{ className: "color" },
|
|
25
|
+
"idework"
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.default = SideworkLogo;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
|
|
9
|
+
var _react2 = _interopRequireDefault(_react);
|
|
10
|
+
|
|
11
|
+
var _Messages = require("../Messages");
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
var LogoutButton = function LogoutButton(_ref) {
|
|
16
|
+
var readyToLogout = _ref.readyToLogout,
|
|
17
|
+
logoutAccount = _ref.logoutAccount;
|
|
18
|
+
return _react2.default.createElement(
|
|
19
|
+
"button",
|
|
20
|
+
{
|
|
21
|
+
className: "dropdown-item",
|
|
22
|
+
disabled: !readyToLogout,
|
|
23
|
+
id: "login-button",
|
|
24
|
+
onClick: logoutAccount,
|
|
25
|
+
type: "button" },
|
|
26
|
+
readyToLogout ? _react2.default.createElement(
|
|
27
|
+
"span",
|
|
28
|
+
null,
|
|
29
|
+
_react2.default.createElement("i", { className: "fa fa-sign-out" }),
|
|
30
|
+
" Deconectează-mă"
|
|
31
|
+
) : _react2.default.createElement(
|
|
32
|
+
"span",
|
|
33
|
+
null,
|
|
34
|
+
_react2.default.createElement(_Messages.LoadingMessage, { message: "A\u0219teapt\u0103...", sm: true })
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
exports.default = LogoutButton;
|
package/Header/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SideworkLogo = exports.Header = undefined;
|
|
7
|
+
|
|
8
|
+
var _HeaderContainer = require("./HeaderContainer");
|
|
9
|
+
|
|
10
|
+
var _HeaderContainer2 = _interopRequireDefault(_HeaderContainer);
|
|
11
|
+
|
|
12
|
+
var _Logo = require("./Logo");
|
|
13
|
+
|
|
14
|
+
var _Logo2 = _interopRequireDefault(_Logo);
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
exports.Header = _HeaderContainer2.default;
|
|
19
|
+
exports.SideworkLogo = _Logo2.default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.logOut = exports.fetchSuggestions = undefined;
|
|
7
|
+
|
|
8
|
+
var _superagent = require("superagent");
|
|
9
|
+
|
|
10
|
+
var _superagent2 = _interopRequireDefault(_superagent);
|
|
11
|
+
|
|
12
|
+
var _utility = require("../utility");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
var fetchSuggestions = exports.fetchSuggestions = function fetchSuggestions(search) {
|
|
17
|
+
return new Promise(function (resolve, reject) {
|
|
18
|
+
return _superagent2.default.get("/api/account/get-companies").type("form").set("Accept", "application/json").query({ search: search }).end((0, _utility.withPromiseCallback)(resolve, reject));
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var logOut = exports.logOut = function logOut() {
|
|
23
|
+
return new Promise(function (resolve, reject) {
|
|
24
|
+
return _superagent2.default.post("/api/account/logout").type("form").end((0, _utility.withPromiseCallback)(resolve, reject));
|
|
25
|
+
});
|
|
26
|
+
};
|
package/Header/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/Header/util.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getDefaultCompanyRoute = exports.wrapperClassname = exports.isSmall = exports.Option = exports.loadingMessage = exports.noOptionsMessage = undefined;
|
|
7
|
+
|
|
8
|
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
|
9
|
+
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
|
|
12
|
+
var _react2 = _interopRequireDefault(_react);
|
|
13
|
+
|
|
14
|
+
var _reactSelect = require("react-select");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
var noOptionsMessage = exports.noOptionsMessage = function noOptionsMessage() {
|
|
19
|
+
return "Nu există opțiuni";
|
|
20
|
+
};
|
|
21
|
+
var loadingMessage = exports.loadingMessage = function loadingMessage() {
|
|
22
|
+
return "Se încarcă...";
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var Option = exports.Option = function Option(props) {
|
|
26
|
+
return _react2.default.createElement(
|
|
27
|
+
"div",
|
|
28
|
+
{ className: "text-truncate small", title: props.label },
|
|
29
|
+
_react2.default.createElement(_reactSelect.components.Option, props)
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var isSmall = exports.isSmall = function isSmall() {
|
|
34
|
+
return window.matchMedia("(max-width: 780px)").matches;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var wrapperClassname = exports.wrapperClassname = "search-bar me-md-1 mb-2 md-mb-0 d-block d-md-inline-block";
|
|
38
|
+
|
|
39
|
+
var getDefaultCompanyRoute = exports.getDefaultCompanyRoute = function getDefaultCompanyRoute(_ref) {
|
|
40
|
+
var Modules = _ref.Modules,
|
|
41
|
+
ID = _ref.ID;
|
|
42
|
+
|
|
43
|
+
var getModule = function getModule() {
|
|
44
|
+
var modules = String(Modules),
|
|
45
|
+
parts = modules.split(",");
|
|
46
|
+
|
|
47
|
+
if (modules === "") {
|
|
48
|
+
return "info";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var _parts = _slicedToArray(parts, 1),
|
|
52
|
+
first = _parts[0];
|
|
53
|
+
|
|
54
|
+
return first + "/list";
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
return "/company/" + ID + "/" + getModule();
|
|
58
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
|
|
11
|
+
var _react2 = _interopRequireDefault(_react);
|
|
12
|
+
|
|
13
|
+
var _classnames = require("classnames");
|
|
14
|
+
|
|
15
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
var BankAccount = function BankAccount(_ref) {
|
|
20
|
+
var input = _ref.input,
|
|
21
|
+
_ref$meta = _ref.meta,
|
|
22
|
+
error = _ref$meta.error,
|
|
23
|
+
submitting = _ref$meta.submitting,
|
|
24
|
+
touched = _ref$meta.touched;
|
|
25
|
+
return _react2.default.createElement(
|
|
26
|
+
"div",
|
|
27
|
+
{ className: (0, _classnames2.default)("input-group", { "is-invalid": touched && error }) },
|
|
28
|
+
_react2.default.createElement(
|
|
29
|
+
"div",
|
|
30
|
+
{ className: "input-group-prepend" },
|
|
31
|
+
_react2.default.createElement(
|
|
32
|
+
"span",
|
|
33
|
+
{ className: "input-group-text" },
|
|
34
|
+
"Contul"
|
|
35
|
+
)
|
|
36
|
+
),
|
|
37
|
+
_react2.default.createElement("input", _extends({}, input, {
|
|
38
|
+
"aria-label": "Contul bancar",
|
|
39
|
+
className: (0, _classnames2.default)("form-control", { "is-invalid": touched && error }),
|
|
40
|
+
disabled: submitting,
|
|
41
|
+
id: input.name,
|
|
42
|
+
name: input.name,
|
|
43
|
+
placeholder: "ex. RO14 CECE GR02 01RO N026 9171"
|
|
44
|
+
}))
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.default = BankAccount;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
|
|
11
|
+
var _react2 = _interopRequireDefault(_react);
|
|
12
|
+
|
|
13
|
+
var _classnames = require("classnames");
|
|
14
|
+
|
|
15
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
var BankNameField = function BankNameField(_ref) {
|
|
20
|
+
var input = _ref.input,
|
|
21
|
+
_ref$meta = _ref.meta,
|
|
22
|
+
error = _ref$meta.error,
|
|
23
|
+
submitting = _ref$meta.submitting,
|
|
24
|
+
touched = _ref$meta.touched;
|
|
25
|
+
return _react2.default.createElement(
|
|
26
|
+
"div",
|
|
27
|
+
{ className: (0, _classnames2.default)("input-group", { "is-invalid": touched && error }) },
|
|
28
|
+
_react2.default.createElement(
|
|
29
|
+
"div",
|
|
30
|
+
{ className: "input-group-prepend" },
|
|
31
|
+
_react2.default.createElement(
|
|
32
|
+
"span",
|
|
33
|
+
{ className: "input-group-text" },
|
|
34
|
+
"Denumire sau BIC"
|
|
35
|
+
)
|
|
36
|
+
),
|
|
37
|
+
_react2.default.createElement("input", _extends({}, input, {
|
|
38
|
+
"aria-label": "Denumire banc\u0103",
|
|
39
|
+
className: (0, _classnames2.default)("form-control", { "is-invalid": touched && error }),
|
|
40
|
+
disabled: submitting,
|
|
41
|
+
id: input.name,
|
|
42
|
+
name: input.name,
|
|
43
|
+
placeholder: "ex. Banca Transilvania",
|
|
44
|
+
type: "text"
|
|
45
|
+
}))
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
exports.default = BankNameField;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
8
|
+
|
|
9
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
10
|
+
|
|
11
|
+
var _react = require("react");
|
|
12
|
+
|
|
13
|
+
var _react2 = _interopRequireDefault(_react);
|
|
14
|
+
|
|
15
|
+
var _classnames = require("classnames");
|
|
16
|
+
|
|
17
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
22
|
+
|
|
23
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
24
|
+
|
|
25
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
26
|
+
|
|
27
|
+
var CifField = function (_React$Component) {
|
|
28
|
+
_inherits(CifField, _React$Component);
|
|
29
|
+
|
|
30
|
+
function CifField() {
|
|
31
|
+
_classCallCheck(this, CifField);
|
|
32
|
+
|
|
33
|
+
return _possibleConstructorReturn(this, (CifField.__proto__ || Object.getPrototypeOf(CifField)).apply(this, arguments));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
_createClass(CifField, [{
|
|
37
|
+
key: "shouldComponentUpdate",
|
|
38
|
+
value: function shouldComponentUpdate(nextProps) {
|
|
39
|
+
return this.props.input !== nextProps.input || this.props.meta.submitting !== nextProps.meta.submitting || this.props.meta.touched !== nextProps.meta.touched || this.props.meta.error !== nextProps.meta.error;
|
|
40
|
+
}
|
|
41
|
+
}, {
|
|
42
|
+
key: "render",
|
|
43
|
+
value: function render() {
|
|
44
|
+
var _props = this.props,
|
|
45
|
+
input = _props.input,
|
|
46
|
+
findDetailsByCif = _props.findDetailsByCif,
|
|
47
|
+
_props$meta = _props.meta,
|
|
48
|
+
error = _props$meta.error,
|
|
49
|
+
submitting = _props$meta.submitting,
|
|
50
|
+
touched = _props$meta.touched,
|
|
51
|
+
handleKeyPressed = _props.handleKeyPressed,
|
|
52
|
+
onRegisterRef = _props.onRegisterRef;
|
|
53
|
+
var name = input.name;
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
return _react2.default.createElement(
|
|
57
|
+
"div",
|
|
58
|
+
{ className: "form-group row" },
|
|
59
|
+
_react2.default.createElement(
|
|
60
|
+
"label",
|
|
61
|
+
{
|
|
62
|
+
className: "\r col-md-3\r text-md-right\r form-control-label\r form-control-lg", htmlFor: name },
|
|
63
|
+
"C.I.F "
|
|
64
|
+
),
|
|
65
|
+
_react2.default.createElement(
|
|
66
|
+
"div",
|
|
67
|
+
{ className: "col-md-9 col-lg-6" },
|
|
68
|
+
_react2.default.createElement(
|
|
69
|
+
"div",
|
|
70
|
+
{ className: "input-group" },
|
|
71
|
+
_react2.default.createElement("input", _extends({}, input, {
|
|
72
|
+
"aria-label": "Cod de identificare fiscal\u0103",
|
|
73
|
+
className: (0, _classnames2.default)("form-control form-control-lg", {
|
|
74
|
+
"is-invalid": touched && error
|
|
75
|
+
}),
|
|
76
|
+
disabled: submitting,
|
|
77
|
+
id: name,
|
|
78
|
+
name: name,
|
|
79
|
+
onKeyPress: handleKeyPressed,
|
|
80
|
+
placeholder: "ex. 51584214",
|
|
81
|
+
ref: onRegisterRef,
|
|
82
|
+
type: "text"
|
|
83
|
+
})),
|
|
84
|
+
_react2.default.createElement(
|
|
85
|
+
"div",
|
|
86
|
+
{ className: "input-group-append" },
|
|
87
|
+
_react2.default.createElement(
|
|
88
|
+
"button",
|
|
89
|
+
{
|
|
90
|
+
className: "btn btn-secondary btn-lg btn-info",
|
|
91
|
+
disabled: submitting,
|
|
92
|
+
onClick: findDetailsByCif(input.value),
|
|
93
|
+
title: "Preia datele de pe Internet",
|
|
94
|
+
type: "button" },
|
|
95
|
+
_react2.default.createElement("i", { className: "fa fa-search" })
|
|
96
|
+
)
|
|
97
|
+
)
|
|
98
|
+
),
|
|
99
|
+
_react2.default.createElement(
|
|
100
|
+
"div",
|
|
101
|
+
{ className: "invalid-feedback is-valid" },
|
|
102
|
+
touched && error ? error : null
|
|
103
|
+
)
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
}]);
|
|
108
|
+
|
|
109
|
+
return CifField;
|
|
110
|
+
}(_react2.default.Component);
|
|
111
|
+
|
|
112
|
+
exports.default = CifField;
|