@final-commerce/command-frame 0.10.0-staging.1 → 0.10.0-staging.2
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.
|
@@ -182,6 +182,10 @@ export function compositePicksRefusal(composite, picks) {
|
|
|
182
182
|
if (!composite.parts.length)
|
|
183
183
|
return 'This composite has no parts on this till yet';
|
|
184
184
|
const blocking = composite.parts.find((part) => part.min > 0 && !part.items.some((item) => !item.unavailable || item.unavailable === 'by_date'));
|
|
185
|
+
// FT-151: a part blocked by the sold-out mark says so, as the host does.
|
|
186
|
+
const marked = blocking?.items.find((item) => item.unavailable === 'marked_sold_out');
|
|
187
|
+
if (marked)
|
|
188
|
+
return `${marked.name}: marked sold out`;
|
|
185
189
|
return blocking
|
|
186
190
|
? `${blocking.name ?? 'Choose'}: nothing can be picked at this outlet`
|
|
187
191
|
: 'This composite is unavailable: a part it needs has nothing to pick';
|
|
@@ -199,6 +203,8 @@ export function compositePicksRefusal(composite, picks) {
|
|
|
199
203
|
return `${item.name}: choose a date and time`;
|
|
200
204
|
if (item.unavailable === 'fully_booked')
|
|
201
205
|
return `${item.name} is fully booked at that time`;
|
|
206
|
+
if (item.unavailable === 'marked_sold_out')
|
|
207
|
+
return `${item.name}: marked sold out`;
|
|
202
208
|
if (item.unavailable)
|
|
203
209
|
return `${item.name} is not available`;
|
|
204
210
|
const choice = item.choices.find((candidate) => candidate.variantId === pick.variantId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@final-commerce/command-frame",
|
|
3
|
-
"version": "0.10.0-staging.
|
|
3
|
+
"version": "0.10.0-staging.2",
|
|
4
4
|
"description": "Commands Frame library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"ignoreBranchesMissingTickets": true
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@final-commerce/common": "2.
|
|
60
|
+
"@final-commerce/common": "2.6.0-staging.1"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@commitlint/cli": "^19.0.0",
|