From 059f17e2796a1f0e16dcffd123f2ccc6af4d8dd0 Mon Sep 17 00:00:00 2001 From: Yamel Senih Date: Sun, 17 Nov 2019 04:56:42 -0400 Subject: [PATCH] This is the first pull request for ADempiere-Vue (#106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is the first commit for changes and integration with ADempiere UI, the pull request have very to long commits, here is a squash and merge, for detail refere to https://github.com/erpcya/adempiere-vue with committers: - [Yamel Senih](https://github.com/yamelsenih) - [Raúl Muñoz](https://github.com/Raul-mz) - [Edwin Betancourt](https://github.com/EdwinBetanc0urt) - [Leonel Matos](https://github.com/leonel1524) - [Elsio Sanchez](https://github.com/elsiosanchez) * add server error message (#571) * Feature/collapse avanced search (#572) * add server error message * add collasep to advanced search * bugfix load data ordered (#573) * Fix share values from panel. (#574) * Fix share values from panel. * Parsed values. * support refresh and field updata (#575) * refresh * bugfix load data ordered * minimal changes * Fix parameters to share data type date and boolean. (#576) * Change search browser. (#577) * read url parameters and load data (#578) * Fix error when search browser list. (#579) * Fix error when search browser list. * Minimal changes. * Update Dictionary and business data client version * bugfix share link with props (#580) * bugfix copy link with uuid * bugfix share link with props * Add support conditions to object list from criteria. (#581) * bugfix record navigation in left table (#582) * add export-browser (#583) * add export browser * minimal changes * wait for service * add window report * bugfix load report with link shared (#584) * bugfix copy link with uuid * bugfix share link with props * bugfix load report with link shared * Rollback support to window. (#585) * Rollback support to window. * Minimal changes. * support Mandatory Field (#586) * support Mandatory Field * delete comment * bugfix share link from avanced query (#588) * bugfix copy link with uuid * bugfix share link with props * bugfix load report with link shared * bugfix share link from avanced query * Fix optional fields showed from user. (#589) * Fix optional fields showed from user. * Remove destructuring assignment. * message error serve (#587) * message error serve * remove console * remove error code * minimal changes * bugfix change records in record navigation (#590) * bugfix record navigation in left table * bugfix change records in record navigation * support process Activity (#592) * support processActivity * minimal changes * Load one group field to advanced query. (#593) * Load one group field to advanced query. * Minimal changes. * bugfix load record with criteria method (#594) * support refrest menu contexto (#595) * Add new version from business data * Fix read only fields. (#591) * Fix read only fields. * Minimal changes. * Add all field list in panel advanced query. (#596) * fix set date with context (#597) * support logs Process Activity (#598) * support for the logs of Process Activity * support logs Process Activity * remove console.log * Update data in main panel when update list from server. (#599) * Update data in main panel when update list from server. * Update comments. * Update conditional to update main panel. * First commit to data load children. (#600) * bugfix change tag view title and rename variables (#601) * Fix add optional fields to advanced query. (#602) * Fix add optional fields to advanced query. * Add attribute to advanced query. * Fix variable name. * Fix change roles in navigation bar and view profile. (#603) * Fix send all parameters by advanced query. (#604) * bugfix close tag after process execute (#605) * bugfix load windows process without fields (#606) * clear fields when the window is closed (#607) * clear field of process * minimal changes * add report type to share link of reports (#608) * Fix context menu. (#609) * bugfix reload parameters after close SB (#610) * bugfix reload parameters after close SB * change condition * add ZoomIn ProcessActivity (#611) * add ZoomIn ProcessActivity * add parameters * Update es.js Fix Variable Name * Update index.vue Fix Variable Name * Update en.js * bugfix close window after process (#613) * bugfix close window after process * bugfix close views after execute SB process * support refresh the SmartBrowser (#614) * Remove data after close view. (#612) * Remove data after close view. * Clear data in tabs children when change uuid in main panel. * Fix load data in tabs children. (#615) * Fix load data in tabs children. * Send where clause. * bugfix load data whith criteria conditions (#616) * bugfix load data whith criteria conditions * remove unnecessary functions * change import function and change component name (#617) * add reference mobile (#618) * fix function calling (#619) * support mobile (#620) * remove advanced query option from child tabs * support mobile * Fix load data tab children and not send row tab (edit mode). (#621) * bugfix execute report formats (#622) * support datatable y and contextmenu (#623) * Fix load display column, record navigation. (#624) * some bugfix in advanced query panel (#625) * support for the range date and the title of the processes and reports (#626) * add option select last week range date * adjust the height of the title of the processes and reports * fix create new action error (#627) * Remove duplicate request to server by Tabs and Fields children. (#628) * Fix display value NULL in TextField component. (#630) * Smart browser support when opening the process Activity (#631) * support to record load in the table * add dispatch isClearSelection * adding conditional * minimal changes * Update contextMenuMixin.js * bugfix in share link report and process properties (#632) * fix open report viewer on process return error (#633) * feat: Add create entity in tab children. (#634) * feat: Add create entity in tab children. * Fix route query action when create entity in tab children. * feat: Add notification after delete selection records in table. (#636) * feat: Add notification after delete selection records in table. * Add destructuring of object. * Fix fields list mandatory empty when create/update in table. (#635) * feat: Add create entity in tab children. * Fix route query action when create entity in tab children. * Fix fields list mandatory empty when create/update in table. * fix: Create entity from main panel. (#637) * add condition (#638) * fix values of date parameters in share link (#639) * Support DateRange week (#640) * Add Summary to logs (#641) * support daterange week (#642) * Support DateRange week * minimal changes * Auto stash before merge of "bugfix/support-date-range-week" and "develop-i18n" * fix: Search browser when change show/hidden field not isQueryCriteria. (#643) * change displayed fields on advanced query (#644) * add summary to logs (#645) * fix create new action query (#646) * fix: Not load tabs not supported (isSortTab and isTranslationTab) (#647) * Change version * remove refresh the tabs children (#648) * remove refresh the tabs children * column top of the table of the select * minimal changes * fix: Create entity in table send server after change field. (#649) * add loading (#650) * add loading * rename isLoaded * add translations * add translations * add message * report control error (#651) * Add mark (*) mandatory fields in table. (#652) * fix: Exception not handled, add message when capturing error in promise. (#653) * fix: Correct loading into table when it has 0 records. (#654) * fix: Correct loading into table when it has 0 records. If the search returns 0 records the DataTable remains loading even when that was its response, giving the confucion that it is still waiting for the response from the server. * Minimal changes. * fix: Hide search notification for language and role. (#655) * add hidden main panel (#656) * fix: Show fields with default values. (#658) * fix load records in left table (#657) * support the hide panel button (#660) * add icon create new (#659) * add icon create new * setting the add button * fix: Delete record and selection in browser after run process. (#661) * fix load parameters of share link (#662) * open report from the window (#663) * open report from the window * resolve Conflicts * fix references disabled * Remove console.log (#664) * fix: Load data tab children after set context main panel. (#665) * add lastrun to the process Activity (#667) * fix: Lookups context. (#668) * fix: Set is load context not report and process. (#669) * fix: Set is load context not report and process. * Minimal changes. * Change evaluate multiple conditions. * feat: Add display column in add new row with value or default values. (#670) * feat: Add display column in add new row with value or default values. * Add comments. * Fixing navigation height between records (#671) * Fixing navigation height between records * minimal changes * support recent intems * fix: Context for window request. TODO: Add AD_User_ID in user info gRPC. (#672) * feat: Add last run to process activity. (#673) * feat: Add last run to process activity. * Change convert parameters to object in vuex store. * fix: Run process error. * Update source packages version * Update access version * fix: Do not show loading when the data request returns error. (#675) * feat: Add support to fields isEncrypted (type password). (#677) * fixing translation (#678) * fix display panel and fields in advanced query (#676) * fix display panel and fields in advanced query * bugfix filter fields in advanced query * fix load values in lookup component (#679) * filter fields exclude buttons on adavanced query (#680) * fix: Add display column to field link in tab. (#681) * feat: Add support to default context. (#682) TODO: Add default context in session info. * feat: Add field length to field text as max length attribute. (#683) * Add support to latest version from access * button setting to close table panel or expand (#684) * fix activities order by date (#685) * add date translations in process activity * fix activities order by date * fix: Handle data request error to leave loading the table. (#686) * fix: Smart Browser, research data when records length > 100. (#687) * fix: Smart Browser, research data when records length > 100. * Correct variable evaluation. * fix close report (#688) * Evaluate server response error by dictionary (#689) * Evaluate server response error by dictionary * Support Smart Browser and Process * minimal changes * fixed color and size of icon datatable (#690) * fixed color and size of icon datatable * minimal changes * add clearable * fix: Create request field mandatory number 0. (#691) * validate edit mode until ready to save (#692) * validate edit mode until ready to save * correcting condition * add child tab to url and share link (#693) * feat: Add support to new session request. (#694) * multiple record support (#695) * fix delete data after close window (#696) * fix load view on reapeted route * fix delete data after close window * feat: Add read only row from table. (#697) * feat: Add read only row from table. * Add read only if client context is different to client record. * add call off record (#698) * date error when executing (#699) * feat: Add validation read only with parent record is read only. (#700) * feat: Add validation read only with parent record is read only. * Minimal changes. * fix: Run process associate with Smart Browser or Window. (#702) * restore create new record of datatable child (#701) * restore create new record of datatable child * restore change * minimal changes * restoring values in the table * fix: Create new main panel, clear records to tabs children. (#703) * validate multiple record (#704) * validate multiple record * validate isEdit datatable children * Add new version for data * Add new version for data * add show to password type field (#705) * validate multiple record * add show to password type field * fix: Change evaluation of conditionals to add new row. (#706) * feat: Keep rows in edit mode after listing by creating record. (#707) * fix: Fix get lookup to window navigation. (#708) * fix: Parse default values to create or update record. (#709) * bugfix set tab child in URL (#710) * support height datable (#711) * fix: Read Only from processed and processing record. (#712) * Support badge and column fixed (#713) * support height datable * support badge * raname badge (#714) * no recharge view on changes (#715) * bugfix style of badge (#717) * change tabNumber query prop for tabParent (#718) * bugfix set tab child in URL * change tabNumber query prop for tabParent * fix: Pagination and total records. (#719) * Support duplicate lookup (#721) * set advanced search (#716) * field auto focus (#720) * field auto focus * bugfix * some changes * change method * remove unused attributes * fix: Add display column from server to add new row. (#723) * set values in main panel to share link (#725) * fix: Add new record data tables. (#726) * support LookupList (#724) * support LookupList * fix: Add display column from server to add new row. * delete isDisabledAddNewIcono * remove highlight current row of data table (#722) * fix: Tag view undefined. (#727) * fix: Get display column from server to add new row. (#729) * remove unused conditions (#730) * support style collapse item (#731) * clear panel values when view is closed (#732) * fix: Get multiple request data. (#733) * bugfix open process activity view (#736) * Evaluate values of the displayColumn with empty string or number at 0 (#737) * Evaluate values of the displayColumn with empty string or number at 0 * documenting evaluation * fix route from process activity to process view (#735) * bugfix conditions of tags views (#738) * bugfix infinity loading in datatable on new record (#734) * bugfix maxlength in process (#739) * feat: Add support to callout. (#741) * feat: Add callout support. * feat: Add support to callout. * Evaluate Column display values with empty string or number in 0u8 evaluation (#740) * bugfix close window after delete record (#742) * bugfix change panel records (#743) * fix: Error input text when show/hidden column DataTables. (#744) * fix: Remove duplicate code to focus field. (#745) * add change value of image (#746) * fix: Disable roles that do not have uuid in the registry (#747) * Add new version for gRPC data client * fix: Remove multiple request data from server. (#748) * Support duplicate or null data lookup (#749) * bugfix (#750) * Bugfix/parsed boolean context (#751) * bugfix * fix: Parsed context convert Boolean values to string values in query. * feat: Add support to callout response. (#752) * bugfix * feat: Add support to callout response to change panel values. * remove concole.log. * fix: Not send callout if is panel change. (#753) * fix: Not request callout when navigation records. (#755) * Update business data client from latest * Reduce time transition menu (#754) * fix: Set null values before reset panel to new. (#756) * fix: Set null values before reset panel to new. * Add oldValue. * add windowNo to callout store (#757) * bugfix record void in tabs (#758) * Update data version * feat: Add callout request to tab children. (#759) * feat: Add callout request to tab children. * Minimal changes. * bugfix context default values (#762) * bugfix void values from gRPC (#763) * feat: Add support for empty gRPC values. (#764) * feat: Add support for empty gRPC values. * Update comments. * tab record load and reduce requests to the server (#765) * tab record load and reduce requests to the server * duplicate keys Lookups * add forget password (#761) * add forget password * remove console * rename translation * minimal changes * Minimal Changes * duplicate data and string type (#766) * Support duplicate data and string type * minimal changes * update grpc-access-client version (#768) * bugfix load values after callout response (#769) * feat: Add support enrollment. (#767) * feat: Add support enrollment. * Update enrollment package version. * Fix language. * feat: Add reset password with token. (#771) * bugfix send panel values to create record (#772) * bugfix convert dates to UTC (#774) * feat: Add persistent vuex state in local storage. (#773) * feat: Add persistent vuex state in local storage. * fix: Error when LogOut session. * validate options list lookup (#776) * feat: Add enrollment user. (#778) * feat: Add create password and join with reset password form view. (#779) * fix: Zoom item process activity, parameters undefined. (#780) * Validate ColumnName in DataTable (#783) * bugfix load list items and callout send (#777) * fix: Search records with uuid url. (#781) * convert ternary operator into computed property (#782) * fix: Remove unused methods and remove watching. (#784) * fix: Remove unused methods and remove watching. * remove watch window view. * fix: Validation in google chrome enroll user. (#785) * fix: Validation in google chrome enroll user. * Update grpc-enrollment-user-client version. * fix: Convert context map to array pairs. (#786) * fix: Delete persistent date. (#788) * fix: Yes -No component value in table when edit mode. (#789) * multiple requests LookupList (#791) * fix: Read only panel parent when set context tab children. (#792) * Change value to displayColumn (#793) * add display column in tables childs (#787) * bugfix load list items and callout send * add display column in tables childs * add dynamic table name * add get default value from server * change comparation * remove request LookupItem (#794) * Change value to displayColumn * minimal changes * bugfix send criteria for get default value (#795) * bugfix load list items and callout send * add display column in tables childs * add dynamic table name * add get default value from server * change comparation * add criteria for get default value * remove parse int * feat: Add undo to create new record. (#796) * bugfix display values in tabs child (#797) * fix: Browser Generate Invoice From Outbound Order not search result. (#798) * add icons to recent items (#799) * bugfix display values in tabs child * add icons to recent items * correct translation and add client when changing rolecorrect translation and add client when changing role (#800) * feat: Add show mandatory columns and show all available columns. (#801) * bugfix recent items and change styles (#802) * change getDefaultValue service implementation (#803) * bugfix display values with sql * change getDefaultValue service implementation * fix: Set empty values to component's base. (#804) * add context info in field (#805) * bugfix context info fields (#806) * feat: Update access client and data client grpc version. (#807) * Add displayColumn to getterValueSelect (#808) * Add displayColumn to getterValueSelect * Update panel.js * fix: Duplicate change panel with record. (#809) * Change license and readme waiting for merge with ADempiere trunk * Add Changes for license and readme * Add commiter --- .gitignore | 1 + LICENSE | 687 +++++++++- PREVIOUS-LICENSE | 21 + README.es.md | 225 ++++ README.ja.md | 212 --- README.md | 95 +- README.zh-CN.md | 235 ---- mock/role/routes.js | 110 +- package.json | 22 +- public/favicon.ico | Bin 67646 -> 1150 bytes src/App.vue | 23 +- src/api/ADempiere/constants.js | 14 + src/api/ADempiere/data.js | 320 +++++ src/api/ADempiere/dictionary.js | 33 + src/api/ADempiere/enrollment.js | 38 + src/api/ADempiere/index.js | 4 + src/api/user.js | 106 +- src/components/ADempiere/Badge/index.vue | 113 ++ .../ContextMenu/contextMenuDesktop.vue | 78 ++ .../ADempiere/ContextMenu/contextMenuMixin.js | 410 ++++++ .../ContextMenu/contextMenuMobile.vue | 76 ++ src/components/ADempiere/ContextMenu/icon.js | 32 + .../ADempiere/ContextMenu/index.vue | 157 +++ .../ADempiere/ContextMenu/items.vue | 57 + .../ADempiere/DataTable/filterColumns.vue | 76 ++ .../ADempiere/DataTable/fixedColumns.vue | 79 ++ src/components/ADempiere/DataTable/index.vue | 1094 +++++++++++++++ src/components/ADempiere/Dialog/index.vue | 128 ++ src/components/ADempiere/Dropdown/index.vue | 146 ++ .../ADempiere/Field/FieldBinary.vue | 53 + .../ADempiere/Field/FieldButton.vue | 29 + src/components/ADempiere/Field/FieldColor.vue | 36 + src/components/ADempiere/Field/FieldDate.vue | 194 +++ src/components/ADempiere/Field/FieldImage.vue | 88 ++ src/components/ADempiere/Field/FieldMixin.js | 80 ++ .../ADempiere/Field/FieldNumber.vue | 103 ++ .../ADempiere/Field/FieldSelect.vue | 257 ++++ src/components/ADempiere/Field/FieldText.vue | 96 ++ src/components/ADempiere/Field/FieldTime.vue | 75 ++ src/components/ADempiere/Field/FieldYesNo.vue | 77 ++ src/components/ADempiere/Field/fieldSize.js | 124 ++ src/components/ADempiere/Field/index.vue | 326 +++++ src/components/ADempiere/Field/references.js | 329 +++++ .../ADempiere/IconElement/index.vue | 161 +++ src/components/ADempiere/Panel/detail.vue | 277 ++++ .../ADempiere/Panel/filterFields.vue | 118 ++ src/components/ADempiere/Panel/index.vue | 691 ++++++++++ .../ADempiere/RecentItems/index.vue | 136 ++ src/components/ADempiere/Tab/index.vue | 68 + src/components/ADempiere/Tab/tabChildren.vue | 83 ++ src/components/ADempiere/Tab/tabMixin.js | 94 ++ src/components/Breadcrumb/index.vue | 54 +- src/components/HeaderSearch/index.vue | 36 +- src/components/LangSelect/index.vue | 3 + src/components/RightPanel/index.vue | 33 +- src/components/RightPanel/menu.vue | 173 +++ src/filters/ADempiere/index.js | 20 + src/filters/index.js | 2 + src/lang/ADempiere/en.js | 258 ++++ src/lang/ADempiere/es.js | 233 ++++ src/lang/index.js | 39 +- src/layout/components/AppMain.vue | 4 +- src/layout/components/Navbar.vue | 90 +- src/layout/components/Sidebar/Link.vue | 10 +- src/layout/components/Sidebar/Logo.vue | 64 +- src/layout/components/Sidebar/SidebarItem.vue | 14 +- src/layout/components/TagsView/index.vue | 119 +- src/layout/index.vue | 2 +- src/main.js | 9 +- src/permission.js | 16 +- src/router/index.js | 32 +- src/router/modules/ADempiere/menu.js | 206 +++ src/settings.js | 4 +- src/store/getters.js | 2 + src/store/index.js | 5 +- src/store/modules/ADempiere/browser.js | 182 +++ src/store/modules/ADempiere/browserControl.js | 120 ++ src/store/modules/ADempiere/calloutControl.js | 65 + src/store/modules/ADempiere/context.js | 97 ++ src/store/modules/ADempiere/contextMenu.js | 62 + src/store/modules/ADempiere/data.js | 894 ++++++++++++ src/store/modules/ADempiere/enrollment.js | 128 ++ src/store/modules/ADempiere/lookup.js | 204 +++ src/store/modules/ADempiere/panel.js | 1196 +++++++++++++++++ src/store/modules/ADempiere/process.js | 206 +++ src/store/modules/ADempiere/processControl.js | 474 +++++++ src/store/modules/ADempiere/utils.js | 111 ++ src/store/modules/ADempiere/window.js | 377 ++++++ src/store/modules/ADempiere/windowControl.js | 662 +++++++++ src/store/modules/permission.js | 51 +- src/store/modules/tagsView.js | 21 +- src/store/modules/user.js | 249 +++- src/styles/sidebar.scss | 12 +- src/styles/variables.scss | 2 +- src/utils/ADempiere/auth.js | 15 + src/utils/ADempiere/evaluator.js | 246 ++++ src/utils/ADempiere/globalMethods.js | 2 + src/utils/ADempiere/index.js | 720 ++++++++++ src/utils/ADempiere/notification.js | 75 ++ src/utils/ADempiere/valueUtil.js | 209 +++ src/utils/auth.js | 4 +- src/views/ADempiere/Browser/index.vue | 291 ++++ src/views/ADempiere/Process/index.vue | 159 +++ src/views/ADempiere/ProcessActivity/index.vue | 280 ++++ src/views/ADempiere/ReportViewer/index.vue | 206 +++ src/views/ADempiere/Summary/index.vue | 68 + src/views/ADempiere/Unsupported/index.vue | 102 ++ src/views/ADempiere/Window/index.vue | 572 ++++++++ src/views/dashboard/admin/index.vue | 10 +- src/views/dashboard/editor/index.vue | 10 +- src/views/dashboard/index.vue | 5 - src/views/login/forgotPassword.vue | 215 +++ src/views/login/index.vue | 113 +- src/views/login/setPassword.vue | 325 +++++ src/views/login/userEnrollment.vue | 407 ++++++ src/views/permission/directive.vue | 3 +- src/views/profile/components/Profile.vue | 102 ++ src/views/profile/components/RolesNavbar.vue | 127 ++ src/views/profile/components/UserCard.vue | 21 +- src/views/profile/components/recentItems.vue | 81 ++ src/views/profile/components/role.vue | 155 +++ src/views/profile/index.vue | 20 +- vue.config.js | 2 +- 123 files changed, 18284 insertions(+), 889 deletions(-) create mode 100644 PREVIOUS-LICENSE create mode 100644 README.es.md delete mode 100644 README.ja.md delete mode 100644 README.zh-CN.md create mode 100644 src/api/ADempiere/constants.js create mode 100644 src/api/ADempiere/data.js create mode 100644 src/api/ADempiere/dictionary.js create mode 100644 src/api/ADempiere/enrollment.js create mode 100644 src/api/ADempiere/index.js create mode 100644 src/components/ADempiere/Badge/index.vue create mode 100644 src/components/ADempiere/ContextMenu/contextMenuDesktop.vue create mode 100644 src/components/ADempiere/ContextMenu/contextMenuMixin.js create mode 100644 src/components/ADempiere/ContextMenu/contextMenuMobile.vue create mode 100644 src/components/ADempiere/ContextMenu/icon.js create mode 100644 src/components/ADempiere/ContextMenu/index.vue create mode 100644 src/components/ADempiere/ContextMenu/items.vue create mode 100644 src/components/ADempiere/DataTable/filterColumns.vue create mode 100644 src/components/ADempiere/DataTable/fixedColumns.vue create mode 100644 src/components/ADempiere/DataTable/index.vue create mode 100644 src/components/ADempiere/Dialog/index.vue create mode 100644 src/components/ADempiere/Dropdown/index.vue create mode 100644 src/components/ADempiere/Field/FieldBinary.vue create mode 100644 src/components/ADempiere/Field/FieldButton.vue create mode 100644 src/components/ADempiere/Field/FieldColor.vue create mode 100644 src/components/ADempiere/Field/FieldDate.vue create mode 100644 src/components/ADempiere/Field/FieldImage.vue create mode 100644 src/components/ADempiere/Field/FieldMixin.js create mode 100644 src/components/ADempiere/Field/FieldNumber.vue create mode 100644 src/components/ADempiere/Field/FieldSelect.vue create mode 100644 src/components/ADempiere/Field/FieldText.vue create mode 100644 src/components/ADempiere/Field/FieldTime.vue create mode 100644 src/components/ADempiere/Field/FieldYesNo.vue create mode 100644 src/components/ADempiere/Field/fieldSize.js create mode 100644 src/components/ADempiere/Field/index.vue create mode 100644 src/components/ADempiere/Field/references.js create mode 100644 src/components/ADempiere/IconElement/index.vue create mode 100644 src/components/ADempiere/Panel/detail.vue create mode 100644 src/components/ADempiere/Panel/filterFields.vue create mode 100644 src/components/ADempiere/Panel/index.vue create mode 100644 src/components/ADempiere/RecentItems/index.vue create mode 100644 src/components/ADempiere/Tab/index.vue create mode 100644 src/components/ADempiere/Tab/tabChildren.vue create mode 100644 src/components/ADempiere/Tab/tabMixin.js create mode 100644 src/components/RightPanel/menu.vue create mode 100644 src/filters/ADempiere/index.js create mode 100644 src/lang/ADempiere/en.js create mode 100644 src/lang/ADempiere/es.js create mode 100644 src/router/modules/ADempiere/menu.js create mode 100644 src/store/modules/ADempiere/browser.js create mode 100644 src/store/modules/ADempiere/browserControl.js create mode 100644 src/store/modules/ADempiere/calloutControl.js create mode 100644 src/store/modules/ADempiere/context.js create mode 100644 src/store/modules/ADempiere/contextMenu.js create mode 100644 src/store/modules/ADempiere/data.js create mode 100644 src/store/modules/ADempiere/enrollment.js create mode 100644 src/store/modules/ADempiere/lookup.js create mode 100644 src/store/modules/ADempiere/panel.js create mode 100644 src/store/modules/ADempiere/process.js create mode 100644 src/store/modules/ADempiere/processControl.js create mode 100644 src/store/modules/ADempiere/utils.js create mode 100644 src/store/modules/ADempiere/window.js create mode 100644 src/store/modules/ADempiere/windowControl.js create mode 100644 src/utils/ADempiere/auth.js create mode 100644 src/utils/ADempiere/evaluator.js create mode 100644 src/utils/ADempiere/globalMethods.js create mode 100644 src/utils/ADempiere/index.js create mode 100644 src/utils/ADempiere/notification.js create mode 100644 src/utils/ADempiere/valueUtil.js create mode 100644 src/views/ADempiere/Browser/index.vue create mode 100644 src/views/ADempiere/Process/index.vue create mode 100644 src/views/ADempiere/ProcessActivity/index.vue create mode 100644 src/views/ADempiere/ReportViewer/index.vue create mode 100644 src/views/ADempiere/Summary/index.vue create mode 100644 src/views/ADempiere/Unsupported/index.vue create mode 100644 src/views/ADempiere/Window/index.vue create mode 100644 src/views/login/forgotPassword.vue create mode 100644 src/views/login/setPassword.vue create mode 100644 src/views/login/userEnrollment.vue create mode 100644 src/views/profile/components/Profile.vue create mode 100644 src/views/profile/components/RolesNavbar.vue create mode 100644 src/views/profile/components/recentItems.vue create mode 100644 src/views/profile/components/role.vue diff --git a/.gitignore b/.gitignore index 78a752d8..b55f03fb 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ selenium-debug.log package-lock.json yarn.lock +/bin/ diff --git a/LICENSE b/LICENSE index 61515750..c3f5b52d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,674 @@ -MIT License +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 -Copyright (c) 2017-present PanJiaChen +Copyright (C) 2007 Free Software Foundation, Inc. +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: + Preamble -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The GNU General Public License is a free, copyleft license for +software and other kinds of works. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + +For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + +Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + +For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + +Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + +Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + +The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + +0. Definitions. + +"This License" refers to version 3 of the GNU General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +1. Source Code. + +The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + +The Corresponding Source for a work in source code form is that +same work. + +2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + +4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + +a) The work must carry prominent notices stating that you modified +it, and giving a relevant date. + +b) The work must carry prominent notices stating that it is +released under this License and any conditions added under section +7. This requirement modifies the requirement in section 4 to +"keep intact all notices". + +c) You must license the entire work, as a whole, under this +License to anyone who comes into possession of a copy. This +License will therefore apply, along with any applicable section 7 +additional terms, to the whole of the work, and all its parts, +regardless of how they are packaged. This License gives no +permission to license the work in any other way, but it does not +invalidate such permission if you have separately received it. + +d) If the work has interactive user interfaces, each must display +Appropriate Legal Notices; however, if the Program has interactive +interfaces that do not display Appropriate Legal Notices, your +work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + +a) Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by the +Corresponding Source fixed on a durable physical medium +customarily used for software interchange. + +b) Convey the object code in, or embodied in, a physical product +(including a physical distribution medium), accompanied by a +written offer, valid for at least three years and valid for as +long as you offer spare parts or customer support for that product +model, to give anyone who possesses the object code either (1) a +copy of the Corresponding Source for all the software in the +product that is covered by this License, on a durable physical +medium customarily used for software interchange, for a price no +more than your reasonable cost of physically performing this +conveying of source, or (2) access to copy the +Corresponding Source from a network server at no charge. + +c) Convey individual copies of the object code with a copy of the +written offer to provide the Corresponding Source. This +alternative is allowed only occasionally and noncommercially, and +only if you received the object code with such an offer, in accord +with subsection 6b. + +d) Convey the object code by offering access from a designated +place (gratis or for a charge), and offer equivalent access to the +Corresponding Source in the same way through the same place at no +further charge. You need not require recipients to copy the +Corresponding Source along with the object code. If the place to +copy the object code is a network server, the Corresponding Source +may be on a different server (operated by you or a third party) +that supports equivalent copying facilities, provided you maintain +clear directions next to the object code saying where to find the +Corresponding Source. Regardless of what server hosts the +Corresponding Source, you remain obligated to ensure that it is +available for as long as needed to satisfy these requirements. + +e) Convey the object code using peer-to-peer transmission, provided +you inform other peers where the object code and Corresponding +Source of the work are being offered to the general public at no +charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + +a) Disclaiming warranty or limiting liability differently from the +terms of sections 15 and 16 of this License; or + +b) Requiring preservation of specified reasonable legal notices or +author attributions in that material or in the Appropriate Legal +Notices displayed by works containing it; or + +c) Prohibiting misrepresentation of the origin of that material, or +requiring that modified versions of such material be marked in +reasonable ways as different from the original version; or + +d) Limiting the use for publicity purposes of names of licensors or +authors of the material; or + +e) Declining to grant rights under trademark law for use of some +trade names, trademarks, or service marks; or + +f) Requiring indemnification of licensors and authors of that +material by anyone who conveys the material (or modified versions of +it) with contractual assumptions of liability to the recipient, for +any liability that these contractual assumptions directly impose on +those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + +8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + +Copyright (C) + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + +If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) +This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +This is free software, and you are welcome to redistribute it +under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + +You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + +The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/PREVIOUS-LICENSE b/PREVIOUS-LICENSE new file mode 100644 index 00000000..61515750 --- /dev/null +++ b/PREVIOUS-LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017-present PanJiaChen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.es.md b/README.es.md new file mode 100644 index 00000000..4419513a --- /dev/null +++ b/README.es.md @@ -0,0 +1,225 @@ +

+ +

+ +

+ + vue + + + element-ui + + + Build Status + + + license + + + GitHub release + + + gitter + +

+ +Español | [Inglés](./README.md) + +## Introducción + +[adempiere-vue](https://github.com/adempiere/adempiere-vue) es una nueva UI para [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)]. Se basa en [vue](https://github.com/vuejs/vue) y usa el conjunto de herraminentas de UI [element-ui](https://github.com/ElemeFE/element). + +Este es una gran UI para [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)] basada en lo último desarrollado por vue, construido con i18n para manejo multi-idioma, plantillas para aplicaciones de negocio y muchas características asombrosas. Este proyecto es derivado de [Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin) originalmente escrito por [PanJiaChen / 花裤衩](https://github.com/PanJiaChen) sobre [licencia MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) y cambiado a [licencia GNU/GPL v3](https://github.com/adempiere/adempiere-vue/blob/master/LICENSE) por [Yamel Senih](https://github.com/yamelsenih) después de derivar el proyecto y con permisos del autor original [PanJiaChen / 花裤衩](https://github.com/PanJiaChen) en el reporte ["Extend as GNU/Gpl v3 License #1434"](https://github.com/PanJiaChen/vue-element-admin/issues/1434). + +[adempiere-vue](https://github.com/adempiere/adempiere-vue) usa como RPC (Llamado a Procedimientos Remostos)[gRPC](https://grpc.io/) como [server](https://github.com/erpcya/adempiere-gRPC-Server). + +- [Vista Prévia](http://adempiere-ui.erpya.com:9526/) + +- [Documentación](https://panjiachen.github.io/vue-element-admin-site/) + +- [Gitter](https://gitter.im/adempiere/adempiere-vue) + +- [Donar](https://www.paypal.me/?) + +- [Wikipedia](http://wiki.adempiere.net/ADempiere_ERP) + +- [Derivado De](https://github.com/PanJiaChen/vue-element-admin) + +**La versión actual `v1.0+` está construida en `vue-cli`. Si encuentra algún problema, por favor escriba un [reporte de error](https://github.com/adempiere/adempiere-vue/issues/new).** + +**Este proyecto no soporta versiones bajas de los navegadores (e.g. IE).** + +## Preparación + +Necesita instalar [node](https://nodejs.org/) y [git](https://git-scm.com/) localmente. El proyecto está basado en [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [gRPC](https://grpc.io/) y [element-ui](https://github.com/ElemeFE/element). +Entendiendo y aprendiendo acerca de lo anterior le ayudará a conocer el proyecto. + +

+ +

+ +## Patrocinantes + + + + + + +Sea un patrocinante y coloque su logo en nuestro LEEME en GitHub con un link a su sitio web. [Sea un Patrocinante](https://www.paypal.me/?) + +## Características + +``` +- Iniciar / Cerrar Sesión + +- Permisos de Authentication + - Permisos basado en ADempiere + - Página de Permisos + - Directivas de permisos + - Página de configuración de permisos + - Autenticación por dos pasos + +- Construcción Multi-entorno + - dev sit stage producción + +- Características Globales + - I18n + - Temas dinámicos + - Dynamic sidebar (soporte a rutas multi-nivel) + - Barra de rutas dinámica + - Tags-view (Tab page Support right-click operation) + - Svg Sprite + - Datos de simulación con Mock + - Pantalla completa + - Responsive Sidebar + +- Editor + - Editor de Texto Enriquecido + - Editor Markdown + - Editor JSON + +- Excel + - Exportación a Excel + - Carga de Excel + - Visualización de Excel + - Exportación como zip + +- Tabla + - Tabla Dinámica + - Tabla con Arrastrar y Soltar + - Tabla de edición en línea + +- Páginas de Error + - 401 + - 404 + +- Componentes + - Carga de Avatar + - Botón para subir al inicio + - Arrastrar y Soltar (Diaglogo) + - Arrastrar y Soltar (Seleccionar) + - Arrastrar y Soltar (Kanban) + - Arrastrar y Soltar (Lista) + - Panel de división + - Componente para soltar archivos + - Adhesión de objetos + - Contador hasta +- Soporte a ADempiere + - Ventan + - Proceso + - Reporte + - Visor Inteligente + +- Ejemplo Avanzado +- Registro de Errores +- Tablero de indicadores +- Página de Guías +- ECharts (Gráficos) +- Portapapeles +- Convertidor de Markdown a html +``` + +## Iniciando + +Use [gRPC ADempiere Server](https://github.com/erpcya/adempiere-gRPC-Server) como proveedor de gRPC. + +```bash +# clone el proyecto +git clone -b develop git@github.com:adempiere/vue-element-admin.git + +# vaya al directorio clonado +cd adempiere-vue + +# instale las dependencias +npm install + +# corra el proyecto como desarrollador +npm run dev +``` + +Automáticamente se abrirá el siguiente enlace en su navegador http://localhost:9527 + +## Construcción + +```bash +# Construcción para entornos de prueba +npm run build:stage + +# Construcción para entornos de producción +npm run build:prod +``` + +## Avanzado + +```bash +# Vista previa con efectos de entorno +npm run preview + +# Vista previa con efectos + análisis de recursos estáticos +npm run preview -- --report + +# Chequeo de formato de código +npm run lint + +# Chequeo de formato de código y auto-corrección +npm run lint -- --fix +``` + +Vaya a [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) para mayor información. + +## Registro de Cambios + +Los cambios detallados por cada liberación se encuentran en [notas de liberación](https://github.com/adempiere/adempiere-vue/releases). + +## Demostración en línea + +[Preview](http://adempiere-ui.erpya.com:9526/) + +## Donación + +Si este proyecto es de mucha ayuda para ti, puedes ayudar a hacer una mejor UI + +[Dona por Paypal](https://www.paypal.me/?) + +## Navegadores Soportados + +Navegadores modernos e Internet Explorer 10+. + +| [IE / Edge](https://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](https://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](https://godban.github.io/browsers-support-badges/)
Chrome | [Safari](https://godban.github.io/browsers-support-badges/)
Safari | +| --------- | --------- | --------- | --------- | +| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions + +## Licencia + +[GNU/GPL v3](https://github.com/adempiere/adempiere-vue/blob/master/LICENSE) + +## Licencia Prévia +[MIT](./PREVIOUS-LICENSE) + +## Contribuidores Iniciales + +- [Yamel Senih](https://github.com/yamelsenih) +- [Raúl Muñoz](https://github.com/Raul-mz) +- [Edwin Betancourt](https://github.com/EdwinBetanc0urt) +- [Leonel Matos](https://github.com/leonel1524) +- [Elsio Sanchez](https://github.com/elsiosanchez) diff --git a/README.ja.md b/README.ja.md deleted file mode 100644 index c99108fe..00000000 --- a/README.ja.md +++ /dev/null @@ -1,212 +0,0 @@ -

- -

- -

- - vue - - - element-ui - - - Build Status - - - license - - - GitHub release - - - gitter - - - donate - -

- -日本語 | [English](./README.md) | [简体中文](./README.zh-CN.md) - -## 概要 - -[vue-element-admin](https://panjiachen.github.io/vue-element-admin) は管理画面のフロントエンドのインタフェース,[vue](https://github.com/vuejs/vue) と [element-ui](https://github.com/ElemeFE/element)を使っています。i18nの多言語対応、可変ルート、権限、典型的なビジネスアプリテンプレートであり、豊富なコンポーネントを提供しています、素早くビジネス用の管理画面の現型を構築に役立ちます。 - -- [デモページ](https://panjiachen.github.io/vue-element-admin) - -- [ドキュメント](https://panjiachen.github.io/vue-element-admin-site/) - -- [Gitter](https://gitter.im/vue-element-admin/discuss) - -- [Donate](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate) - -- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki) - -- おすすめシンプルテンプレート: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) -- デスクトップバージョン: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) -- Typescriptバージョン: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour)) - -**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update** - -**現在のバージョン `v4.0+` は `vue-cli` で構築,バグ報告は[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)のissueでお願いします。旧バージョン[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0)もあります。`vue-cli`に依存しないです。** - -**低いバージョンのブラウザはサーポートしないです(例えば ie),必要があれば polyfill を追加してください。 [詳細はこちら](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)** - -## 前準備 - -ローカル環境に [node](http://nodejs.org/) と [git](https://git-scm.com/)をインストールが必要です。[ES2015+](http://es6.ruanyifeng.com/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) 和 [element-ui](https://github.com/ElemeFE/element)で開発しています。Requestは[Mock.js](https://github.com/nuysoft/Mock)のモックデータを使っています。 - -**バグ修正や新規機能追加のissue と pull requestは大歓迎です。** - -

- -

- -## Sponsors - -Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen) - -

Admin Dashboard Templates made with Vue, React and Angular.

- -## 機能一覧 - -``` -- ログイン / ログアウト - -- Auth認証 - - ページ権限 - - 権限パーミッション - - 権限設定 - - 外部IDでログイン - -- 複数環境デプロイ - - dev sit stage prod - -- 共通機能 - - 多言語切替 - - テーマ切替 - - サイトメニュー(ルートから生成) - - Breadcrumb Navigation - - Tag Navigation - - Svg Sprite Icon - - ローカル/バックエンド モック データ - - Screenfull - -- WYSIWYG - - TinyMCE - - Markdown - - JSON - -- Excel - - エクスポート - - インポート - - リード - - Zip - -- Table - - Dynamic Table - - Drag And Drop Table - - Inline Edit Table - -- Error Page - - 401 - - 404 - -- コンポーネント - - Avatar Upload - - Back To Top - - Drag Dialog - - Drag Select - - Drag Kanban - - Drag List - - SplitPane - - Dropzone - - Sticky - - CountTo - -- Advanced Example -- Error Log -- Dashboard -- Guide Page -- ECharts -- Clipboard -- Markdown to html -``` - -## Getting started - -```bash -# clone the project -git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git - -# enter the project directory -cd vue-element-admin - -# install dependency -npm install - -# develop -npm run dev -``` - -This will automatically open http://localhost:9527 - -## Build - -```bash -# build for test environment -npm run build:stage - -# build for production environment -npm run build:prod -``` - -## Advanced - -```bash -# preview the release environment effect -npm run preview - -# preview the release environment effect + static resource analysis -npm run preview -- --report - -# code format check -npm run lint - -# code format check and auto fix -npm run lint -- --fix -``` - -Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/guide/essentials/deploy.html) for more information - -## Changelog - -Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases). - -## Online Demo - -[Preview](https://panjiachen.github.io/vue-element-admin) - -## Donate - -If you find this project useful, you can buy author a glass of juice :tropical_drink: - -![donate](https://wpimg.wallstcn.com/bd273f0d-83a0-4ef2-92e1-9ac8ed3746b9.png) - -[Paypal Me](https://www.paypal.me/panfree23) - -[Buy me a coffee](https://www.buymeacoffee.com/Pan) - -## Browsers support - -Modern browsers and Internet Explorer 10+. - -| [IE / Edge](https://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](https://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](https://godban.github.io/browsers-support-badges/)
Chrome | [Safari](https://godban.github.io/browsers-support-badges/)
Safari | -| --------- | --------- | --------- | --------- | -| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions - -## License - -[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) - -Copyright (c) 2017-present PanJiaChen diff --git a/README.md b/README.md index a2c63a00..381fe60b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- +

@@ -9,78 +9,76 @@ element-ui - - Build Status + + Build Status - + license - - GitHub release + + GitHub release - + gitter - - donate -

-English | [简体中文](./README.zh-CN.md) | [日本語](./README.ja.md) +English | [Spanish](./README.es.md) ## Introduction -[vue-element-admin](https://panjiachen.github.io/vue-element-admin) is a production-ready front-end solution for admin interfaces. It based on [vue](https://github.com/vuejs/vue) and use the UI Toolkit [element-ui](https://github.com/ElemeFE/element). +[adempiere-vue](https://github.com/adempiere/adempiere-vue) is a new UI for [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)]. It based on [vue](https://github.com/vuejs/vue) and use the UI Toolkit [element-ui](https://github.com/ElemeFE/element). -It is a magical vue admin based on the newest development stack of vue, built-in i18n solution, typical templates for enterprise applications, lots of awesome features. It helps you build a large complex Single-Page Applications. I believe whatever your needs are, this project will help you. +It is a great UI for [ADempiere ERP, CRM & SCM](https://github.com/adempiere/adempiere)] based on the newest development stack of vue, built-in i18n solution, typical templates for enterprise applications, lots of awesome features. This project was forked from [Vue-Element-Admin](https://github.com/PanJiaChen/vue-element-admin) originally write by [PanJiaChen / 花裤衩](https://github.com/PanJiaChen) over [MIT license](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) and was changed to [GNU/GPL v3](https://github.com/adempiere/adempiere-vue/blob/master/LICENSE) by [Yamel Senih](https://github.com/yamelsenih) after forked granted by [PanJiaChen / 花裤衩](https://github.com/PanJiaChen) on issue ["Extend as GNU/Gpl v3 License #1434"](https://github.com/PanJiaChen/vue-element-admin/issues/1434). -- [Preview](https://panjiachen.github.io/vue-element-admin) +[adempiere-vue](https://github.com/adempiere/adempiere-vue) use the modern open source high performance RPC framework that can run in any environment [gRPC](https://grpc.io/) as [server](https://github.com/erpcya/adempiere-gRPC-Server). + +- [Preview](http://adempiere-ui.erpya.com:9526/) - [Documentation](https://panjiachen.github.io/vue-element-admin-site/) -- [Gitter](https://gitter.im/vue-element-admin/discuss) +- [Gitter](https://gitter.im/adempiere/adempiere-vue) -- [Donate](https://panjiachen.github.io/vue-element-admin-site/donate/) +- [Donate](https://www.paypal.me/?) -- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki) +- [Wiki](http://wiki.adempiere.net/ADempiere_ERP) -- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 国内用户可访问该地址在线预览 +- [Forked From](https://github.com/PanJiaChen/vue-element-admin) -- Base template recommends using: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) -- Desktop: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) -- Typescript: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (Credits: [@Armour](https://github.com/Armour)) - -**After the `v4.1.0+` version, the default master branch will not support i18n. Please use [i18n Branch](https://github.com/PanJiaChen/vue-element-admin/tree/i18n), it will keep up with the master update** - -**The current version is `v4.0+` build on `vue-cli`. If you find a problem, please put [issue](https://github.com/PanJiaChen/vue-element-admin/issues/new). If you want to use the old version , you can switch branch to [tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0), it does not rely on `vue-cli`** +**The current version is `v1.0+` build on `vue-cli`. If you find a problem, please put [issue](https://github.com/adempiere/adempiere-vue/issues/new).** **This project does not support low version browsers (e.g. IE). Please add polyfill by yourself.** ## Preparation -You need to install [node](https://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [axios](https://github.com/axios/axios) and [element-ui](https://github.com/ElemeFE/element), all request data is simulated using [Mock.js](https://github.com/nuysoft/Mock). +You need to install [node](https://nodejs.org/) and [git](https://git-scm.com/) locally. The project is based on [ES2015+](https://es6.ruanyifeng.com/), [vue](https://cn.vuejs.org/index.html), [vuex](https://vuex.vuejs.org/zh-cn/), [vue-router](https://router.vuejs.org/zh-cn/), [vue-cli](https://github.com/vuejs/vue-cli) , [gRPC](https://grpc.io/) and [element-ui](https://github.com/ElemeFE/element). Understanding and learning this knowledge in advance will greatly help the use of this project. -

+

## Sponsors -Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen) + + + + -

Admin Dashboard Templates made with Vue, React and Angular.

+Become a sponsor and get your logo on our README on GitHub with a link to your site. [Become a sponsor](https://www.paypal.me/?) ## Features ``` - Login / Logout +- Register +- Forgot Password - Permission Authentication + - ADempiere backend permission - Page permission - Directive permission - Permission configuration page - - Two-step login - Multi-environment build - dev sit stage prod @@ -92,7 +90,6 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s - Dynamic breadcrumb - Tags-view (Tab page Support right-click operation) - Svg Sprite - - Mock data - Screenfull - Responsive Sidebar @@ -127,6 +124,11 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s - Dropzone - Sticky - CountTo +- ADempiere supported + - Window + - Process + - Report + - Smart Browser - Advanced Example - Error Log @@ -139,12 +141,14 @@ Become a sponsor and get your logo on our README on GitHub with a link to your s ## Getting started +Use [gRPC ADempiere Server](https://github.com/erpcya/adempiere-gRPC-Server) as gRPC provider. + ```bash # clone the project -git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git +git clone -b develop git@github.com:adempiere/vue-element-admin.git # enter the project directory -cd vue-element-admin +cd adempiere-vue # install dependency npm install @@ -185,21 +189,17 @@ Refer to [Documentation](https://panjiachen.github.io/vue-element-admin-site/gui ## Changelog -Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases). +Detailed changes for each release are documented in the [release notes](https://github.com/adempiere/adempiere-vue/releases). ## Online Demo -[Preview](https://panjiachen.github.io/vue-element-admin) +[Preview](http://adempiere-ui.erpya.com:9526/) ## Donate -If you find this project useful, you can buy author a glass of juice :tropical_drink: +If you find this project useful, you can help this make a better UI -![donate](https://wpimg.wallstcn.com/bd273f0d-83a0-4ef2-92e1-9ac8ed3746b9.png) - -[Paypal Me](https://www.paypal.me/panfree23) - -[Buy me a coffee](https://www.buymeacoffee.com/Pan) +[Paypal Me](https://www.paypal.me/?) ## Browsers support @@ -211,6 +211,15 @@ Modern browsers and Internet Explorer 10+. ## License -[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) +[GNU/GPL v3](https://github.com/adempiere/adempiere-vue/blob/master/LICENSE) -Copyright (c) 2017-present PanJiaChen +## Previous License +[MIT](./PREVIOUS-LICENSE) + +## Initial Contributors + +- [Yamel Senih](https://github.com/yamelsenih) +- [Raúl Muñoz](https://github.com/Raul-mz) +- [Edwin Betancourt](https://github.com/EdwinBetanc0urt) +- [Leonel Matos](https://github.com/leonel1524) +- [Elsio Sanchez](https://github.com/elsiosanchez) diff --git a/README.zh-CN.md b/README.zh-CN.md deleted file mode 100644 index c6f4604d..00000000 --- a/README.zh-CN.md +++ /dev/null @@ -1,235 +0,0 @@ -

- -

- -

- - vue - - - element-ui - - - Build Status - - - license - - - GitHub release - - - gitter - - - donate - -

- -简体中文 | [English](./README.md) - -## 简介 - -[vue-element-admin](https://panjiachen.github.io/vue-element-admin) 是一个后台前端解决方案,它基于 [vue](https://github.com/vuejs/vue) 和 [element-ui](https://github.com/ElemeFE/element)实现。它使用了最新的前端技术栈,内置了 i18n 国际化解决方案,动态路由,权限验证,提炼了典型的业务模型,提供了丰富的功能组件,它可以帮助你快速搭建企业级中后台产品原型。相信不管你的需求是什么,本项目都能帮助到你。 - -- [在线预览](https://panjiachen.github.io/vue-element-admin) - -- [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/) - -- [Gitter 讨论组](https://gitter.im/vue-element-admin/discuss) - -- [Donate](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate) - -- [Wiki](https://github.com/PanJiaChen/vue-element-admin/wiki) - -- [Gitee](https://panjiachen.gitee.io/vue-element-admin/) 在线预览(国内用户可访问该地址) - -- [国内访问文档](https://panjiachen.gitee.io/vue-element-admin-site/zh/) 文档(方便没翻墙的用户查看) - -- 基础模板建议使用: [vue-admin-template](https://github.com/PanJiaChen/vue-admin-template) -- 桌面端: [electron-vue-admin](https://github.com/PanJiaChen/electron-vue-admin) -- Typescript 版: [vue-typescript-admin-template](https://github.com/Armour/vue-typescript-admin-template) (鸣谢: [@Armour](https://github.com/Armour)) - -**`v4.1.0+`版本之后默认 master 分支将不支持国际化,有需要的请使用[i18n](https://github.com/PanJiaChen/vue-element-admin/tree/i18n)分支,它会和 master 保持同步更新** - -**该项目不支持低版本浏览器(如 ie),有需求请自行添加 polyfill [详情](https://github.com/PanJiaChen/vue-element-admin/wiki#babel-polyfill)** - -**目前版本为 `v4.0+` 基于 `vue-cli` 进行构建,若发现问题,欢迎提[issue](https://github.com/PanJiaChen/vue-element-admin/issues/new)。若你想使用旧版本,可以切换分支到[tag/3.11.0](https://github.com/PanJiaChen/vue-element-admin/tree/tag/3.11.0),它不依赖 `vue-cli`** - -群主 **[圈子](https://jianshiapp.com/circles/1209)** 群主会经常分享一些技术相关的东西,或者加入 [qq 群](https://github.com/PanJiaChen/vue-element-admin/issues/602) 或者关注 [微博](https://weibo.com/u/3423485724?is_all=1) - -## 前序准备 - -你需要在本地安装 [node](http://nodejs.org/) 和 [git](https://git-scm.com/)。本项目技术栈基于 [ES2015+](http://es6.ruanyifeng.com/)、[vue](https://cn.vuejs.org/index.html)、[vuex](https://vuex.vuejs.org/zh-cn/)、[vue-router](https://router.vuejs.org/zh-cn/) 、[vue-cli](https://github.com/vuejs/vue-cli) 、[axios](https://github.com/axios/axios) 和 [element-ui](https://github.com/ElemeFE/element),所有的请求数据都使用[Mock.js](https://github.com/nuysoft/Mock)进行模拟,提前了解和学习这些知识会对使用本项目有很大的帮助。 - -同时配套了系列教程文章,如何从零构建后一个完整的后台项目,建议大家先看完这些文章再来实践本项目 - -- [手摸手,带你用 vue 撸后台 系列一(基础篇)](https://juejin.im/post/59097cd7a22b9d0065fb61d2) -- [手摸手,带你用 vue 撸后台 系列二(登录权限篇)](https://juejin.im/post/591aa14f570c35006961acac) -- [手摸手,带你用 vue 撸后台 系列三 (实战篇)](https://juejin.im/post/593121aa0ce4630057f70d35) -- [手摸手,带你用 vue 撸后台 系列四(vueAdmin 一个极简的后台基础模板)](https://juejin.im/post/595b4d776fb9a06bbe7dba56) -- [手摸手,带你用vue撸后台 系列五(v4.0新版本)](https://juejin.im/post/5c92ff94f265da6128275a85) -- [手摸手,带你封装一个 vue component](https://segmentfault.com/a/1190000009090836) -- [手摸手,带你优雅的使用 icon](https://juejin.im/post/59bb864b5188257e7a427c09) -- [手摸手,带你用合理的姿势使用 webpack4(上)](https://juejin.im/post/5b56909a518825195f499806) -- [手摸手,带你用合理的姿势使用 webpack4(下)](https://juejin.im/post/5b5d6d6f6fb9a04fea58aabc) - -**如有问题请先看上述使用文档和文章,若不能满足,欢迎 issue 和 pr** - -

- -

- -## Sponsors - -Become a sponsor and get your logo on our README on GitHub with a link to your site. [[Become a sponsor]](https://www.patreon.com/panjiachen) - -

Admin Dashboard Templates made with Vue, React and Angular.

- -## 功能 - -``` -- 登录 / 注销 - -- 权限验证 - - 页面权限 - - 指令权限 - - 权限配置 - - 二步登录 - -- 多环境发布 - - dev sit stage prod - -- 全局功能 - - 国际化多语言 - - 多种动态换肤 - - 动态侧边栏(支持多级路由嵌套) - - 动态面包屑 - - 快捷导航(标签页) - - Svg Sprite 图标 - - 本地/后端 mock 数据 - - Screenfull全屏 - - 自适应收缩侧边栏 - -- 编辑器 - - 富文本 - - Markdown - - JSON 等多格式 - -- Excel - - 导出excel - - 导入excel - - 前端可视化excel - - 导出zip - -- 表格 - - 动态表格 - - 拖拽表格 - - 内联编辑 - -- 错误页面 - - 401 - - 404 - -- 組件 - - 头像上传 - - 返回顶部 - - 拖拽Dialog - - 拖拽Select - - 拖拽看板 - - 列表拖拽 - - SplitPane - - Dropzone - - Sticky - - CountTo - -- 综合实例 -- 错误日志 -- Dashboard -- 引导页 -- ECharts 图表 -- Clipboard(剪贴复制) -- Markdown2html -``` - -## 开发 - -```bash -# 克隆项目 -git clone -b i18n git@github.com:PanJiaChen/vue-element-admin.git - -# 进入项目目录 -cd vue-element-admin - -# 安装依赖 -npm install - -# 建议不要直接使用 cnpm 安装以来,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题 -npm install --registry=https://registry.npm.taobao.org - -# 启动服务 -npm run dev -``` - -浏览器访问 http://localhost:9527 - -## 发布 - -```bash -# 构建测试环境 -npm run build:stage - -# 构建生产环境 -npm run build:prod -``` - -## 其它 - -```bash -# 预览发布环境效果 -npm run preview - -# 预览发布环境效果 + 静态资源分析 -npm run preview -- --report - -# 代码格式检查 -npm run lint - -# 代码格式检查并自动修复 -npm run lint -- --fix -``` - -更多信息请参考 [使用文档](https://panjiachen.github.io/vue-element-admin-site/zh/) - -## Changelog - -Detailed changes for each release are documented in the [release notes](https://github.com/PanJiaChen/vue-element-admin/releases). - -## Online Demo - -[在线 Demo](https://panjiachen.github.io/vue-element-admin) - -## Donate - -如果你觉得这个项目帮助到了你,你可以帮作者买一杯果汁表示鼓励 :tropical_drink: -![donate](https://panjiachen.github.io/donate/donation.png) - -[更多捐赠方式](https://panjiachen.gitee.io/vue-element-admin-site/zh/donate) - -[Paypal Me](https://www.paypal.me/panfree23) - -[Buy me a coffee](https://www.buymeacoffee.com/Pan) - -## Browsers support - -Modern browsers and Internet Explorer 10+. - -| [IE / Edge](https://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](https://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](https://godban.github.io/browsers-support-badges/)
Chrome | [Safari](https://godban.github.io/browsers-support-badges/)
Safari | -| --------- | --------- | --------- | --------- | -| IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions - -## License - -[MIT](https://github.com/PanJiaChen/vue-element-admin/blob/master/LICENSE) - -Copyright (c) 2017-present PanJiaChen diff --git a/mock/role/routes.js b/mock/role/routes.js index c4654566..d718919c 100644 --- a/mock/role/routes.js +++ b/mock/role/routes.js @@ -41,7 +41,7 @@ export const constantRoutes = [ path: 'dashboard', component: 'views/dashboard/index', name: 'Dashboard', - meta: { title: 'dashboard', icon: 'dashboard', affix: true } + meta: { title: 'Dashboard', icon: 'dashboard', affix: true } } ] }, @@ -53,7 +53,7 @@ export const constantRoutes = [ path: 'index', component: 'views/documentation/index', name: 'Documentation', - meta: { title: 'documentation', icon: 'documentation', affix: true } + meta: { title: 'Documentation', icon: 'documentation', affix: true } } ] }, @@ -66,7 +66,7 @@ export const constantRoutes = [ path: 'index', component: 'views/guide/index', name: 'Guide', - meta: { title: 'guide', icon: 'guide', noCache: true } + meta: { title: 'Guide', icon: 'guide', noCache: true } } ] } @@ -79,7 +79,7 @@ export const asyncRoutes = [ redirect: '/permission/index', alwaysShow: true, meta: { - title: 'permission', + title: 'Permission', icon: 'lock', roles: ['admin', 'editor'] }, @@ -89,7 +89,7 @@ export const asyncRoutes = [ component: 'views/permission/page', name: 'PagePermission', meta: { - title: 'pagePermission', + title: 'Page Permission', roles: ['admin'] } }, @@ -98,7 +98,7 @@ export const asyncRoutes = [ component: 'views/permission/directive', name: 'DirectivePermission', meta: { - title: 'directivePermission' + title: 'Directive Permission' } }, { @@ -106,7 +106,7 @@ export const asyncRoutes = [ component: 'views/permission/role', name: 'RolePermission', meta: { - title: 'rolePermission', + title: 'Role Permission', roles: ['admin'] } } @@ -121,7 +121,7 @@ export const asyncRoutes = [ path: 'index', component: 'views/icons/index', name: 'Icons', - meta: { title: 'icons', icon: 'icon', noCache: true } + meta: { title: 'Icons', icon: 'icon', noCache: true } } ] }, @@ -132,7 +132,7 @@ export const asyncRoutes = [ redirect: 'noRedirect', name: 'ComponentDemo', meta: { - title: 'components', + title: 'Components', icon: 'component' }, children: [ @@ -140,49 +140,49 @@ export const asyncRoutes = [ path: 'tinymce', component: 'views/components-demo/tinymce', name: 'TinymceDemo', - meta: { title: 'tinymce' } + meta: { title: 'Tinymce' } }, { path: 'markdown', component: 'views/components-demo/markdown', name: 'MarkdownDemo', - meta: { title: 'markdown' } + meta: { title: 'Markdown' } }, { path: 'json-editor', component: 'views/components-demo/json-editor', name: 'JsonEditorDemo', - meta: { title: 'jsonEditor' } + meta: { title: 'Json Editor' } }, { path: 'split-pane', component: 'views/components-demo/split-pane', name: 'SplitpaneDemo', - meta: { title: 'splitPane' } + meta: { title: 'SplitPane' } }, { path: 'avatar-upload', component: 'views/components-demo/avatar-upload', name: 'AvatarUploadDemo', - meta: { title: 'avatarUpload' } + meta: { title: 'Avatar Upload' } }, { path: 'dropzone', component: 'views/components-demo/dropzone', name: 'DropzoneDemo', - meta: { title: 'dropzone' } + meta: { title: 'Dropzone' } }, { path: 'sticky', component: 'views/components-demo/sticky', name: 'StickyDemo', - meta: { title: 'sticky' } + meta: { title: 'Sticky' } }, { path: 'count-to', component: 'views/components-demo/count-to', name: 'CountToDemo', - meta: { title: 'countTo' } + meta: { title: 'Count To' } }, { path: 'mixin', @@ -194,31 +194,31 @@ export const asyncRoutes = [ path: 'back-to-top', component: 'views/components-demo/back-to-top', name: 'BackToTopDemo', - meta: { title: 'backToTop' } + meta: { title: 'Back To Top' } }, { path: 'drag-dialog', component: 'views/components-demo/drag-dialog', name: 'DragDialogDemo', - meta: { title: 'dragDialog' } + meta: { title: 'Drag Dialog' } }, { path: 'drag-select', component: 'views/components-demo/drag-select', name: 'DragSelectDemo', - meta: { title: 'dragSelect' } + meta: { title: 'Drag Select' } }, { path: 'dnd-list', component: 'views/components-demo/dnd-list', name: 'DndListDemo', - meta: { title: 'dndList' } + meta: { title: 'Dnd List' } }, { path: 'drag-kanban', component: 'views/components-demo/drag-kanban', name: 'DragKanbanDemo', - meta: { title: 'dragKanban' } + meta: { title: 'Drag Kanban' } } ] }, @@ -228,7 +228,7 @@ export const asyncRoutes = [ redirect: 'noRedirect', name: 'Charts', meta: { - title: 'charts', + title: 'Charts', icon: 'chart' }, children: [ @@ -236,19 +236,19 @@ export const asyncRoutes = [ path: 'keyboard', component: 'views/charts/keyboard', name: 'KeyboardChart', - meta: { title: 'keyboardChart', noCache: true } + meta: { title: 'Keyboard Chart', noCache: true } }, { path: 'line', component: 'views/charts/line', name: 'LineChart', - meta: { title: 'lineChart', noCache: true } + meta: { title: 'Line Chart', noCache: true } }, { path: 'mixchart', component: 'views/charts/mixChart', name: 'MixChart', - meta: { title: 'mixChart', noCache: true } + meta: { title: 'Mix Chart', noCache: true } } ] }, @@ -258,7 +258,7 @@ export const asyncRoutes = [ redirect: '/nested/menu1/menu1-1', name: 'Nested', meta: { - title: 'nested', + title: 'Nested', icon: 'nested' }, children: [ @@ -266,33 +266,33 @@ export const asyncRoutes = [ path: 'menu1', component: 'views/nested/menu1/index', name: 'Menu1', - meta: { title: 'menu1' }, + meta: { title: 'Menu1' }, redirect: '/nested/menu1/menu1-1', children: [ { path: 'menu1-1', component: 'views/nested/menu1/menu1-1', name: 'Menu1-1', - meta: { title: 'menu1-1' } + meta: { title: 'Menu1-1' } }, { path: 'menu1-2', component: 'views/nested/menu1/menu1-2', name: 'Menu1-2', redirect: '/nested/menu1/menu1-2/menu1-2-1', - meta: { title: 'menu1-2' }, + meta: { title: 'Menu1-2' }, children: [ { path: 'menu1-2-1', component: 'views/nested/menu1/menu1-2/menu1-2-1', name: 'Menu1-2-1', - meta: { title: 'menu1-2-1' } + meta: { title: 'Menu1-2-1' } }, { path: 'menu1-2-2', component: 'views/nested/menu1/menu1-2/menu1-2-2', name: 'Menu1-2-2', - meta: { title: 'menu1-2-2' } + meta: { title: 'Menu1-2-2' } } ] }, @@ -300,7 +300,7 @@ export const asyncRoutes = [ path: 'menu1-3', component: 'views/nested/menu1/menu1-3', name: 'Menu1-3', - meta: { title: 'menu1-3' } + meta: { title: 'Menu1-3' } } ] }, @@ -308,7 +308,7 @@ export const asyncRoutes = [ path: 'menu2', name: 'Menu2', component: 'views/nested/menu2/index', - meta: { title: 'menu2' } + meta: { title: 'Menu2' } } ] }, @@ -319,7 +319,7 @@ export const asyncRoutes = [ redirect: '/example/list', name: 'Example', meta: { - title: 'example', + title: 'Example', icon: 'example' }, children: [ @@ -327,20 +327,20 @@ export const asyncRoutes = [ path: 'create', component: 'views/example/create', name: 'CreateArticle', - meta: { title: 'createArticle', icon: 'edit' } + meta: { title: 'Create Article', icon: 'edit' } }, { path: 'edit/:id(\\d+)', component: 'views/example/edit', name: 'EditArticle', - meta: { title: 'editArticle', noCache: true }, + meta: { title: 'Edit Article', noCache: true }, hidden: true }, { path: 'list', component: 'views/example/list', name: 'ArticleList', - meta: { title: 'articleList', icon: 'list' } + meta: { title: 'Article List', icon: 'list' } } ] }, @@ -353,7 +353,7 @@ export const asyncRoutes = [ path: 'index', component: 'views/tab/index', name: 'Tab', - meta: { title: 'tab', icon: 'tab' } + meta: { title: 'Tab', icon: 'tab' } } ] }, @@ -364,7 +364,7 @@ export const asyncRoutes = [ redirect: 'noRedirect', name: 'ErrorPages', meta: { - title: 'errorPages', + title: 'Error Pages', icon: '404' }, children: [ @@ -372,13 +372,13 @@ export const asyncRoutes = [ path: '401', component: 'views/error-page/401', name: 'Page401', - meta: { title: 'page401', noCache: true } + meta: { title: 'Page 401', noCache: true } }, { path: '404', component: 'views/error-page/404', name: 'Page404', - meta: { title: 'page404', noCache: true } + meta: { title: 'Page 404', noCache: true } } ] }, @@ -392,7 +392,7 @@ export const asyncRoutes = [ path: 'log', component: 'views/error-log/index', name: 'ErrorLog', - meta: { title: 'errorLog', icon: 'bug' } + meta: { title: 'Error Log', icon: 'bug' } } ] }, @@ -403,7 +403,7 @@ export const asyncRoutes = [ redirect: '/excel/export-excel', name: 'Excel', meta: { - title: 'excel', + title: 'Excel', icon: 'excel' }, children: [ @@ -411,25 +411,25 @@ export const asyncRoutes = [ path: 'export-excel', component: 'views/excel/export-excel', name: 'ExportExcel', - meta: { title: 'exportExcel' } + meta: { title: 'Export Excel' } }, { path: 'export-selected-excel', component: 'views/excel/select-excel', name: 'SelectExcel', - meta: { title: 'selectExcel' } + meta: { title: 'Select Excel' } }, { path: 'export-merge-header', component: 'views/excel/merge-header', name: 'MergeHeader', - meta: { title: 'mergeHeader' } + meta: { title: 'Merge Header' } }, { path: 'upload-excel', component: 'views/excel/upload-excel', name: 'UploadExcel', - meta: { title: 'uploadExcel' } + meta: { title: 'Upload Excel' } } ] }, @@ -439,13 +439,13 @@ export const asyncRoutes = [ component: 'layout/Layout', redirect: '/zip/download', alwaysShow: true, - meta: { title: 'zip', icon: 'zip' }, + meta: { title: 'Zip', icon: 'zip' }, children: [ { path: 'download', component: 'views/zip/index', name: 'ExportZip', - meta: { title: 'exportZip' } + meta: { title: 'Export Zip' } } ] }, @@ -459,7 +459,7 @@ export const asyncRoutes = [ path: 'index', component: 'views/pdf/index', name: 'PDF', - meta: { title: 'pdf', icon: 'pdf' } + meta: { title: 'PDF', icon: 'pdf' } } ] }, @@ -478,7 +478,7 @@ export const asyncRoutes = [ path: 'index', component: 'views/theme/index', name: 'Theme', - meta: { title: 'theme', icon: 'theme' } + meta: { title: 'Theme', icon: 'theme' } } ] }, @@ -492,7 +492,7 @@ export const asyncRoutes = [ path: 'index', component: 'views/clipboard/index', name: 'ClipboardDemo', - meta: { title: 'clipboardDemo', icon: 'clipboard' } + meta: { title: 'Clipboard Demo', icon: 'clipboard' } } ] }, @@ -505,7 +505,7 @@ export const asyncRoutes = [ path: 'index', component: 'views/i18n-demo/index', name: 'I18n', - meta: { title: 'i18n', icon: 'international' } + meta: { title: 'I18n', icon: 'international' } } ] }, @@ -516,7 +516,7 @@ export const asyncRoutes = [ children: [ { path: 'https://github.com/PanJiaChen/vue-element-admin', - meta: { title: 'externalLink', icon: 'link' } + meta: { title: 'External Link', icon: 'link' } } ] }, diff --git a/package.json b/package.json index 6802c9b5..04c71cb1 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,11 @@ { - "name": "vue-element-admin", - "version": "4.0.1", + "name": "adempiere-vue", + "version": "4.1.0", "description": "A magical vue admin. An out-of-box UI solution for enterprise applications. Newest development stack of vue. Lots of awesome features", "author": "Pan ", "license": "MIT", "scripts": { + "start": "vue-cli-service serve", "dev": "vue-cli-service serve", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", @@ -43,6 +44,11 @@ "url": "https://github.com/PanJiaChen/vue-element-admin/issues" }, "dependencies": { + "@adempiere/grpc-access-client": "^1.1.6", + "@adempiere/grpc-data-client": "^1.7.3", + "@adempiere/grpc-dictionary-client": "^1.3.1", + "@adempiere/grpc-enrollment-client": "^1.0.6", + "autoprefixer": "^9.5.1", "axios": "0.18.0", "clipboard": "2.0.4", "codemirror": "5.45.0", @@ -55,6 +61,8 @@ "js-cookie": "2.2.0", "jsonlint": "1.6.3", "jszip": "3.2.1", + "mime-type": "^3.0.7", + "moment": "^2.24.0", "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", @@ -65,9 +73,11 @@ "vue": "2.6.10", "vue-count-to": "1.0.13", "vue-i18n": "7.3.2", - "vue-router": "3.0.2", + "vue-multipane": "^0.9.5", + "vue-router": "3.0.4", + "vue-split-panel": "^1.0.4", "vue-splitpane": "1.0.4", - "vuedraggable": "2.20.0", + "vuedraggable": "^2.20.0", "vuex": "3.1.0", "xlsx": "0.14.1" }, @@ -76,12 +86,12 @@ "@babel/register": "7.0.0", "@vue/cli-plugin-babel": "3.5.3", "@vue/cli-plugin-eslint": "3.5.1", - "@vue/cli-plugin-unit-jest": "3.5.3", + "@vue/cli-plugin-unit-jest": "^3.7.0", "@vue/cli-service": "3.5.3", "@vue/test-utils": "1.0.0-beta.29", "babel-core": "7.0.0-bridge.0", "babel-eslint": "10.0.1", - "babel-jest": "23.6.0", + "babel-jest": "^24.8.0", "chalk": "2.4.2", "chokidar": "2.1.5", "connect": "3.6.6", diff --git a/public/favicon.ico b/public/favicon.ico index 34b63ac63a87ee3ea8e7a0f3f5b5406c437e2112..a8552724cedb17e1683a925d31d9524508015fed 100644 GIT binary patch literal 1150 zcmeH_Jxg3s5Qbl)Rsj_hn>3Oty=}yRmDpGYLkJiU5sM`H11^DpO}uxni64j{mTNC| z+8Go=K6dX$R#A5&q!2||aRv3{nR8uO@(+aUGI!2=yzk7JGg1Tpwl?wY(rA;^Dd`D< z3s34tNyOS8rsD1YALT;r6hF!R40V%ayuRgpi{IrVIrHt#$Q{fPi?sFc$nqJD9?pAQ zmH35W3~PKjY~&n&0lQLKfHPK)ak#7+P46zKgPaqqlf-(%`RI7j*PVlV3BGZBZ;8Kz z_Y1OGkGC_v#j_P(cM6VyLaYy9pW@FIG8*ysid0TQ4Z^kmZCZ~E7X*4>n*81}z0u=$ z^52oal|&jd+^<-}U{3!m(Nm@e&ha~ z57m#hxop>P?v8`p3A+P&jo$mL_K#54oQJ?o($_1v*Y{^Vm&5Kh4)FdCpo ziaJ)){#e(8=K!De?@W)pneBmpf7_2*KlpBJAHbK2v07>z_fD+QduTcpZ^!(<`r-N literal 67646 zcmeHQ33wdEm2O$a2gEi66S8a^!){2(X2Y@}*zze`)?rJU(MUFiMYeol`2frK#KsuO zmSjtF$~K2NVhlNfB)}R7SkfFaCWOr{`-RN#4YIW(H- zo|aUj@2RJ{r>m>p|LWDNSFfrSr2u~|Eeif$u3R;tK>3)WC|7}SiYLW+e&x3_lNCW) zTK<C+ zR1SCpF}#VnD^NAY(^oSQ_)Y=-Q*rK69RC8x%Ygl*pi6-NM{#|U$L|<_q}x%@6|58T zLYZ(QKeyk8bhWAVkPjO?2iki|(6)h5$e}pLQj0&7qVaE>Z7c&zo=1K1Eq%6 zPiCH&1BdlEaj^n`p2H2XH-4&`R zaKVOzju8668Ca6LijVS~I{X!|<*Jo?14|3sA^XR{_hyjUxF?dKKcgH!1N|%L9(TY| z2K#cdCuAS%3oX;eA1Jr{WXAz_z@{ANU04A7>+jL-p9Zi007`^MKF@uCGW`m47X8B( z*pZ(BUEm4TVO(ifyuDHmh9U*zoy%WY2;57-+wX(^1j;AQ>7GrUKw0=Ps1sD|_1iAy z_{598q3GG6aAEY`)74uI>}zU4Z-CPA-ip`%8|8iwRO1cVF6jz!jA|RbfM!s07yWm^ znsU&OKvu*ylQR7rb@)2yMo*~vLfA1%M@ZU;iNwK!@f7@aw4c5Jew`fw*z4tl`rs7s zU)>q3yb!iRLCeb(&=m7g`Yy$q5yZX>4Kn_O3$Axhb>N*GY|4&dlK8^J2zXK1R2Q`8xQ`s+) zM)Jqyw-=zk$3cGtjdXkmTfbj}7ta9uTF^vKpqe~V=o24FANcs-=d*tvb^G^WgMFYz zbtfUr4-XdK!Tyfp#z!&VGy{FZcwcC#LVY<>K41Nh-SqYB0?{5GEKlRk_1 zsQd0NA4tc_#kJ07Z7SMqF3U*U;2qF@#Jv1f+lysmFz1AJQ#b6z0ArphsMnLj0eg3^ zUEOh@L|s`qLr?>bdRn<;hPq~Hk&ppzUrzCl$P)X!^eHMa- zg^#}j?RxuN3)PM5=c=n~W~wVHAP2x)Pb(^}Q*Yb5Ky^N!a~%+o0Umz~dKj@u^ST0c zV-S-vEJeWCEByT1Q5VKu>FZ~?@9gh)9a^Mr**0Ho{aU4ZM^~A;sd28_V4K+w|CNhp zsH)B}$$R-xOBuE)Q@hj=^iXI!h&)?GHNko8#fO=uCw^Vie4acA5pxyKg@Go)ttH&OFu~s>PSmsmRw_08n z;OC&-|FY%rN88_a$AT!%TW*`Lc0OlQ+n%UWH{Lu~Wt-Rc0ZcdTC^ote(CZfZ5#NE1 z+5x&`f8Qd@+XX(v*CS?X3ChiJuD&kT`i{0wtT%0#8}08`*=MSat7og5HqKMm-7qUE z7kU|3v#dz;6DHS<@llT>Hu~D5y>*4qTb9)UzFylHjAz%I%%6;9i+23MuPjm5ub8dj zkG8#{{5o|7j+BGdj-rJ4H&o3~ceO84Ic6}qj?@LOf$A}rK8bdL6+gb9?E;kXu*tm1 z91H0F-LU%_s$u5=bGGZPyNlKJD`yYX`#KwdW5lMN#j2~vbo?WAWPEBn@SldGa=*o5 z44|7XMY$fcGX8A)?Bh4AofFmlYwC)`7=X6mfPP<(KfbT~hgoVn?$2W#e~)KB0s6Zy zbuTM$`K=RY0=c{b<>LHzKKYaK*>1mGy}fhMK>ZFqpzrIGePwzM zakDRBook6Z=oo92IYspSSD{>%jql^w{m_%N@6q-LiFYD7*t~gOzVVO9${WzR%YpxR z#uw!K1MC^=!Sz*<@>%Lg-On*UeL0D69n?9<4ef+O-$ox`yf0`l{QD{J-w6CC4J5Z5c^O$`A1nIMi;l9e;B z=c)TS=1YY=$No3pG%KZya6W+Z1)Mjuhz=lM!!lrl9>~x5(9-y0%*Q$2RBfL=Uity= zyr*2)`N{MEf45=H95D_sVLl*}HuDQ$-vpZ2b*2h?UYNVTftB&6?%(4oO^g3ljPE<1 zsaCh&xiI-}(Lb!h9MSF$_<|r;7SnhCg|%t*DAU-^fVr^*R>q(H-p!ll4IKCB#`kR3 zP1}oA#(K1zT&%9bd~mY9g1@Ezn0BDWbO7b?Cx|5|+0(t=R9nEx_}_VNx#ri^;T?}H z`*n`(ou}>40XB8*^~uKx#J_RX9JTcum8wB;A=&DcvzUwd8#mUfn)R_V{`B`!XUAh6 zO+%+M&S(Gea?ze$-FEndF+Z3>UYOqxpm691pHtUL?i_ZvDI-@b3Wr8!=CmY#b=^!kplp_m%70oYlT_uE2va!4&RU zVdMwT`7Fpfai74j^E;Z|&-wj$?3v~`zUAS?1Lt&cFXKIL+XEXQncfK728+`xlDXom|(teZVcZ%+uzCtbzAHS%yylbJm~k>NRdGfO)8k!MhU?{^j)u?5O)0 zvzbiyNARRCKUw?dIFRcD=o^UqKGBhJV-_9@QXVibXWxwZp+cj20PJ@$5zpWry@}+{ z)N{1Q>BAGToGJQm>h8Us(xhc$K8y{gjhLzrApU#3mh}a&e(VFD1&ucfe@|~E*RyT} zCFQ3n*U+LYxf7J* zm*}I7GXNl1@HunOhc^>E+dRGi|2FvL*WHLX{uH{O@w|IHWr*WQEvxJU*tf5))#8N* z^#90*&*3;>|M3bd`-0wsjl12b_RoA_Uwj(a`}2uEqRc#hxbn@O;{v3Gp%d zJmb99Ek_(z{cLRxH$fl3HU5m>81z~W;J?RRD%Oank}LWNb~KkHw^`O0VvXWT~NPo|G2l?}kY zf%3JpwPf&pi+OzdE$s7+#^YbjKA;U`?w+r}hx>UX)cIkXjo5IV-+@Om)BO=yZhKtY zGa{W0z*rL6p%&8tKZE{XXf*!J-xGAu4`klnkLYXJ_C>r#0(&ol7w7xw%Ngq04c@n_ zEy4Oh-I#!Vz^z;7ix@(S;r}M~oV(N<{Oy+kf75J$n2#p8pPsm|?PnXW!?{ASUziSa zAz$Bi8;+%d8P&Kl~@O{l_pqA7=*shkMH~7hrz?&;29Fcsl^?|8{4o7PFnC z{YUIR#`k7ZCdLFL!hh}cv!H*pcp)*qL|-&iJ(ErOlHB_T=%O`7&j0D<>JZ=M8L}@$ zS>8=jo~$s?=Slw^+Zt_pw(*Frk3SNB&I#!6&G)%JK5{0i_bCuslr^+h*xuK?-* zGvq)0Gk$_SWUk;l_ssZoVC@Osq4#mr{f9=^-+RU({PV)@3*%3$N&Wo)xV8oTa#npZ z@TdNuFR)+U@v?xlur;ub$RawxiM<8SN1HSQex)O@lyd>&&<7j?{@m--uy#QFwe=m^ z{*4V)GsXH$uH|EFPXs5n+2${0AE!lIgTAA6HzwXMBqDn}Zdfzd3gf_Y;Q!3Gwtd7D z>?04sUPX)tCrsA9j9#A*P~SUUfAx~7c_03kGSvfnh)4zjL{mjzc-b<;&~!2 z2;+!|Y>B=A`i1krTd;r7kzQKKj8PBEzrd|+P{%Hfb%^4e2sV(bqxCkt~KR;qKpfr-`L3dr^)+O z*he$kU%nyIEKNOn{f=>nt!Y9T8Ha8NANJj&&CN3gM_?Z5i-8Bv(I3kg4X)M8RT+ps z_l)IyfUq;d&!pWi_K?GKx#ooWXY*$46@WFxxq5a6`TQR3Z>O)XX6%uk{Jew6eY%dm zz^g%TWKizG^9nvc&db%8VgJ6c%@;X}Hh-{0rG5}L7=D|pG7x{Uj~M2e6Foap2F?f3 z=fE*TR(5CRZHG43Q+N-dlT*R2cZip|tfoaBIl>+~GI80A-%z?7- z-Je*8l6xMoPiGtl{dxz#TB#AfA9~W@b(tIsLbveQZI9vkk!Qyp4;x*Mfjs?R@OkSI zf30D$-kA!KJ0#`=A2tGi=E*irovbHQ^evy8;Mt~^BPIj%w;sj2wx{?k^d5i5mvMd$ob4~jh8)I;cf^x|D9_bNr0eOoJ8{x9?3dVZ#F~3&;Jv(HKjK0wss5~Dy zJPtC{Cp^Nj*6SIz`!m3P0mx|hvd&*sRp_RgVw73h0onIeY(w7!?q6)~E6ExgGcxG- zZWVmOjtM9?{Q>6024v4?eS5RY_un9v2XlIkEA9?nubl9&Gy}e@pK%oL!1kRLK0&M# zvYQqk1X;5RZrPTDZRS!r@0;-D9DuI>!pU!~QGh>ac>!&ko_SdDgDfc+rH z#ct57&c4bCoI4|p(Wjk6y*~gM-L|ZjKi`>h4#Y9>wTPRXjLhndP(vJ_&jrM4y(`FfyV%+$ZNpAP?mKb7%(>Iz!O&z}`x8cgZlz<@wfNnS#CP zXbaFDJPR^{-&Vc$_HACj?J7^717qNk-M42d58OYZqvuAvN7%7o1j)cVsLTDpeL3PX zrn&mi&QVXVfqQXg%6BXM-sP`TI(wFn!8=SS1K$S?H+z8NcKU42BKCO~j@O}2zo;v; z3^oq>b_>MhSqbk%WpQKun6q~o-zR=8_}2@v`nZ5H%5^SpV;pk=WA`PPm%9vm%Zo5a@7~-Dj)hRUI#smxwuC7XRieQ6EJow z;CwvVzvAk({=9q=2=ac~9f1D>1Ya@Ud+*o;KL0a_`ZZVh4J9AiaV*C-Kuxe!{ubl4 z^MHQ={j>DV3%?EGo#ZDs9N=8R&euxOe~R%T{UkpI4F$WQ-b4TNX^;>4Xcfk4SG)XG zSl_CR*}DAJi?_=S=dF{A@D+pKt{$voM!XZ^AH3lITcDw0n(DsaAYb|+I6q0fQ;IhI z*PX%2v9#ehR(HcEFF)pU0P8)3j>TAUGWuBVHMa%Cwn@EAUn*lH*heH9H}E|D?EDRX z%RQ>-kD)#}1#)8C!MKDX$k?ZV^M%J=s;A!3bb1hTufufC-F&2sd!iQ@h%q!{NkTQ} zp%0$w4m#jFcdP?JFW8>|etp306%c)GJiY{ZLHxP>5qx)IOtux@?VziX{!1J$Mm`rD zdSUq(AKEzkaoNs|!!Q>)yZw02F>wM_oVXiyVr?Pt=e`pYaDF1rGu}8#z#p-P_VK`e z9DHwMy@Bd6zB3$`GY_#&4Y5hJ%HiPBTog~{VIl`y7%z&L5)oGtZogsK(C`)e5kzsO z@6|(nj(%MBFqYOb(5k~swGzeBT8Uz5tx8&TMIl6ny7Y8DK$jL7hO5sTL;~ zlvtnU1N7C!QI(h$xxtqM^J|3iKI-A_RE*W=R^fEL{kfJe%7F|G%7zi&qR zT#7U<>j8-u*!VQ%P2T`mJbijP(>jJ0$EBN@)-ixd9Rsum8LObkURU8_@$*;(o3(VL zg5lev6(TeFiAY>HyJ&&6tI-0B%JE#dfRUd^3RoQZeYk+pq*kEl?O~2I$F7qjy2~QN X;@D+E7Ad=S_FbjlW&KY_+xPzm3MBT? diff --git a/src/App.vue b/src/App.vue index ec9032c1..117eb414 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,6 +6,27 @@ diff --git a/src/api/ADempiere/constants.js b/src/api/ADempiere/constants.js new file mode 100644 index 00000000..d399050a --- /dev/null +++ b/src/api/ADempiere/constants.js @@ -0,0 +1,14 @@ + +export const ADDRESS_HOST = 'http://localhost' + +export const PORT_DICTIONARY = '8990' +export const HOST_GRPC_DICTIONARY = ADDRESS_HOST + ':' + PORT_DICTIONARY + +export const PORT_DATA = '8991' +export const HOST_GRPC_DATA = ADDRESS_HOST + ':' + PORT_DATA + +export const PORT_AUTHENTICATION = '8989' +export const HOST_GRPC_AUTHENTICATION = ADDRESS_HOST + ':' + PORT_AUTHENTICATION + +export const PORT_ENROLLMENT = '8992' +export const HOST_GRPC_ENROLLMENT = ADDRESS_HOST + ':' + PORT_ENROLLMENT diff --git a/src/api/ADempiere/data.js b/src/api/ADempiere/data.js new file mode 100644 index 00000000..cc98a996 --- /dev/null +++ b/src/api/ADempiere/data.js @@ -0,0 +1,320 @@ +import { getLanguage } from '@/lang/index' +import { getToken } from '@/utils/auth' +import BusinessData from '@adempiere/grpc-data-client' +import { HOST_GRPC_DATA } from '@/api/ADempiere/constants' + +// Get Instance for connection +function Instance() { + return new BusinessData( + HOST_GRPC_DATA, + getToken(), + getLanguage() || 'en_US' + ) +} + +/** + * Converted the gRPC value to the value needed + * @param {object} grpcValue Value get of gRPC + * @returns {mixed} + */ +export function convertValueFromGRPC(grpcValue) { + return Instance.call(this).convertValueFromGRPC(grpcValue) +} + +/** + * Create entity + * @param {string} parameters.tableName + * @param {array} parameters.attributesList + */ +export function createEntity(parameters) { + var entityRequest = Instance.call(this).getCreateEntityRequest() + entityRequest.setTablename(parameters.tableName) + if (parameters.attributesList && parameters.attributesList.length) { + parameters.attributesList.forEach(attribute => { + const convertedAttribute = Instance.call(this).convertParameter(attribute) + entityRequest.addAttributes(convertedAttribute) + }) + } + // Create Entity + return Instance.call(this).createEntity(entityRequest) +} + +/** + * Update entity + * @param {string} parameters.tableName + * @param {integer} parameters.recordId + * @param {string} parameters.recordUuid + * @param {array} parameters.attributesList + */ +export function updateEntity(parameters) { + var entityRequest = Instance.call(this).getUpdateEntityRequest() + entityRequest.setTablename(parameters.tableName) + if (parameters.recordId) { + entityRequest.setRecordid(parameters.recordId) + } + entityRequest.setUuid(parameters.recordUuid) + if (parameters.attributesList && parameters.attributesList.length) { + parameters.attributesList.forEach(attribute => { + const convertedAttribute = Instance.call(this).convertParameter(attribute) + entityRequest.addAttributes(convertedAttribute) + }) + } + // Update Entity + return Instance.call(this).updateEntity(entityRequest) +} + +/** + * Delete entity + * @param {string} parameters.tableName + * @param {integer} parameters.recordId + * @param {string} parameters.recordUuid + * @param {array} parameters.attributesList + */ +export function deleteEntity(parameters) { + var entityRequest = Instance.call(this).getUpdateEntityRequest() + entityRequest.setTablename(parameters.tableName) + if (parameters.recordId) { + entityRequest.setRecordid(parameters.recordId) + } + entityRequest.setUuid(parameters.recordUuid) + + // Delete Entity + return Instance.call(this).deleteEntity(entityRequest) +} + +export function getCriteria(tableName) { + return Instance.call(this).getCriteria(tableName) +} + +export function getObject(table, uuid = false, id = false) { + return Instance.call(this).getEntity( + Instance.call(this).getEntityRequest(table, uuid, id) + ) +} + +/** + * Object List from window + * @param {string} object.tableName + * @param {string} object.query + * @param {string} object.whereClause + * @param {string} object.orderByClause + */ +export function getObjectListFromCriteria(object) { + const criteriaForList = getCriteria(object.tableName) + + criteriaForList.setQuery(object.query) + + if (object.whereClause) { + criteriaForList.setWhereclause(object.whereClause) + } + if (object.orderByClause) { + criteriaForList.setOrderbyclause(object.orderByClause) + } + + // add conditions + if (object.conditions && object.conditions.length) { + object.conditions.forEach(itemCondition => { + const convertCondition = Instance.call(this).convertCondition(itemCondition) + criteriaForList.addConditions(convertCondition) + }) + } + + var nextPageToken + if (object.nextPageToken) { + nextPageToken = object.nextPageToken + } + return Instance.call(this).requestObjectListFromCriteria(criteriaForList, nextPageToken) +} + +/** + * Rollback entity (Create, Update, Delete) + * @param {string} parametersRollback.tableName + * @param {integer} parametersRollback.recordId + * @param {string} parametersRollback.eventType + */ +export function rollbackEntity(parametersRollback) { + var rollbackRequest = Instance.call(this).getRollbackEntityRequest() + rollbackRequest.setTablename(parametersRollback.tableName) + rollbackRequest.setRecordid(parametersRollback.recordId) + + // set event type + var eventType = Instance.call(this).getEventType() + eventType = eventType[parametersRollback.eventType] + rollbackRequest.setEventtype(eventType) + + return Instance.call(this).rollbackEntityRequest(rollbackRequest) +} + +/** + * Request a Lookup list data from Reference + * The main attributes that function hope are: + * @param {string} reference.tableName + * @param {string} reference.query + */ +export function getLookupList(reference) { + return Instance.call(this).requestLookupListFromReference(reference) +} + +/** + * Request a Lookup data from Reference + * The main attributes that function hope are: + * @param {string} reference.tableName + * @param {string} reference.directQuery + * @param {string|number} value + */ +export function getLookup(reference) { + return Instance.call(this).requestLookupFromReference({ + tableName: reference.tableName, + directQuery: reference.directQuery + }, reference.value) +} + +/** + * Request a process + * This function allows follow structure: + * @param {object} process + * @param {string} process.uuid, uuid from process to run + * @param {integer} process.tableName, table name of tab, used only window + * @param {integer} process.recordId, record identifier, used only window + * @param {array} process.parameters, parameters from process + [ { columnName, value } ] + * @param {array} process.selection, selection records, used only browser + [ { + selectionId, + selectionValues [ + { columnName, value } + ] + } ] + */ +export function runProcess(process) { + var processRequest = Instance.call(this).getProcessRequest() + // Fill Request process + processRequest.setUuid(process.uuid) + // report export type + if (process.reportType) { + processRequest.setReporttype(process.reportType) + } + // process params + if (process.parameters && process.parameters.length) { + process.parameters.forEach(parameter => { + const convertedParameter = Instance.call(this).convertParameter(parameter) + processRequest.addParameters(convertedParameter) + }) + } + + // record in window + if (process.tableName) { + processRequest.setTablename(process.tableName) + processRequest.setRecordid(process.recordId) + } + + // browser selection list records + if (process.selection && process.selection.length) { + process.selection.forEach(record => { + // selection format = { selectionId: integer, selectionValues: array } + const convertedRecord = Instance.call(this).convertSelection(record) + processRequest.addSelections(convertedRecord) + }) + } + + // Run Process + return Instance.call(this).requestProcess(processRequest) +} + +/** + * Request a browser search + * This function allows follow structure: + * @param {string} browser.uuid + * @param {string} browser.query + * @param {string} browser.whereClause + * @param {string} browser.orderByClause + * @param {array} browser.parameters + * [{ + * columnName, + * value + * }] + */ +export function getBrowserSearch(browser) { + var browserRequest = Instance.call(this).getBrowserRequest() + var criteria = Instance.call(this).getCriteria('') + // Fill Request browser + browserRequest.setUuid(browser.uuid) + criteria.setQuery(browser.query) + criteria.setWhereclause(browser.whereClause) + criteria.setOrderbyclause(browser.orderByClause) + + if (browser.nextPageToken) { + browserRequest.setPageToken(browser.nextPageToken) + } + browserRequest.setCriteria(criteria) + /* isQueryCriteria fields parameters */ + if (browser.parameters !== undefined) { + browser.parameters.forEach(parameter => { + const convertedParameter = Instance.call(this).convertParameter(parameter) + browserRequest.addParameters(convertedParameter) + }) + } + // Run browser + return Instance.call(this).requestBrowser(browserRequest) +} + +// Request a Process Activity list +export function requestProcessActivity() { + // Get Process Activity + return Instance.call(this).requestProcessActivity() +} + +export function getRecentItems() { + return Instance.call(this).requestRecentItems() +} +/** + * forget password + * @param {string} parameters.forgetPassword + */ +export function getForgetPassword(parameters) { + return Instance.call(this).requestForgetPassword(parameters) +} + +/** + * Reference List from Window + * @param {string} parameters.tableName + * @param {string} parameters.windowUuid + * @param {string} parameters.recordUuid + * @param {integer} parameters.recordId + */ +export function getReferencesList(parameters) { + var requestReference = Instance.call(this).getReferencesRequest() + requestReference.setWindowuuid(parameters.windowUuid) + requestReference.setTablename(parameters.tableName) + requestReference.setUuid(parameters.recordUuid) + if (parameters.recordId) { + requestReference.setRecordid(parameters.recordId) + } + + return Instance.call(this).listReferencesRequest(requestReference) +} + +/** + * Run callout request + * @param {string} parametersCallout.windowUuid + * @param {integer} parametersCallout.windowNo + * @param {string} parametersCallout.tabUuid + * @param {string} parametersCallout.tableName + * @param {string} parametersCallout.columnName + * @param {mixed} parametersCallout.value + * @param {mixed} parametersCallout.oldValue + * @param {string} parametersCallout.callout + * @param {array} parametersCallout.attributesList + * @returns {Map} Entity + */ +export function runCallOutRequest(parametersCallout) { + return Instance.call(this).runCalloutRequest(parametersCallout) +} + +export function getDefaultValueFromServer(query) { + return Instance.call(this).getDefaultValue(query) +} + +export function getContextInfoValueFromServer({ uuid, query }) { + return Instance.call(this).getContextInfoValue({ uuid: uuid, query: query }) +} diff --git a/src/api/ADempiere/dictionary.js b/src/api/ADempiere/dictionary.js new file mode 100644 index 00000000..10376e87 --- /dev/null +++ b/src/api/ADempiere/dictionary.js @@ -0,0 +1,33 @@ +import { getLanguage } from '@/lang/index' +import { getToken } from '@/utils/auth' +import Dictionary from '@adempiere/grpc-dictionary-client' +import { HOST_GRPC_DICTIONARY } from '@/api/ADempiere/constants' + +// Get Instance for connection +function Instance() { + return new Dictionary( + HOST_GRPC_DICTIONARY, + getToken(), + getLanguage() || 'en_US' + ) +} + +export function getWindow(uuid, childrenTabs = true) { + return Instance.call(this).requestWindow(uuid, childrenTabs) +} + +export function getProcess(uuid) { + return Instance.call(this).requestProcess(uuid) +} + +export function getBrowser(uuid) { + return Instance.call(this).requestBrowser(uuid) +} + +export function getTab(uuid, childrenFields = true) { + return Instance.call(this).requestTab(uuid, childrenFields) +} + +export function getField(uuid) { + return Instance.call(this).requestField(uuid) +} diff --git a/src/api/ADempiere/enrollment.js b/src/api/ADempiere/enrollment.js new file mode 100644 index 00000000..f463c146 --- /dev/null +++ b/src/api/ADempiere/enrollment.js @@ -0,0 +1,38 @@ +import Enrollment from '@adempiere/grpc-enrollment-client' +import { HOST_GRPC_ENROLLMENT } from '@/api/ADempiere/constants' + +// Get Instance for connection +function Instance() { + return new Enrollment( + HOST_GRPC_ENROLLMENT, + 3.9, + 'ADempier-Vue' + ) +} + +/** + * enroll User + * @param {string} userData.name + * @param {string} userData.userName + * @param {string} userData.password + */ +export function enrollmentUser(userData) { + return Instance.call(this).enrollUser(userData) +} + +/** + * Request from forgot password + * @param {string} eMailOrUserName + */ +export function forgotPassword(eMailOrUserName) { + return Instance.call(this).requestResetPassword(eMailOrUserName) +} + +/** + * Request from reset password with token + * @param {string} token + * @param {string} password + */ +export function resetPasswordFromToken(token, password) { + return Instance.call(this).resetPasswordFromToken(token, password) +} diff --git a/src/api/ADempiere/index.js b/src/api/ADempiere/index.js new file mode 100644 index 00000000..e77829ff --- /dev/null +++ b/src/api/ADempiere/index.js @@ -0,0 +1,4 @@ +// Export dictionary connection +export * from './dictionary' +// Export data connection +export * from './data' diff --git a/src/api/user.js b/src/api/user.js index de69f707..d58ec48c 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -1,24 +1,96 @@ -import request from '@/utils/request' +import { getLanguage } from '@/lang/index' +import Access from '@adempiere/grpc-access-client' +import { HOST_GRPC_AUTHENTICATION } from '@/api/ADempiere/constants' -export function login(data) { - return request({ - url: '/user/login', - method: 'post', - data - }) +// Instance for connection +function Instance() { + return new Access( + HOST_GRPC_AUTHENTICATION, + 'Version Epale', + getLanguage() || 'en_US' + ) } +// Make login by UserName and password, this function can return user data for show +export function login(loginValues) { + if (loginValues.role !== undefined && loginValues.role.trim() !== '') { + return Instance.call(this).requestLogin( + loginValues.userName, + loginValues.password, + loginValues.role, + null, + loginValues.language + ) + } else { + return Instance.call(this).requestLoginDefault( + loginValues.userName, + loginValues.password, + loginValues.language + ) + } +} + +// Get User Info from session Uuid or token export function getInfo(token) { - return request({ - url: '/user/info', - method: 'get', - params: { token } - }) + return Instance.call(this).requestUserInfoFromSession(token) + .then(session => { + var roles = [] + var rolesList = session.getRolesList().map(itemRol => { + roles.push(itemRol.getName()) + return { + id: itemRol.getId(), + uuid: itemRol.getUuid(), + name: itemRol.getName(), + description: itemRol.getDescription(), + clientId: itemRol.getClientid(), + clientName: itemRol.getClientname(), + organizationList: itemRol.getOrganizationsList() + } + }) + // TODO: Add user.id, user.level in request + const user = session.getUserinfo() + + const response = { + name: user.getName(), + comments: user.getComments(), + description: user.getDescription(), + // TODO: Add from ADempiere + avatar: 'https://avatars1.githubusercontent.com/u/1263359?s=200&v=4', + roles: roles, // rol list names, used from app (src/permission.js, src/utils/permission.js) + rolesList: rolesList, + responseGrpc: session + } + return response + }).catch(error => { + console.log(error) + }) } -export function logout() { - return request({ - url: '/user/logout', - method: 'post' - }) +/** + * Get session info + * @param {string} sessionUuid + */ +export function getSessionInfo(sessionUuid) { + return Instance.call(this).getSession(sessionUuid) +} + +// Logout from server +export function logout(sessionUuid) { + return Instance.call(this).requestLogout(sessionUuid) +} + +// Get User menu from server +export function getMenu(sessionUuid) { + return Instance.call(this).requestUserMenuFromSession(sessionUuid) +} + +/** + * + * @param {string} attributes.sessionUuid + * @param {string} attributes.roleUuid + * @param {string} attributes.organizationUuid + * @param {string} attributes.warehouseUuid + */ +export function changeRole(attributes) { + return Instance.call(this).requestChangeRole(attributes) } diff --git a/src/components/ADempiere/Badge/index.vue b/src/components/ADempiere/Badge/index.vue new file mode 100644 index 00000000..f17293c8 --- /dev/null +++ b/src/components/ADempiere/Badge/index.vue @@ -0,0 +1,113 @@ + + + + diff --git a/src/components/ADempiere/ContextMenu/contextMenuDesktop.vue b/src/components/ADempiere/ContextMenu/contextMenuDesktop.vue new file mode 100644 index 00000000..e74a8f2a --- /dev/null +++ b/src/components/ADempiere/ContextMenu/contextMenuDesktop.vue @@ -0,0 +1,78 @@ + + + diff --git a/src/components/ADempiere/ContextMenu/contextMenuMixin.js b/src/components/ADempiere/ContextMenu/contextMenuMixin.js new file mode 100644 index 00000000..a4451660 --- /dev/null +++ b/src/components/ADempiere/ContextMenu/contextMenuMixin.js @@ -0,0 +1,410 @@ +import { showNotification } from '@/utils/ADempiere/notification' +import Item from './items' +import { convertFieldListToShareLink } from '@/utils/ADempiere/valueUtil' + +export const contextMixin = { + components: { + Item + }, + props: { + menuParentUuid: { + type: String, + default: undefined + }, + // uuid of the component where it is called + parentUuid: { + type: String, + default: undefined + }, + // uuid of the component where it is called + containerUuid: { + type: String, + required: true + }, + panelType: { + type: String, + default: undefined + }, + isReport: { + type: Boolean, + default: false + }, + lastParameter: { + type: String, + default: undefined + }, + reportFormat: { + type: String, + default: undefined + }, + modalMetadata: { + type: Object, + default: () => {} + }, + // used only window + isInsertRecord: { + type: Boolean, + default: undefined + } + }, + data() { + return { + actions: [], + references: [], + file: this.$store.getters.getProcessResult.download, + downloads: this.$store.getters.getProcessResult.url, + metadataMenu: {}, + recordUuid: this.$route.query.action, + isReferencesLoaded: false, + exportDefault: 'xls' + } + }, + computed: { + activeMenu() { + const { meta, path } = this.$route + // if set path, the sidebar will highlight the path you set + if (meta.activeMenu) { + return meta.activeMenu + } + return path + }, + getDataSelection() { + return this.$store.getters.getDataRecordSelection(this.containerUuid) + }, + relations() { + if (this.$route.params.menuParentUuid !== undefined) { + return this.$store.getters.getRelations(this.$route.params.menuParentUuid) + } + return this.$store.getters.getRelations(this.menuParentUuid) + }, + getterContextMenu() { + return this.$store.getters.getContextMenu(this.containerUuid) + }, + isReferecesContent() { + if (this.panelType === 'window' && !this.isEmptyValue(this.recordUuid) && this.recordUuid !== 'create-new') { + return true + } + return false + }, + getterReferences() { + if (this.isReferecesContent) { + return this.$store.getters.getReferencesList(this.parentUuid, this.recordUuid) + } + return [] + }, + permissionRoutes() { + return this.$store.getters.permission_routes + }, + valuesPanelToShare() { + return this.$store.getters.getParametersToShare({ + containerUuid: this.containerUuid, + isOnlyDisplayed: true, + isAdvancedQuery: this.$route.query.action === 'advancedQuery' + }) + }, + getterDataLog() { + if (this.panelType === 'window') { + return this.$store.getters.getDataLog(this.containerUuid, this.recordUuid) + } + return undefined + }, + processParametersExecuted() { + return this.$store.getters.getCachedReport(this.$route.params.instanceUuid).parameters + }, + getterWindowOldRoute() { + if (this.panelType === 'window') { + const oldRoute = this.$store.state.windowControl.windowOldRoute + if (!this.isEmptyValue(oldRoute.query.action) && oldRoute.query.action !== 'create-new' && this.$route.query.action === 'create-new') { + return oldRoute + } + } + return false + } + }, + watch: { + '$route.query.action'(actionValue) { + this.recordUuid = actionValue + // only requires updating the context menu if it is Window + if (this.panelType === 'window') { + this.generateContextMenu() + this.getReferences() + } + }, + isInsertRecord(newValue, oldValue) { + if (this.panelType === 'window' && newValue !== oldValue) { + this.generateContextMenu() + } + }, + getterDataLog(newValue, oldValue) { + if (this.panelType === 'window' && newValue !== oldValue) { + this.generateContextMenu() + } + } + }, + created() { + this.generateContextMenu() + }, + mounted() { + this.getReferences() + }, + methods: { + showNotification, + refreshData() { + if (this.panelType === 'window') { + this.$store.dispatch('getDataListTab', { + parentUuid: this.parentUuid, + containerUuid: this.containerUuid, + isRefreshPanel: true, + recordUuid: this.recordUuid + }) + } else if (this.panelType === 'browser') { + this.$store.dispatch('getBrowserSearch', { + containerUuid: this.containerUuid, + isClearSelection: true + }) + } + }, + getReferences() { + if (this.isReferecesContent) { + var references = this.getterReferences + if (references && references.length) { + this.references = references + this.isReferencesLoaded = true + } else { + this.$store.dispatch('getReferencesListFromServer', { + parentUuid: this.parentUuid, + containerUuid: this.containerUuid, + recordUuid: this.recordUuid + }) + .then(response => { + this.references = this.$store.getters.getReferencesList(this.parentUuid, this.recordUuid) + if (this.references.referencesList.length) { + this.isReferencesLoaded = true + } else { + this.isReferencesLoaded = false + } + }) + .catch(error => { + console.warn('References Load Error ' + error.code + ': ' + error.message) + }) + } + } else { + this.references = [] + this.isReferencesLoaded = false + } + }, + exporBrowser() { + this.$store.dispatch('startProcess', { + parentUuid: this.parentUuid, + containerUuid: this.containerUuid, + panelType: this.panelType, // determinate if get table name and record id (window) or selection (browser) + reportFormat: this.exportDefault + }) + .catch(error => { + console.warn(error) + }) + }, + generateContextMenu() { + this.metadataMenu = this.getterContextMenu + this.actions = this.metadataMenu.actions + + if (this.actions && this.actions.length) { + this.actions.forEach(itemAction => { + // if no exists set prop with value + itemAction.disabled = false + if (this.$route.name !== 'Report Viewer' && itemAction.action === 'changeParameters') { + itemAction.disabled = true + } + if (this.$route.meta.type === 'report' && itemAction.action === 'startProcess') { + itemAction.reportExportType = 'html' + } + if (this.$route.meta.type === 'process' && itemAction.type === 'summary') { + itemAction.disabled = true + } + + if (this.$route.meta.type === 'window') { + if (this.recordUuid === 'create-new') { + itemAction.disabled = true + } else { + if (this.isInsertRecord) { + itemAction.disabled = false + } else { + itemAction.disabled = true + } + } + if (itemAction.action === 'undoModifyData') { + itemAction.disabled = Boolean(!this.getterDataLog && !this.getterWindowOldRoute) + } + } + }) + } + }, + showModal(action) { + // TODO: Refactor and remove redundant dispatchs + if (action.type === 'process') { + var processData = this.$store.getters.getProcess(action.uuid) + if (processData === undefined) { + this.$store.dispatch('getProcessFromServer', { + containerUuid: action.uuid, + routeToDelete: this.$route + }) + .then(response => { + this.$store.dispatch('setShowDialog', { + type: action.type, + action: response + }) + }).catch(error => { + console.warn('ContextMenu: Dictionary Process (State) - Error ' + error.code + ': ' + error.message) + }) + } else { + this.$store.dispatch('setShowDialog', { type: action.type, action: processData }) + } + } else { + this.$store.dispatch('setShowDialog', { type: action.type, action: this.modalMetadata }) + } + }, + runAction(action) { + if (action.type === 'action') { + // run process or report + const fieldNotReady = this.$store.getters.isNotReadyForSubmit(this.$route.meta.uuid) + if (!fieldNotReady) { + var containerParams = this.$route.meta.uuid + if (this.lastParameter !== undefined) { + containerParams = this.lastParameter + } + + var parentMenu = this.menuParentUuid + if (this.$route.params) { + if (this.$route.params.menuParentUuid) { + parentMenu = this.$route.params.menuParentUuid + } + } + if (this.panelType === 'process') { + this.$store.dispatch('setTempShareLink', { processId: this.$route.params.processId, href: window.location.href }) + } + this.$store.dispatch(action.action, { + action: action, + parentUuid: this.containerUuid, + containerUuid: containerParams, // EVALUATE IF IS action.uuid + panelType: this.panelType, // determinate if get table name and record id (window) or selection (browser) + reportFormat: this.$route.query.reportType ? this.$route.query.reportType : action.reportExportType, + menuParentUuid: parentMenu, // to load relations in context menu (report view) + routeToDelete: this.$route + }) + .catch(error => { + console.warn(error) + }) + if (this.panelType === 'process') { + // TODO: Verify use + this.$store.dispatch('deleteRecordContainer', { + viewUuid: this.$route + }) + } + } else { + this.showNotification({ + type: 'warning', + title: this.$t('notifications.emptyValues'), + name: '' + fieldNotReady.name + '. ', + message: this.$t('notifications.fieldMandatory') + }) + } + } else if (action.type === 'process') { + // run process associate with view (window or browser) + this.showModal(action) + if (this.panelType === 'process' || this.panelType === 'browser' || this.panelType === 'report') { + this.$store.dispatch('resetPanelToNew', { + parentUuid: this.parentUuid, + containerUuid: this.containerUuid, + panelType: this.panelType + }) + } + } else if (action.type === 'dataAction') { + if (action.action === 'undoModifyData' && Boolean(!this.getterDataLog) && this.getterWindowOldRoute) { + this.$router.push({ + path: this.getterWindowOldRoute.path, + query: { + ...this.getterWindowOldRoute.query + } + }) + } else { + this.$store.dispatch(action.action, { + parentUuid: this.parentUuid, + containerUuid: this.containerUuid, + recordUuid: this.recordUuid, + panelType: this.panelType, + isNewRecord: action.action === 'resetPanelToNew' + }) + } + } else if (action.type === 'reference') { + this.$store.dispatch('getWindowByUuid', { routes: this.permissionRoutes, windowUuid: action.windowUuid }) + if (action.windowUuid && action.recordUuid) { + var windowRoute = this.$store.getters.getWindowRoute(action.windowUuid) + this.$router.push({ name: windowRoute.name, query: { action: action.type, referenceUuid: action.uuid, tabParent: 0 }}) + } + } + }, + setShareLink() { + var shareLink = this.panelType === 'window' || window.location.href.includes('?') ? `${window.location.href}&` : `${window.location.href}?` + if (this.$route.name === 'Report Viewer') { + var processParameters = convertFieldListToShareLink(this.processParametersExecuted) + var reportFormat = this.$store.getters.getReportType + shareLink = this.$store.getters.getTempShareLink + if (String(processParameters).length) { + shareLink += '?' + processParameters + shareLink += `&reportType=${reportFormat}` + } + } else { + if (String(this.valuesPanelToShare).length) { + shareLink += this.valuesPanelToShare + } + if (this.$route.query.action && this.$route.query.action !== 'create-new' && this.$route.query.action !== 'reference' && this.$route.query.action !== 'advancedQuery') { + shareLink = window.location.href + } + } + if (shareLink !== this.$route.fullPath) { + this.activeClipboard(shareLink) + } + }, + fallbackCopyTextToClipboard(text) { + var textArea = document.createElement('textarea') + textArea.value = text + document.body.appendChild(textArea) + textArea.focus() + textArea.select() + try { + var successful = document.execCommand('copy') + if (successful) { + var message = this.$t('notifications.copySuccessful') + this.clipboardMessage(message) + } + } catch (err) { + message = this.$t('notifications.copyUnsuccessful') + this.clipboardMessage(message) + } + document.body.removeChild(textArea) + }, + activeClipboard(text) { + if (!navigator.clipboard) { + this.fallbackCopyTextToClipboard(text) + return + } + navigator.clipboard.writeText(text) + .then(() => { + var message = this.$t('notifications.copySuccessful') + this.clipboardMessage(message) + }) + .catch(() => { + var message = this.$t('notifications.copyUnsuccessful') + this.clipboardMessage(message) + }) + navigator.clipboard.writeText(text) + }, + clipboardMessage(message) { + this.$message({ + message: message, + type: 'success', + duration: 1500 + }) + } + } +} diff --git a/src/components/ADempiere/ContextMenu/contextMenuMobile.vue b/src/components/ADempiere/ContextMenu/contextMenuMobile.vue new file mode 100644 index 00000000..146c47e5 --- /dev/null +++ b/src/components/ADempiere/ContextMenu/contextMenuMobile.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/components/ADempiere/ContextMenu/icon.js b/src/components/ADempiere/ContextMenu/icon.js new file mode 100644 index 00000000..fb23ca16 --- /dev/null +++ b/src/components/ADempiere/ContextMenu/icon.js @@ -0,0 +1,32 @@ + +export const icon = [ + { + type: 'window', + icon: 'tab' + }, + { + type: 'report', + icon: 'skill' + }, + { + type: 'task', + icon: 'size' + }, + { + type: 'process', + icon: 'component' + }, + { + type: 'browser', + icon: 'search' + }, + { + type: 'workflow', + icon: 'example' + }, + { + type: 'form', + icon: 'form' + } + +] diff --git a/src/components/ADempiere/ContextMenu/index.vue b/src/components/ADempiere/ContextMenu/index.vue new file mode 100644 index 00000000..7e8bce09 --- /dev/null +++ b/src/components/ADempiere/ContextMenu/index.vue @@ -0,0 +1,157 @@ + + + + + + diff --git a/src/components/ADempiere/ContextMenu/items.vue b/src/components/ADempiere/ContextMenu/items.vue new file mode 100644 index 00000000..0d7be85d --- /dev/null +++ b/src/components/ADempiere/ContextMenu/items.vue @@ -0,0 +1,57 @@ + + + + + diff --git a/src/components/ADempiere/DataTable/filterColumns.vue b/src/components/ADempiere/DataTable/filterColumns.vue new file mode 100644 index 00000000..1c1545bb --- /dev/null +++ b/src/components/ADempiere/DataTable/filterColumns.vue @@ -0,0 +1,76 @@ + + + diff --git a/src/components/ADempiere/DataTable/fixedColumns.vue b/src/components/ADempiere/DataTable/fixedColumns.vue new file mode 100644 index 00000000..e276bd06 --- /dev/null +++ b/src/components/ADempiere/DataTable/fixedColumns.vue @@ -0,0 +1,79 @@ + + + diff --git a/src/components/ADempiere/DataTable/index.vue b/src/components/ADempiere/DataTable/index.vue new file mode 100644 index 00000000..b01e79e7 --- /dev/null +++ b/src/components/ADempiere/DataTable/index.vue @@ -0,0 +1,1094 @@ + + + + + + + diff --git a/src/components/ADempiere/Dialog/index.vue b/src/components/ADempiere/Dialog/index.vue new file mode 100644 index 00000000..476d93a8 --- /dev/null +++ b/src/components/ADempiere/Dialog/index.vue @@ -0,0 +1,128 @@ + + + diff --git a/src/components/ADempiere/Dropdown/index.vue b/src/components/ADempiere/Dropdown/index.vue new file mode 100644 index 00000000..8fb13649 --- /dev/null +++ b/src/components/ADempiere/Dropdown/index.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/src/components/ADempiere/Field/FieldBinary.vue b/src/components/ADempiere/Field/FieldBinary.vue new file mode 100644 index 00000000..a64b87de --- /dev/null +++ b/src/components/ADempiere/Field/FieldBinary.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/components/ADempiere/Field/FieldButton.vue b/src/components/ADempiere/Field/FieldButton.vue new file mode 100644 index 00000000..5b05be26 --- /dev/null +++ b/src/components/ADempiere/Field/FieldButton.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/components/ADempiere/Field/FieldColor.vue b/src/components/ADempiere/Field/FieldColor.vue new file mode 100644 index 00000000..4fbe72e7 --- /dev/null +++ b/src/components/ADempiere/Field/FieldColor.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/components/ADempiere/Field/FieldDate.vue b/src/components/ADempiere/Field/FieldDate.vue new file mode 100644 index 00000000..472f601b --- /dev/null +++ b/src/components/ADempiere/Field/FieldDate.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/components/ADempiere/Field/FieldImage.vue b/src/components/ADempiere/Field/FieldImage.vue new file mode 100644 index 00000000..be9a700c --- /dev/null +++ b/src/components/ADempiere/Field/FieldImage.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/components/ADempiere/Field/FieldMixin.js b/src/components/ADempiere/Field/FieldMixin.js new file mode 100644 index 00000000..a26693a8 --- /dev/null +++ b/src/components/ADempiere/Field/FieldMixin.js @@ -0,0 +1,80 @@ + +export const fieldMixin = { + props: { + metadata: { + type: Object, + required: true + }, + // value received from data result + valueModel: { + type: [String, Number, Boolean, Date, Array], + default: null + } + }, + data() { + // value render + let value = this.metadata.value + if (this.metadata.inTable) { + value = this.valueModel + } + return { + value: value + } + }, + computed: { + getterValue() { + const field = this.$store.getters.getFieldFromColumnName(this.metadata.containerUuid, this.metadata.columnName) + if (field) { + return field.value + } + return undefined + }, + isDisabled() { + return Boolean(this.metadata.readonly || this.metadata.disabled) + } + }, + methods: { + activeFocus() { + if (this.metadata.isUpdateable) { + this.$refs[this.metadata.columnName].focus() + } + }, + /** + * Overwrite component method if necessary + * validate values before send values to store or server + * @param {mixed} value + */ + preHandleChange(value) { + this.handleChange(value) + }, + handleChange(value, valueTo = undefined, label = undefined) { + const sendParameters = { + parentUuid: this.metadata.parentUuid, + containerUuid: this.metadata.containerUuid, + field: this.metadata, + panelType: this.metadata.panelType, + columnName: this.metadata.columnName, + newValue: value === 'NotSend' ? this.value : value, + valueTo: valueTo, + isAdvancedQuery: this.metadata.isAdvancedQuery, + isSendToServer: !(value === 'NotSend' || this.metadata.isAdvancedQuery), + isSendCallout: !(value === 'NotSend' || this.metadata.isAdvancedQuery) + } + + if (this.metadata.inTable) { + this.$store.dispatch('notifyCellTableChange', { + ...sendParameters, + keyColumn: this.metadata.keyColumn, + tableIndex: this.metadata.tableIndex, + rowKey: this.metadata.rowKey + }) + } else { + this.$store.dispatch('notifyFieldChange', { + ...sendParameters, + displayColumn: label, + isChangedOldValue: this.metadata.componentPath === 'FieldYesNo' && Boolean(value === 'NotSend') + }) + } + } + } +} diff --git a/src/components/ADempiere/Field/FieldNumber.vue b/src/components/ADempiere/Field/FieldNumber.vue new file mode 100644 index 00000000..ed02b62f --- /dev/null +++ b/src/components/ADempiere/Field/FieldNumber.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/src/components/ADempiere/Field/FieldSelect.vue b/src/components/ADempiere/Field/FieldSelect.vue new file mode 100644 index 00000000..36d1e329 --- /dev/null +++ b/src/components/ADempiere/Field/FieldSelect.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/src/components/ADempiere/Field/FieldText.vue b/src/components/ADempiere/Field/FieldText.vue new file mode 100644 index 00000000..3b2a7878 --- /dev/null +++ b/src/components/ADempiere/Field/FieldText.vue @@ -0,0 +1,96 @@ + + + diff --git a/src/components/ADempiere/Field/FieldTime.vue b/src/components/ADempiere/Field/FieldTime.vue new file mode 100644 index 00000000..ef45be26 --- /dev/null +++ b/src/components/ADempiere/Field/FieldTime.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/src/components/ADempiere/Field/FieldYesNo.vue b/src/components/ADempiere/Field/FieldYesNo.vue new file mode 100644 index 00000000..aaf161e4 --- /dev/null +++ b/src/components/ADempiere/Field/FieldYesNo.vue @@ -0,0 +1,77 @@ + + + diff --git a/src/components/ADempiere/Field/fieldSize.js b/src/components/ADempiere/Field/fieldSize.js new file mode 100644 index 00000000..291e1a12 --- /dev/null +++ b/src/components/ADempiere/Field/fieldSize.js @@ -0,0 +1,124 @@ + +export const FIELD_DISPLAY_SIZES = [ + { + type: 'FieldBinary', + size: { + xs: 6, + sm: 6, + md: 6, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldButton', + size: { + xs: 0, + sm: 0, + md: 0, + lg: 0, + xl: 0 + } + }, + { + type: 'FieldColor', + size: { + xs: 6, + sm: 6, + md: 6, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldDate', + size: { + xs: 24, + sm: 12, + md: 8, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldImage', + size: { + xs: 6, + sm: 6, + md: 6, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldNumber', + size: { + xs: 24, + sm: 12, + md: 8, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldSelect', + size: { + xs: 24, + sm: 12, + md: 8, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldText', + size: { + xs: 24, + sm: 12, + md: 8, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldTextArea', + size: { + xs: 24, + sm: 12, + md: 8, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldTime', + size: { + xs: 24, + sm: 12, + md: 8, + lg: 6, + xl: 6 + } + }, + { + type: 'FieldYesNo', + size: { + xs: 14, + sm: 8, + md: 8, + lg: 3, + xl: 6 + } + } +] + +export const DEFAULT_SIZE = { + type: 'FieldYesNo', + size: { + xs: 6, + sm: 8, + md: 2, + lg: 6, + xl: 6 + } +} diff --git a/src/components/ADempiere/Field/index.vue b/src/components/ADempiere/Field/index.vue new file mode 100644 index 00000000..5ba501c2 --- /dev/null +++ b/src/components/ADempiere/Field/index.vue @@ -0,0 +1,326 @@ + + + + + + diff --git a/src/components/ADempiere/Field/references.js b/src/components/ADempiere/Field/references.js new file mode 100644 index 00000000..57d319a1 --- /dev/null +++ b/src/components/ADempiere/Field/references.js @@ -0,0 +1,329 @@ + +// All references +const REFERENCES = [ + { + id: 25, + type: 'FieldText', + support: false, + description: 'Account Element', + alias: ['Account'] + }, + { + id: 12, + type: 'FieldNumber', + support: true, + description: 'Number with 4 decimals', + alias: ['Amount'] + }, + { + id: 33, + type: 'FieldText', + support: false, + description: 'Resource Assignment', + alias: ['Assignment'] + }, + { + id: 23, + type: 'FieldBinary', + support: true, + description: 'Binary Data', + alias: ['Binary'] + }, + { + id: 28, + type: 'FieldButton', + support: true, + description: 'Command Button - starts a process', + alias: ['Button'] + }, + { + id: 53370, + type: 'FieldText', + support: false, + description: 'Chart', + alias: ['Chart'] + }, + { + id: 27, + type: 'FieldText', + support: false, + description: 'Color element', + alias: ['Color'] + }, + { + id: 37, + type: 'FieldNumber', + support: true, + description: 'Costs + Prices (minimum currency precision but if exists more)', + alias: ['CostsPrices', 'Costs+Prices', 'Cost Prices'] + }, + { + id: 15, + type: 'FieldDate', + support: true, + description: 'Date mm/dd/yyyy', + alias: ['Date'] + }, + { + id: 16, + type: 'FieldDate', + support: true, + description: 'Date with time', + alias: ['DateTime', 'Date Time', 'Date+Time'] + }, + { + id: 39, + type: 'FieldText', + support: true, + description: 'Local File', + alias: ['FileName', 'File Name'] + }, + { + id: 38, + type: 'FieldText', + support: true, + description: 'Local File Path', + alias: ['FilePath', 'File Path'] + }, + { + id: 53670, + type: 'FieldText', + support: true, + description: 'Local File Path or Name', + alias: ['FilePathOrName', 'File Path Or Name'] + }, + { + id: 13, + type: 'FieldNumber', + support: true, + description: '10 Digit Identifier', + alias: ['ID'] + }, + { + id: 32, + type: 'FieldImage', + support: true, + description: 'Binary Image Data', + alias: ['Image'] + }, + { + id: 11, + type: 'FieldNumber', + support: true, + description: '10 Digit numeric', + alias: ['Integer'] + }, + { + id: 17, + type: 'FieldSelect', + support: true, + description: 'Reference List', + alias: ['List'] + }, + { + id: 21, + type: 'FieldText', + support: false, + description: 'Location/Address', + alias: ['Location', 'Location (Address)', 'Location/Address'] + }, + { + id: 31, + type: 'FieldSelect', + support: true, + description: 'Warehouse Locator Data type', + alias: ['Locator', 'Locator (WH)', 'Locator/WH'] + }, + { + id: 34, + type: 'FieldText', + support: true, + description: 'Reference List', + alias: ['Memo'] + }, + { + id: 22, + type: 'FieldNumber', + support: true, + description: 'Float Number', + alias: ['Number'] + }, + { + id: 42, + type: 'FieldText', + support: true, + description: 'Printer Name', + alias: ['PrinterName', 'Printer Name'] + }, + { + id: 35, + type: 'FieldText', + support: false, + description: 'Product Attribute', + alias: ['ProductAttribute', 'Product Attribute'] + }, + { + id: 29, + type: 'FieldNumber', + support: true, + description: 'Quantity data type', + alias: ['Quantity'] + }, + { + id: 30, + type: 'FieldSelect', + support: true, + description: 'Search Field', + alias: ['Search'] + }, + { + id: 10, + type: 'FieldText', + support: true, + description: 'Character String', + alias: ['String'] + }, + { + id: 18, + type: 'FieldSelect', + support: true, + description: 'Table List', + alias: ['Table'] + }, + { + id: 19, + type: 'FieldSelect', + support: true, + description: 'Direct Table Access', + alias: ['TableDirect', 'Table Direct'] + }, + { + id: 14, + type: 'FieldText', + support: true, + description: 'Character String up to 2000 characters', + alias: ['Text'] + }, + { + id: 36, + type: 'FieldText', + support: true, + description: 'Text (Long) - Text > 2000 characters', + alias: ['TextLong', 'Text Long'] + }, + { + id: 24, + type: 'FieldTime', + support: true, + description: 'Time', + alias: ['Time'] + }, + { + id: 40, + type: 'FieldText', + support: true, + description: 'URL', + alias: ['URL', 'Url'] + }, + { + id: 20, + type: 'FieldYesNo', + support: true, + description: 'CheckBox', + alias: ['YesNo', 'Yes No', 'Yes-No'] + } +] +export default REFERENCES + +export const FIELD_RANGE = [ + { + id: 12, + type: 'Amount', + description: 'Number with 4 decimals', + alias: ['Amount'] + }, + { + id: 37, + type: 'CostsPrices', + description: 'Costs + Prices (minimum currency precision but if exists more)', + alias: ['CostsPrices', 'Costs+Prices', 'Cost Prices'] + }, + { + id: 15, + type: 'Date', + description: 'Date mm/dd/yyyy', + alias: ['Date'] + }, + { + id: 16, + type: 'DateTime', + description: 'Date with time', + alias: ['DateTime', 'Date Time', 'Date+Time'] + }, + { + id: 11, + type: 'Integer', + description: '10 Digit numeric', + alias: ['Integer'] + }, + { + id: 22, + type: 'Number', + description: 'Float Number', + alias: ['Number'] + }, + { + id: 29, + type: 'Quantity', + description: 'Quantity data type', + alias: ['Quantity'] + }, + { + id: 24, + type: 'Time', + description: 'Time', + alias: ['Time'] + } +] + +export const FIELD_ONLY = [ + { + id: 28, + type: 'Button', + description: 'Command Button - starts a process', + alias: ['Button'] + } +] + +export const FIELD_NOT_SHOWED = [ + { + id: 28, + type: 'Button', + description: 'Command Button - starts a process', + alias: ['Button'] + } +] + +/** + * Fields with this column name, changed all fields is read only + */ +export const FIELD_READ_ONLY_FORM = [ + { + columnName: 'IsActive', // column name of field + defaultValue: true, // default value when loading + valueIsReadOnlyForm: false, // value that activates read-only form + isChangedAllForm: false // change the entire form to read only including this field + }, + { + columnName: 'Processed', + defaultValue: false, + valueIsReadOnlyForm: true, + isChangedAllForm: true + }, + { + columnName: 'Processing', + defaultValue: true, + valueIsReadOnlyForm: false, + isChangedAllForm: true + } +] diff --git a/src/components/ADempiere/IconElement/index.vue b/src/components/ADempiere/IconElement/index.vue new file mode 100644 index 00000000..4353345f --- /dev/null +++ b/src/components/ADempiere/IconElement/index.vue @@ -0,0 +1,161 @@ + + + + + diff --git a/src/components/ADempiere/Panel/detail.vue b/src/components/ADempiere/Panel/detail.vue new file mode 100644 index 00000000..54a09b29 --- /dev/null +++ b/src/components/ADempiere/Panel/detail.vue @@ -0,0 +1,277 @@ + + + + + diff --git a/src/components/ADempiere/Panel/filterFields.vue b/src/components/ADempiere/Panel/filterFields.vue new file mode 100644 index 00000000..398e801a --- /dev/null +++ b/src/components/ADempiere/Panel/filterFields.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/src/components/ADempiere/Panel/index.vue b/src/components/ADempiere/Panel/index.vue new file mode 100644 index 00000000..71514fd8 --- /dev/null +++ b/src/components/ADempiere/Panel/index.vue @@ -0,0 +1,691 @@ + + + + + + diff --git a/src/components/ADempiere/RecentItems/index.vue b/src/components/ADempiere/RecentItems/index.vue new file mode 100644 index 00000000..5775a08d --- /dev/null +++ b/src/components/ADempiere/RecentItems/index.vue @@ -0,0 +1,136 @@ + + + + + diff --git a/src/components/ADempiere/Tab/index.vue b/src/components/ADempiere/Tab/index.vue new file mode 100644 index 00000000..df361eff --- /dev/null +++ b/src/components/ADempiere/Tab/index.vue @@ -0,0 +1,68 @@ + + + diff --git a/src/components/ADempiere/Tab/tabChildren.vue b/src/components/ADempiere/Tab/tabChildren.vue new file mode 100644 index 00000000..af673c79 --- /dev/null +++ b/src/components/ADempiere/Tab/tabChildren.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/src/components/ADempiere/Tab/tabMixin.js b/src/components/ADempiere/Tab/tabMixin.js new file mode 100644 index 00000000..ac26147f --- /dev/null +++ b/src/components/ADempiere/Tab/tabMixin.js @@ -0,0 +1,94 @@ +import { parseContext } from '@/utils/ADempiere' + +export const tabMixin = { + props: { + windowUuid: { + type: String, + default: '' + }, + tabsList: { + type: [Array, Object], + default: () => [] + } + }, + data() { + return { + currentTab: this.$route.query.tabParent, + tabUuid: '', + panelType: 'window', + firstTableName: this.tabsList[0].tableName + } + }, + computed: { + isCreateNew() { + return Boolean(this.$route.query.action === 'create-new') + }, + getterDataRecords() { + return this.$store.getters.getDataRecordsList(this.tabUuid) + } + }, + watch: { + // Refrest the records of the TabChildren + getDataSelection(value) { + if (!value.isLoaded && this.getterIsLoadContextParent && this.getterIsLoadRecordParent) { + this.getDataTable() + } + }, + // Current TabChildren + currentTabChild(newValue, oldValue) { + if (newValue !== oldValue) { + this.$router.push({ query: { ...this.$route.query, tabChild: String(newValue) }}) + } + }, + // Load parent tab context + getterIsLoadContextParent(value) { + if (value && !this.getDataSelection.isLoaded && this.getterIsLoadRecordParent) { + this.getDataTable() + } + } + }, + created() { + this.tabUuid = this.tabsList[0].uuid + }, + methods: { + parseContext, + // + getDataTable() { + this.$store.dispatch('getDataListTab', { + parentUuid: this.windowUuid, + containerUuid: this.tabUuid + }) + }, + setCurrentTab() { + this.$store.dispatch('setCurrentTab', { + parentUuid: this.windowUuid, + containerUuid: this.tabUuid + }) + this.$route.meta.tabUuid = this.tabUuid + }, + setCurrentTabChild() { + if (this.$route.query.tabChild === undefined && this.firstIndex) { + this.currentTabChild = this.firstIndex + } + }, + /** + * @param {object} tabHTML DOM HTML the tab clicked + */ + handleClick(tabHTML) { + if (this.tabUuid !== tabHTML.$attrs.tabuuid) { + this.tabUuid = tabHTML.$attrs.tabuuid + this.setCurrentTab() + } + }, + handleBeforeLeave(activeName) { + var metadataTab = this.tabsList.find(tab => tab.index === parseInt(activeName)) + if (!this.isEmptyValue(metadataTab.whereClause) && metadataTab.whereClause.includes('@')) { + metadataTab.whereClause = parseContext({ + parentUuid: metadataTab.parentUuid, + containerUuid: metadataTab.uuid, + value: metadataTab.whereClause + }, true) + } + } + } +} diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index b89d8da6..45f092e2 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -1,7 +1,33 @@ @@ -22,7 +22,8 @@ // make search results more in line with expectations import Fuse from 'fuse.js' import path from 'path' -import i18n from '@/lang' +import { generateTitle } from '@/utils/i18n' +// import i18n from '@/lang' export default { name: 'HeaderSearch', @@ -36,6 +37,9 @@ export default { } }, computed: { + isMobile() { + return this.$store.state.app.device === 'mobile' + }, routes() { return this.$store.getters.permission_routes }, @@ -65,6 +69,7 @@ export default { this.searchPool = this.generateRoutes(this.routes) }, methods: { + generateTitle, click() { this.show = !this.show if (this.show) { @@ -77,7 +82,15 @@ export default { this.show = false }, change(val) { - this.$router.push(val.path) + if (val.name) { + if (val.meta && val.meta.type === 'window') { + this.$router.push({ name: val.name, query: { tabParent: 0 }, params: { childs: val.meta.childs }}) + } else { + this.$router.push({ name: val.name, params: { childs: val.meta.childs }}) + } + } else { + this.$router.push({ path: val.path }) + } this.search = '' this.options = [] this.$nextTick(() => { @@ -108,20 +121,19 @@ export default { for (const router of routes) { // skip hidden router - if (router.hidden) { continue } - + // if (router.meta && router.meta.isIndex) { continue } const data = { path: path.resolve(basePath, router.path), - title: [...prefixTitle] + title: [...prefixTitle], + meta: router.meta, + name: router.name } if (router.meta && router.meta.title) { // generate internationalized title - const i18ntitle = i18n.t(`route.${router.meta.title}`) - + const i18ntitle = this.generateTitle(router.meta.title) data.title = [...data.title, i18ntitle] - - if (router.redirect !== 'noRedirect') { + if (router.redirect !== 'noRedirect' && router.name !== 'Report Viewer' && !router.meta.isIndex) { // only push the routes with title // special case: need to exclude parent router without redirect res.push(data) @@ -182,7 +194,7 @@ export default { &.show { .header-search-select { - width: 210px; + width: 150px; margin-left: 10px; } } diff --git a/src/components/LangSelect/index.vue b/src/components/LangSelect/index.vue index 44248418..ffa090d9 100644 --- a/src/components/LangSelect/index.vue +++ b/src/components/LangSelect/index.vue @@ -31,6 +31,9 @@ export default { handleSetLanguage(lang) { this.$i18n.locale = lang this.$store.dispatch('app/setLanguage', lang) + if (this.$route.path !== '/login') { + location.reload() + } this.$message({ message: 'Switch Language Success', type: 'success' diff --git a/src/components/RightPanel/index.vue b/src/components/RightPanel/index.vue index 63408d8b..ede48961 100644 --- a/src/components/RightPanel/index.vue +++ b/src/components/RightPanel/index.vue @@ -1,12 +1,16 @@