@sprucelabs/spruce-organization-utils 2.3.22 → 2.3.25
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.
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { AbstractViewController, buildActiveRecordCard, } from '@sprucelabs/heartwood-view-controllers';
|
|
11
|
+
import { locationRenderer } from '@sprucelabs/spruce-skill-utils';
|
|
11
12
|
export default class OrganizationListCardViewController extends AbstractViewController {
|
|
12
13
|
constructor(options) {
|
|
13
14
|
super(options);
|
|
@@ -48,6 +49,7 @@ export default class OrganizationListCardViewController extends AbstractViewCont
|
|
|
48
49
|
});
|
|
49
50
|
}
|
|
50
51
|
buildRow(org) {
|
|
52
|
+
const address = org.address;
|
|
51
53
|
return {
|
|
52
54
|
id: org.id,
|
|
53
55
|
isSelected: this.selectedOrgId === org.id,
|
|
@@ -62,9 +64,7 @@ export default class OrganizationListCardViewController extends AbstractViewCont
|
|
|
62
64
|
content: org.name,
|
|
63
65
|
},
|
|
64
66
|
subText: {
|
|
65
|
-
content:
|
|
66
|
-
? `${org.address.street1}${org.address.street2 ? ` ${org.address.street2}` : ``} ${org.address.city} ${org.address.zip}`
|
|
67
|
-
: ``}`,
|
|
67
|
+
content: locationRenderer.renderAddress(address),
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
{
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
|
4
|
+
const spruce_skill_utils_1 = require("@sprucelabs/spruce-skill-utils");
|
|
4
5
|
class OrganizationListCardViewController extends heartwood_view_controllers_1.AbstractViewController {
|
|
5
6
|
constructor(options) {
|
|
6
7
|
super(options);
|
|
@@ -39,6 +40,7 @@ class OrganizationListCardViewController extends heartwood_view_controllers_1.Ab
|
|
|
39
40
|
await this.handleDeleteOrg(org);
|
|
40
41
|
}
|
|
41
42
|
buildRow(org) {
|
|
43
|
+
const address = org.address;
|
|
42
44
|
return {
|
|
43
45
|
id: org.id,
|
|
44
46
|
isSelected: this.selectedOrgId === org.id,
|
|
@@ -53,9 +55,7 @@ class OrganizationListCardViewController extends heartwood_view_controllers_1.Ab
|
|
|
53
55
|
content: org.name,
|
|
54
56
|
},
|
|
55
57
|
subText: {
|
|
56
|
-
content:
|
|
57
|
-
? `${org.address.street1}${org.address.street2 ? ` ${org.address.street2}` : ``} ${org.address.city} ${org.address.zip}`
|
|
58
|
-
: ``}`,
|
|
58
|
+
content: spruce_skill_utils_1.locationRenderer.renderAddress(address),
|
|
59
59
|
},
|
|
60
60
|
},
|
|
61
61
|
{
|