@eeacms/volto-clms-theme 1.0.31 → 1.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.coverage.babel.config.js +9 -1
- package/.project.eslintrc.js +46 -0
- package/.release-it.json +6 -6
- package/CHANGELOG.md +83 -0
- package/DEVELOP.md +2 -4
- package/Makefile +39 -0
- package/package.json +23 -25
- package/src/actions/cart/cart.js +4 -5
- package/src/actions/downloadtool/delete_downloadtool.js +21 -0
- package/src/actions/downloadtool/get_downloadtool.js +20 -0
- package/src/actions/downloadtool/post_downloadtool.js +21 -0
- package/src/actions/index.js +12 -0
- package/src/components/Blocks/CclHomeUsersBlock/styles.less +2 -1
- package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingWorkOpportunities.jsx +22 -3
- package/src/components/CLMSDownloadCartView/CLMSDownloadCartView.jsx +98 -24
- package/src/components/CLMSDownloadCartView/CLMSTasksInProgress.jsx +171 -0
- package/src/components/CLMSDownloadCartView/task_in_progress.less +6 -0
- package/src/components/CLMSServiceDeskView/CLMSServiceDeskView.jsx +112 -0
- package/src/components/CclCard/CclCard.jsx +5 -5
- package/src/components/CclTopMainMenu/CclTopMainMenu.jsx +2 -2
- package/src/customizations/volto/components/theme/Footer/Footer.jsx +2 -2
- package/src/customizations/volto/components/theme/Header/Header.jsx +33 -19
- package/src/index.js +5 -0
- package/src/reducers/cart/cart_reducer.js +4 -3
- package/src/reducers/downloadtool/downloadtool_reducer.js +95 -0
- package/src/reducers/index.js +3 -0
- package/src/utils/useCartState.js +41 -34
- package/theme/clms/css/carousel.css +2 -1
- package/theme/clms/css/faq.less +7 -2
- package/theme/clms/css/footer.css +2 -2
- package/theme/clms/css/header.css +40 -40
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
const defaultBabel = require('@plone/volto/babel');
|
|
2
|
+
|
|
3
|
+
function applyDefault(api) {
|
|
4
|
+
const voltoBabel = defaultBabel(api);
|
|
5
|
+
voltoBabel.plugins.push('@babel/plugin-transform-modules-commonjs', 'transform-class-properties', 'istanbul');
|
|
6
|
+
return voltoBabel;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
module.exports = applyDefault;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
const projectRootPath = fs.realpathSync('./project'); // __dirname
|
|
5
|
+
// const packageJson = require(path.join(projectRootPath, 'package.json'));
|
|
6
|
+
const jsConfig = require(path.join(projectRootPath, 'jsconfig.json')).compilerOptions;
|
|
7
|
+
|
|
8
|
+
const pathsConfig = jsConfig.paths;
|
|
9
|
+
|
|
10
|
+
let voltoPath = path.join(projectRootPath, 'node_modules/@plone/volto');
|
|
11
|
+
|
|
12
|
+
Object.keys(pathsConfig).forEach(pkg => {
|
|
13
|
+
if (pkg === '@plone/volto') {
|
|
14
|
+
voltoPath = `./${jsConfig.baseUrl}/${pathsConfig[pkg][0]}`;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
const AddonConfigurationRegistry = require(`${voltoPath}/addon-registry.js`);
|
|
18
|
+
const reg = new AddonConfigurationRegistry(projectRootPath);
|
|
19
|
+
|
|
20
|
+
// Extends ESlint configuration for adding the aliases to `src` directories in Volto addons
|
|
21
|
+
const addonAliases = Object.keys(reg.packages).map(o => [
|
|
22
|
+
o,
|
|
23
|
+
reg.packages[o].modulePath,
|
|
24
|
+
]);
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
extends: `${projectRootPath}/node_modules/@plone/volto/.eslintrc`,
|
|
29
|
+
settings: {
|
|
30
|
+
'import/resolver': {
|
|
31
|
+
alias: {
|
|
32
|
+
map: [
|
|
33
|
+
['@plone/volto', '@plone/volto/src'],
|
|
34
|
+
...addonAliases,
|
|
35
|
+
['@package', `${__dirname}/src`],
|
|
36
|
+
['~', `${__dirname}/src`],
|
|
37
|
+
],
|
|
38
|
+
extensions: ['.js', '.jsx', '.json'],
|
|
39
|
+
},
|
|
40
|
+
'babel-plugin-root-import': {
|
|
41
|
+
rootPathSuffix: 'src',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
package/.release-it.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
+
"npm": {
|
|
3
|
+
"publish": false
|
|
4
|
+
},
|
|
2
5
|
"git": {
|
|
3
6
|
"commitMessage": "Automated release ${version}",
|
|
4
7
|
"requireBranch": "develop",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
8
|
+
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs",
|
|
9
|
+
"tagName": "${version}"
|
|
7
10
|
},
|
|
8
11
|
"github": {
|
|
9
|
-
"release":
|
|
12
|
+
"release": true,
|
|
10
13
|
"releaseName": "${version}",
|
|
11
14
|
"releaseNotes": "npx auto-changelog --stdout --sort-commits date --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
|
|
12
15
|
},
|
|
13
|
-
"npm": {
|
|
14
|
-
"publish": false
|
|
15
|
-
},
|
|
16
16
|
"hooks": {
|
|
17
17
|
"after:bump": "npx auto-changelog --sort-commits date --commit-limit false -p"
|
|
18
18
|
}
|
package/CHANGELOG.md
CHANGED
|
@@ -4,8 +4,91 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### [1.0.36](https://github.com/eea/volto-clms-theme/compare/1.0.35...1.0.36)
|
|
8
|
+
|
|
9
|
+
- Unification work based on volto-sustainability-theme [`#103`](https://github.com/eea/volto-clms-theme/pull/103)
|
|
10
|
+
- Footer, Service desk and work oportunities corrections [`#104`](https://github.com/eea/volto-clms-theme/pull/104)
|
|
11
|
+
- add volto-arcgis-block dependency [`c698fd9`](https://github.com/eea/volto-clms-theme/commit/c698fd9f2915d706c97118511e9c7f895baa4f94)
|
|
12
|
+
- add needed addons [`9ff03af`](https://github.com/eea/volto-clms-theme/commit/9ff03af81e84e989366b90180476270c036825cd)
|
|
13
|
+
- reorganize packages.json [`6a574a7`](https://github.com/eea/volto-clms-theme/commit/6a574a7877e9637041f2a32f2bcea0d79b3eeec7)
|
|
14
|
+
- Footer 'expert support provided by' hidden temporaly [`a6815ef`](https://github.com/eea/volto-clms-theme/commit/a6815efd3e6715c6f6e4e70f9e54ac01ed230f18)
|
|
15
|
+
- work oportunities open/close status fixed [`1f28116`](https://github.com/eea/volto-clms-theme/commit/1f2811641ca4752100574f12e16c9abab2c23e8a)
|
|
16
|
+
- Work opportunities working without is_open checkbox [`1f64c61`](https://github.com/eea/volto-clms-theme/commit/1f64c612d67470bf56fd2fd63cbd8f1dc7e80242)
|
|
17
|
+
- work oportunities open/close depends on submission deadline [`a35d5c9`](https://github.com/eea/volto-clms-theme/commit/a35d5c98c343190b45c3fc7052e1db47e12d45b8)
|
|
18
|
+
- change class with className and for with htmlFor [`1b0b8d4`](https://github.com/eea/volto-clms-theme/commit/1b0b8d4876e6fa8f92d907428062d753a06f7bb1)
|
|
19
|
+
- service desk link and style fix [`85479e8`](https://github.com/eea/volto-clms-theme/commit/85479e8124fd176920ae177a3b01f9fe282e383e)
|
|
20
|
+
- Service desk view created [`d7dec45`](https://github.com/eea/volto-clms-theme/commit/d7dec45ef8cfe5e199a0b31d84ebddc5f6e4a608)
|
|
21
|
+
- FAQ style fixed when using a listing block inside acordion block [`ca26614`](https://github.com/eea/volto-clms-theme/commit/ca2661459d3454a5749d23de4c5210bb735b748c)
|
|
22
|
+
- correction in card [`6830866`](https://github.com/eea/volto-clms-theme/commit/683086608caf1d1c127db423a24867b5da125aea)
|
|
23
|
+
- upgrade kitkat [`2f9b905`](https://github.com/eea/volto-clms-theme/commit/2f9b9058d29d48d6f4d7dd6f04840c0076d202ae)
|
|
24
|
+
- merge develop into branch [`26aa1dc`](https://github.com/eea/volto-clms-theme/commit/26aa1dc087dafdc568f1ca3cbb62dbd1ef730502)
|
|
25
|
+
- add commitMessage and requireBranch [`adfc26f`](https://github.com/eea/volto-clms-theme/commit/adfc26f2a87b89b9e7881d591c6215e8467242cd)
|
|
26
|
+
- remove slate dependency [`1863b3c`](https://github.com/eea/volto-clms-theme/commit/1863b3c8e6df0cd4a43ca059ef72ea9804cc5371)
|
|
27
|
+
- add kitkat to dependencies [`5a64f80`](https://github.com/eea/volto-clms-theme/commit/5a64f8068bf3ce33de1685219a50be612450cb05)
|
|
28
|
+
- add kitkat to dependencies [`773a7ed`](https://github.com/eea/volto-clms-theme/commit/773a7ed6cb63fde1eedf52a2eb84f918dc7a439d)
|
|
29
|
+
- unification procces [`63b7258`](https://github.com/eea/volto-clms-theme/commit/63b7258fbe6701f5e4cc4fd1a960446a3b6614cf)
|
|
30
|
+
- package.json modifications [`deade8e`](https://github.com/eea/volto-clms-theme/commit/deade8ea5bad7fe91ecfdaed83ef0fb0afe56ef2)
|
|
31
|
+
- card change [`7f25b11`](https://github.com/eea/volto-clms-theme/commit/7f25b11f2aa49eab7d43f3efe894775ccf8ba217)
|
|
32
|
+
- block card style fix [`06d9631`](https://github.com/eea/volto-clms-theme/commit/06d9631b7fb4188600faa1eb05c8bbad335c2a58)
|
|
33
|
+
- Service desk view first commit [`468289d`](https://github.com/eea/volto-clms-theme/commit/468289def4edcca58c2bf2771c0c14cf89003e4c)
|
|
34
|
+
|
|
35
|
+
#### [1.0.35](https://github.com/eea/volto-clms-theme/compare/1.0.34...1.0.35)
|
|
36
|
+
|
|
37
|
+
> 26 October 2021
|
|
38
|
+
|
|
39
|
+
- Develop into master [`#105`](https://github.com/eea/volto-clms-theme/pull/105)
|
|
40
|
+
- remove slate from addons [`5eaa93c`](https://github.com/eea/volto-clms-theme/commit/5eaa93cd3d3aba1680137236d92b43816a0289e5)
|
|
41
|
+
- removed volto-slate dependency [`a1ba7e5`](https://github.com/eea/volto-clms-theme/commit/a1ba7e50779400df9748ca0ec46f336945d97994)
|
|
42
|
+
- volto-slate:asDefault [`5d763d4`](https://github.com/eea/volto-clms-theme/commit/5d763d4becdfc01aa27d297ed970a2140ecd7f68)
|
|
43
|
+
|
|
44
|
+
#### [1.0.34](https://github.com/eea/volto-clms-theme/compare/1.0.33...1.0.34)
|
|
45
|
+
|
|
46
|
+
> 15 October 2021
|
|
47
|
+
|
|
48
|
+
- comment test for release (nvm) [`#102`](https://github.com/eea/volto-clms-theme/pull/102)
|
|
49
|
+
|
|
50
|
+
#### [1.0.33](https://github.com/eea/volto-clms-theme/compare/1.0.32...1.0.33)
|
|
51
|
+
|
|
52
|
+
> 15 October 2021
|
|
53
|
+
|
|
54
|
+
- Develop [`#101`](https://github.com/eea/volto-clms-theme/pull/101)
|
|
55
|
+
- new arcgis block version [`8607a60`](https://github.com/eea/volto-clms-theme/commit/8607a60034e42b47f34256581b9f34e9c07fd45a)
|
|
56
|
+
- new arcgis block version [`78199f4`](https://github.com/eea/volto-clms-theme/commit/78199f4a397057dfbd182a87a501b9b556bb37fc)
|
|
57
|
+
|
|
58
|
+
#### [1.0.32](https://github.com/eea/volto-clms-theme/compare/1.0.31...1.0.32)
|
|
59
|
+
|
|
60
|
+
> 15 October 2021
|
|
61
|
+
|
|
62
|
+
- Develop [`#100`](https://github.com/eea/volto-clms-theme/pull/100)
|
|
63
|
+
- Downloadtool [`#99`](https://github.com/eea/volto-clms-theme/pull/99)
|
|
64
|
+
- Card block style fix [`#98`](https://github.com/eea/volto-clms-theme/pull/98)
|
|
65
|
+
- top main menu fix [`#97`](https://github.com/eea/volto-clms-theme/pull/97)
|
|
66
|
+
- Use cases carousel fix [`#96`](https://github.com/eea/volto-clms-theme/pull/96)
|
|
67
|
+
- specify form label color only for footer [`d2f1bff`](https://github.com/eea/volto-clms-theme/commit/d2f1bffd10869273e61d6b79ae6513571a417a6f)
|
|
68
|
+
- arcgis block version [`a32ee91`](https://github.com/eea/volto-clms-theme/commit/a32ee918271a131024e34560562795e986998600)
|
|
69
|
+
- optimized downloadtool reducer [`8e54177`](https://github.com/eea/volto-clms-theme/commit/8e541777362d2bde826950afaaba1034ecf4e8e6)
|
|
70
|
+
- card block style fix [`c5227bb`](https://github.com/eea/volto-clms-theme/commit/c5227bbd4ec9120c76fd316b425fb5fbbd56bf96)
|
|
71
|
+
- card block style fix [`c551081`](https://github.com/eea/volto-clms-theme/commit/c55108137230c2a1d620662bb9acd4828e98675c)
|
|
72
|
+
- Buttons popups and titles [`c4c71a0`](https://github.com/eea/volto-clms-theme/commit/c4c71a0bfe0a584438c37a0c192a44fa09509eea)
|
|
73
|
+
- CLMSTaskInProgress component [`b709830`](https://github.com/eea/volto-clms-theme/commit/b7098304abc584de50570d7b1dc272474d7e1719)
|
|
74
|
+
- z-index for header tools dropdown [`7e54bd1`](https://github.com/eea/volto-clms-theme/commit/7e54bd1d69b18d1d48c0d6a8b87fefa6aff64e7e)
|
|
75
|
+
- When task start processing add design to item [`2559caa`](https://github.com/eea/volto-clms-theme/commit/2559caa45e9b7077a2739d30ce1c4d92d2280c9c)
|
|
76
|
+
- on select all cart with task in progress bug fixed [`9582abe`](https://github.com/eea/volto-clms-theme/commit/9582abed5881bb9a3bdbf6f820577ce26e99019f)
|
|
77
|
+
- on cart items post to downloadtool, task start processing [`be7ee24`](https://github.com/eea/volto-clms-theme/commit/be7ee2434c66d34903e995944aa02298c645d503)
|
|
78
|
+
- downloadtool redux action and reducer [`7fcc3de`](https://github.com/eea/volto-clms-theme/commit/7fcc3de64b3db5a43d3a05cbf101b7983a8cd106)
|
|
79
|
+
- prettier [`4cd8768`](https://github.com/eea/volto-clms-theme/commit/4cd876832b7564640e0d0c0aabda9a85f1be9f5e)
|
|
80
|
+
- cartUse hook control if user_id exist [`f97b8ab`](https://github.com/eea/volto-clms-theme/commit/f97b8ab777d3b108e6964efdf8deeb9642818062)
|
|
81
|
+
- header cart counter moved to functional component [`d2e5bbf`](https://github.com/eea/volto-clms-theme/commit/d2e5bbf651b123935abcc8c8f3e65cc6911a8767)
|
|
82
|
+
- progressbar component [`046380a`](https://github.com/eea/volto-clms-theme/commit/046380a5d01deab1887727a7003b7fe6bcd23cd8)
|
|
83
|
+
- post cart selection to downloadtool [`23e6d52`](https://github.com/eea/volto-clms-theme/commit/23e6d52df7f8e0c75c446135099dbfb2bebde5a1)
|
|
84
|
+
- getCartSessionStorage when CART_SESSION_USER_KEY is loaded [`3994dc0`](https://github.com/eea/volto-clms-theme/commit/3994dc0e3ea0facc108bfcd2bc3860ee0f0448a9)
|
|
85
|
+
- changed the cart cache key from user_token to user_id [`e03b53d`](https://github.com/eea/volto-clms-theme/commit/e03b53d98f15a2b556d0a912fe9bc4b216f0d9c4)
|
|
86
|
+
|
|
7
87
|
#### [1.0.31](https://github.com/eea/volto-clms-theme/compare/1.0.30...1.0.31)
|
|
8
88
|
|
|
89
|
+
> 14 October 2021
|
|
90
|
+
|
|
91
|
+
- style changes and arcgis-block new version [`#95`](https://github.com/eea/volto-clms-theme/pull/95)
|
|
9
92
|
- Top main menu dropdown fxed [`#94`](https://github.com/eea/volto-clms-theme/pull/94)
|
|
10
93
|
- volto-arcgis-block new version [`5648dcb`](https://github.com/eea/volto-clms-theme/commit/5648dcb178e418a44cf0729ee2c9a920954f820a)
|
|
11
94
|
- accordion title hover color [`bca1813`](https://github.com/eea/volto-clms-theme/commit/bca181393ec304c2be811f18479c077d13897e77)
|
package/DEVELOP.md
CHANGED
|
@@ -6,13 +6,11 @@ Before starting make sure your development environment is properly set. See [Vol
|
|
|
6
6
|
|
|
7
7
|
1. Make sure you have installed `yo`, `@plone/generator-volto` and `mrs-developer`
|
|
8
8
|
|
|
9
|
-
$ npm install -g yo
|
|
10
|
-
$ npm install -g @plone/generator-volto
|
|
11
|
-
$ npm install -g mrs-developer
|
|
9
|
+
$ npm install -g yo @plone/generator-volto mrs-developer
|
|
12
10
|
|
|
13
11
|
1. Create new volto app
|
|
14
12
|
|
|
15
|
-
$ yo @plone/volto my-volto-project --addon @eeacms/volto-
|
|
13
|
+
$ yo @plone/volto my-volto-project --addon @eeacms/volto-clms-theme --skip-install
|
|
16
14
|
$ cd my-volto-project
|
|
17
15
|
|
|
18
16
|
1. Add the following to `mrs.developer.json`:
|
package/Makefile
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
SHELL=/bin/bash
|
|
2
|
+
|
|
3
|
+
DIR=$(shell basename $$(pwd))
|
|
4
|
+
ADDON ?= "@eeacms/volto-clms-theme"
|
|
5
|
+
|
|
6
|
+
# We like colors
|
|
7
|
+
# From: https://coderwall.com/p/izxssa/colored-makefile-for-golang-projects
|
|
8
|
+
RED=`tput setaf 1`
|
|
9
|
+
GREEN=`tput setaf 2`
|
|
10
|
+
RESET=`tput sgr0`
|
|
11
|
+
YELLOW=`tput setaf 3`
|
|
12
|
+
|
|
13
|
+
project:
|
|
14
|
+
npm install -g yo
|
|
15
|
+
npm install -g @plone/generator-volto
|
|
16
|
+
npm install -g mrs-developer
|
|
17
|
+
yo @plone/volto project --addon ${ADDON} --workspace "src/addons/${DIR}" --no-interactive
|
|
18
|
+
ln -sf $$(pwd) project/src/addons/
|
|
19
|
+
cp .project.eslintrc.js .eslintrc.js
|
|
20
|
+
cd project && yarn
|
|
21
|
+
@echo "-------------------"
|
|
22
|
+
@echo "$(GREEN)Volto project is ready!$(RESET)"
|
|
23
|
+
@echo "$(RED)Now run: cd project && yarn start$(RESET)"
|
|
24
|
+
|
|
25
|
+
all: project
|
|
26
|
+
|
|
27
|
+
.PHONY: start-test-backend
|
|
28
|
+
start-test-backend: ## Start Test Plone Backend
|
|
29
|
+
@echo "$(GREEN)==> Start Test Plone Backend$(RESET)"
|
|
30
|
+
docker run -i --rm -e ZSERVER_HOST=0.0.0.0 -e ZSERVER_PORT=55001 -p 55001:55001 -e SITE=plone -e APPLY_PROFILES=plone.app.contenttypes:plone-content,plone.restapi:default,kitconcept.volto:default-homepage -e CONFIGURE_PACKAGES=plone.app.contenttypes,plone.restapi,kitconcept.volto,kitconcept.volto.cors -e ADDONS='plone.app.robotframework plone.app.contenttypes plone.restapi kitconcept.volto' plone ./bin/robot-server plone.app.robotframework.testing.PLONE_ROBOT_TESTING
|
|
31
|
+
|
|
32
|
+
.PHONY: start-backend-docker
|
|
33
|
+
start-backend-docker: ## Starts a Docker-based backend
|
|
34
|
+
@echo "$(GREEN)==> Start Docker-based Plone Backend$(RESET)"
|
|
35
|
+
docker run -it --rm --name=plone -p 8080:8080 -e SITE=Plone -e ADDONS="kitconcept.volto" -e ZCML="kitconcept.volto.cors" plone
|
|
36
|
+
|
|
37
|
+
.PHONY: help
|
|
38
|
+
help: ## Show this help.
|
|
39
|
+
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eeacms/volto-clms-theme",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.36",
|
|
4
4
|
"description": "volto-clms-theme: Volto theme for CLMS site",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"author": "CodeSyntax for the European Environment Agency",
|
|
@@ -24,26 +24,39 @@
|
|
|
24
24
|
"@eeacms/volto-accordion-block",
|
|
25
25
|
"@eeacms/volto-metadata-block",
|
|
26
26
|
"@eeacms/volto-resize-helper",
|
|
27
|
-
"volto-slate:simpleLink",
|
|
28
27
|
"@eeacms/volto-tabs-block"
|
|
29
28
|
],
|
|
30
29
|
"dependencies": {
|
|
30
|
+
"@eeacms/volto-tabs-block": "1.2.7",
|
|
31
|
+
"@eeacms/volto-accordion-block": "3.4.7",
|
|
32
|
+
"@eeacms/volto-columns-block": "4.4.3",
|
|
33
|
+
"@eeacms/volto-metadata-block": "^2.1.0",
|
|
34
|
+
"@eeacms/volto-resize-helper": "0.2.1",
|
|
31
35
|
"volto-dropdownmenu": "2.2.7",
|
|
32
|
-
"@eeacms/volto-arcgis-block": "0.1.8",
|
|
33
36
|
"@fortawesome/fontawesome-svg-core": "1.2.35",
|
|
34
37
|
"@fortawesome/free-solid-svg-icons": "5.15.3",
|
|
35
38
|
"@fortawesome/free-regular-svg-icons": "5.15.3",
|
|
36
39
|
"@fortawesome/react-fontawesome": "0.1.14",
|
|
37
|
-
"@eeacms/volto-tabs-block": "1.2.7",
|
|
38
40
|
"react-slick": "0.28.1",
|
|
39
41
|
"slick-carousel": "1.8.1",
|
|
40
|
-
"@eeacms/volto-accordion-block": "3.4.4",
|
|
41
|
-
"@eeacms/volto-columns-block": "4.4.3",
|
|
42
|
-
"@eeacms/volto-metadata-block": "^2.1.0",
|
|
43
|
-
"volto-slate": "2.6.2",
|
|
44
42
|
"react-svg": "14.0.4",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
43
|
+
"@eeacms/volto-arcgis-block": "*",
|
|
44
|
+
"react-native-mime-types": "2.3.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"eslint": "^6.8.0",
|
|
48
|
+
"eslint-config-prettier": "^8.2.0",
|
|
49
|
+
"eslint-plugin-prettier": "3.1.3",
|
|
50
|
+
"eslint-plugin-react-app": "^6.2.2",
|
|
51
|
+
"husky": "6.0.0",
|
|
52
|
+
"jsconfig": "^0.2.0",
|
|
53
|
+
"prettier": "2.0.5",
|
|
54
|
+
"prettier-eslint": "^12.0.0",
|
|
55
|
+
"stylelint": "^13.12.0",
|
|
56
|
+
"stylelint-config-idiomatic-order": "8.1.0",
|
|
57
|
+
"stylelint-prettier": "1.1.2",
|
|
58
|
+
"@cypress/code-coverage": "^3.9.5",
|
|
59
|
+
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
47
60
|
},
|
|
48
61
|
"prettier": {
|
|
49
62
|
"trailingComma": "all",
|
|
@@ -96,20 +109,5 @@
|
|
|
96
109
|
"cypress:open": "NODE_ENV=production CYPRESS_API=plone ../../../node_modules/cypress/bin/cypress open",
|
|
97
110
|
"precommit": "yarn stylelint && yarn prettier && yarn lint",
|
|
98
111
|
"prepare": "husky install"
|
|
99
|
-
},
|
|
100
|
-
"devDependencies": {
|
|
101
|
-
"eslint": "^6.8.0",
|
|
102
|
-
"eslint-config-prettier": "^8.2.0",
|
|
103
|
-
"eslint-plugin-prettier": "3.1.3",
|
|
104
|
-
"eslint-plugin-react-app": "^6.2.2",
|
|
105
|
-
"husky": "6.0.0",
|
|
106
|
-
"jsconfig": "^0.2.0",
|
|
107
|
-
"prettier": "2.0.5",
|
|
108
|
-
"prettier-eslint": "^12.0.0",
|
|
109
|
-
"stylelint": "^13.12.0",
|
|
110
|
-
"stylelint-config-idiomatic-order": "8.1.0",
|
|
111
|
-
"stylelint-prettier": "1.1.2",
|
|
112
|
-
"@cypress/code-coverage": "^3.9.5",
|
|
113
|
-
"babel-plugin-transform-class-properties": "^6.24.1"
|
|
114
112
|
}
|
|
115
113
|
}
|
package/src/actions/cart/cart.js
CHANGED
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export const GET_CART_ITEMS = 'GET_CART_ITEMS';
|
|
6
6
|
export const SET_CART_ITEMS = 'SET_CART_ITEMS';
|
|
7
|
-
|
|
8
7
|
/**
|
|
9
8
|
* Set Cart items.
|
|
10
9
|
* @function setCartItems
|
|
@@ -13,7 +12,7 @@ export const SET_CART_ITEMS = 'SET_CART_ITEMS';
|
|
|
13
12
|
export function setCartItems(items) {
|
|
14
13
|
return {
|
|
15
14
|
type: SET_CART_ITEMS,
|
|
16
|
-
items,
|
|
15
|
+
items: items,
|
|
17
16
|
};
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -22,10 +21,10 @@ export function setCartItems(items) {
|
|
|
22
21
|
* @function getCartItems
|
|
23
22
|
* @returns {Object} Get extra items action.
|
|
24
23
|
*/
|
|
25
|
-
|
|
24
|
+
|
|
25
|
+
export function getCartItems(user_id) {
|
|
26
26
|
return {
|
|
27
27
|
type: GET_CART_ITEMS,
|
|
28
|
-
|
|
29
|
-
localStorage,
|
|
28
|
+
user_id: user_id,
|
|
30
29
|
};
|
|
31
30
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post cart selection to downloadtool.
|
|
3
|
+
* @module actions/postDownloadtool
|
|
4
|
+
*/
|
|
5
|
+
export const DELETE_DOWNLOADTOOL = 'DELETE_DOWNLOADTOOL';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* delete cart selection to downloadtool.
|
|
9
|
+
* @function deleteDownloadtool
|
|
10
|
+
* @returns {Object} Get extra items action.
|
|
11
|
+
*/
|
|
12
|
+
export function deleteDownloadtool(user_id, task_id) {
|
|
13
|
+
return {
|
|
14
|
+
type: DELETE_DOWNLOADTOOL,
|
|
15
|
+
request: {
|
|
16
|
+
op: 'del',
|
|
17
|
+
data: { UserID: user_id, TaskID: task_id },
|
|
18
|
+
path: '/@datarequest_delete',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get cart selection to downloadtool.
|
|
3
|
+
* @module actions/getDownloadtool
|
|
4
|
+
*/
|
|
5
|
+
export const GET_DOWNLOADTOOL = 'GET_DOWNLOADTOOL';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Get cart selection to downloadtool.
|
|
9
|
+
* @function GetDownloadtool
|
|
10
|
+
* @returns {Object} Get extra items action.
|
|
11
|
+
*/
|
|
12
|
+
export function getDownloadtool(user_id) {
|
|
13
|
+
return {
|
|
14
|
+
type: GET_DOWNLOADTOOL,
|
|
15
|
+
request: {
|
|
16
|
+
op: 'get',
|
|
17
|
+
path: `/@datarequest_search?UserID=${user_id}&Status=In_progress`,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Post cart selection to downloadtool.
|
|
3
|
+
* @module actions/postDownloadtool
|
|
4
|
+
*/
|
|
5
|
+
export const POST_DOWNLOADTOOL = 'POST_DOWNLOADTOOL';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Post cart selection to downloadtool.
|
|
9
|
+
* @function PostDownloadtool
|
|
10
|
+
* @returns {Object} Get extra items action.
|
|
11
|
+
*/
|
|
12
|
+
export function postDownloadtool(item) {
|
|
13
|
+
return {
|
|
14
|
+
type: POST_DOWNLOADTOOL,
|
|
15
|
+
request: {
|
|
16
|
+
op: 'post',
|
|
17
|
+
data: item,
|
|
18
|
+
path: '/@datarequest_post',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
package/src/actions/index.js
CHANGED
|
@@ -33,3 +33,15 @@ export {
|
|
|
33
33
|
MEETING_SUBSCRIBERS,
|
|
34
34
|
MeetingSubscribers,
|
|
35
35
|
} from './meeting/meeting_subscribers';
|
|
36
|
+
export {
|
|
37
|
+
POST_DOWNLOADTOOL,
|
|
38
|
+
postDownloadtool,
|
|
39
|
+
} from './downloadtool/post_downloadtool';
|
|
40
|
+
export {
|
|
41
|
+
GET_DOWNLOADTOOL,
|
|
42
|
+
getDownloadtool,
|
|
43
|
+
} from './downloadtool/get_downloadtool';
|
|
44
|
+
export {
|
|
45
|
+
DELETE_DOWNLOADTOOL,
|
|
46
|
+
deleteDownloadtool,
|
|
47
|
+
} from './downloadtool/delete_downloadtool';
|
package/src/components/Blocks/CustomTemplates/VoltoListingBlock/CclListingWorkOpportunities.jsx
CHANGED
|
@@ -36,17 +36,33 @@ const CclWorkOpportunity = (props) => {
|
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
function formatDate(date) {
|
|
40
|
+
var d = new Date(date),
|
|
41
|
+
month = '' + (d.getMonth() + 1),
|
|
42
|
+
day = '' + d.getDate(),
|
|
43
|
+
year = d.getFullYear();
|
|
44
|
+
|
|
45
|
+
if (month.length < 2) month = '0' + month;
|
|
46
|
+
if (day.length < 2) day = '0' + day;
|
|
47
|
+
|
|
48
|
+
return [year, month, day].join('-');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
var Today = formatDate(Date.now());
|
|
52
|
+
|
|
39
53
|
const CclListingWorkOpportunities = (props) => {
|
|
40
54
|
const { items, variation } = props;
|
|
41
55
|
const intl = useIntl();
|
|
42
56
|
|
|
43
57
|
const regex = /CclWO/;
|
|
44
58
|
const status = variation?.replace(regex, '');
|
|
45
|
-
|
|
46
59
|
return (
|
|
47
60
|
<>
|
|
48
61
|
{items
|
|
49
|
-
.filter(
|
|
62
|
+
.filter(
|
|
63
|
+
(item) =>
|
|
64
|
+
item.submission_deadline < Today && status === 'CloseTenders',
|
|
65
|
+
)
|
|
50
66
|
.map((item, index) => (
|
|
51
67
|
<CclWorkOpportunity
|
|
52
68
|
key={index}
|
|
@@ -55,7 +71,10 @@ const CclListingWorkOpportunities = (props) => {
|
|
|
55
71
|
></CclWorkOpportunity>
|
|
56
72
|
))}
|
|
57
73
|
{items
|
|
58
|
-
.filter(
|
|
74
|
+
.filter(
|
|
75
|
+
(item) =>
|
|
76
|
+
item.submission_deadline > Today && status === 'OpenTenders',
|
|
77
|
+
)
|
|
59
78
|
.map((item, index) => (
|
|
60
79
|
<CclWorkOpportunity
|
|
61
80
|
key={index}
|