@@ -11,21 +11,21 @@ export default /**
11
11
* @returns {FunctionResult}
12
12
*/
13
13
(input) => {
14
- let operations = input.fulfillmentGroups.map(group => {
15
- let rankings = group.inventoryLocations.map(inventoryLocation => ({
14
+ const operations = input.fulfillmentGroups.map(( group) => {
15
+ const rankings = group.inventoryLocations.map(( inventoryLocation) => ({
16
16
locationId: inventoryLocation.location.id,
17
17
rank: 0,
18
18
}));
19
19
20
20
return {
21
21
rank: {
22
22
fulfillmentGroupId: group.id,
23
- rankings: rankings ,
24
- }
23
+ rankings,
24
+ },
25
25
};
26
26
});
27
27
28
- return { operations: operations };
28
+ return {operations};
29
29
};
30
30
{%- elsif flavor contains "typescript" -%}
31
31
import {
@@ -36,20 +36,22 @@ import {
36
36
} from "../generated/api";
37
37
38
38
export default (input: InputQuery): FunctionResult => {
39
- let operations: Operation[] = input.fulfillmentGroups.map(group => {
40
- let rankings: RankedLocation[] = group.inventoryLocations.map(inventoryLocation => ({
41
- locationId: inventoryLocation.location.id,
42
- rank: 0,
43
- }));
39
+ const operations: Operation[] = input.fulfillmentGroups.map((group) => {
40
+ const rankings: RankedLocation[] = group.inventoryLocations.map(
41
+ (inventoryLocation) => ({
42
+ locationId: inventoryLocation.location.id,
43
+ rank: 0,
44
+ }),
45
+ );
44
46
45
47
return {
46
48
rank: {
47
49
fulfillmentGroupId: group.id,
48
- rankings: rankings ,
49
- }
50
+ rankings,
51
+ },
50
52
};
51
53
});
52
54
53
- return { operations: operations };
55
+ return {operations};
54
56
};
55
57
{%- endif -%}
0 commit comments