Author:
Fluent Commerce
Changed on:
10 Sept 2024
Here is the trick to hide the Create Wave button from Fluent Store if there are no pending fulfilment for processing. If the button is visible, the store user can create a new Wave with empty details.
1 "props": {
2 "title": "i18n:fc.sf.ui.waves.index.wavesList.title",
3 "actions": {
4 "primary": [
5 {
6 "type": "userAction",
7 "name": "WaveCreate",
8 "condition": "{{gt fulfilments.edges.length 0}}"
9 }
10 ],
11 "userActionExtensions": {
12 "WaveCreate": {
13 "postSubmit": {
14 "type": "navigate",
15 "link": "/waves/{{wavesInProgress.edges.0.node.id}}"
16 }
17 }
18 }
19 }
20 },
21
Language: json
Name: condition
Description:
[Warning: empty required content area]The above trick is to utilise the
` "condition": "{{gt fulfilments.edges.length 0}}"`
Please note that this is just a temporary workaround as in the current situation, the extension within actions are not working. Once this is fixed, we might able to use below code:
1 "props": {
2 "title": "i18n:fc.sf.ui.waves.index.wavesList.title",
3 "actions": {
4 "primary": [
5 {
6 "type": "userAction",
7 "name": "WaveCreate",
8 "extensions": {
9 "postSubmit": {
10 "type": "navigate",
11 "link": "/waves/{{wavesInProgress.edges.0.node.id}}"
12 }
13 },
14 "condition": "false"
15 }
16 ]
17 }
18 },
Language: json
Name: expected code
Description:
[Warning: empty required content area]Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.