@social-mail/social-mail-client 1.2.476 → 1.3.0
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/dist/public/store/Store.pack.js +12 -9
- package/dist/public/store/Store.pack.js.map +1 -1
- package/dist/public/store/Store.pack.min.js +2 -2
- package/dist/public/store/Store.pack.min.js.map +1 -1
- package/dist/public/store/StoreItemListView.js +8 -8
- package/dist/public/store/StoreItemListView.js.map +1 -1
- package/dist/public/store/storeItemLink.d.ts.map +1 -1
- package/dist/public/store/storeItemLink.js +4 -1
- package/dist/public/store/storeItemLink.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/public/store/StoreItemListView.tsx +7 -7
- package/src/public/store/storeItemLink.ts +2 -1
package/package.json
CHANGED
|
@@ -154,13 +154,13 @@ export default class StoreItemListView extends AtomControl {
|
|
|
154
154
|
itemRenderer={(item: IStoreItem) => <div class="store-item">
|
|
155
155
|
<a
|
|
156
156
|
class="name"
|
|
157
|
-
title={item.name}
|
|
158
|
-
text={item.name}
|
|
157
|
+
title={item.name || item.variantFor?.name || item.name}
|
|
158
|
+
text={item.name || item.variantFor?.name || item.name}
|
|
159
159
|
href={storeItemLink(item)}/>
|
|
160
160
|
<label
|
|
161
161
|
class="description"
|
|
162
|
-
title={item.description}
|
|
163
|
-
text={item.description}
|
|
162
|
+
title={item.description || item.variantFor?.description || item.description}
|
|
163
|
+
text={item.description || item.variantFor?.description || item.description}
|
|
164
164
|
/>
|
|
165
165
|
<img
|
|
166
166
|
src={Bind.oneTimeAsync(() => this.downloadImage(item))}
|
|
@@ -169,7 +169,7 @@ export default class StoreItemListView extends AtomControl {
|
|
|
169
169
|
class="buy"
|
|
170
170
|
text="Buy"/>
|
|
171
171
|
<div class="price">
|
|
172
|
-
<label text={ formatPrice(item.storeItemPrices?.[0])}/>
|
|
172
|
+
<label text={ formatPrice(item.storeItemPrices?.[0] ?? item.variantFor?.storeItemPrices?.[0] )}/>
|
|
173
173
|
</div>
|
|
174
174
|
</div>}
|
|
175
175
|
/>
|
|
@@ -239,7 +239,6 @@ export default class StoreItemListView extends AtomControl {
|
|
|
239
239
|
.where((x) =>
|
|
240
240
|
x.itemType in [ "product", "service", "resource"]
|
|
241
241
|
&& x.sizeForID === null
|
|
242
|
-
&& x.variantForID === null
|
|
243
242
|
);
|
|
244
243
|
if (search) {
|
|
245
244
|
search = search + "%";
|
|
@@ -260,7 +259,8 @@ export default class StoreItemListView extends AtomControl {
|
|
|
260
259
|
const items = await q.orderByDescending((x) => x.storeItemID)
|
|
261
260
|
.include((x) => [
|
|
262
261
|
x.storeItemPrices,
|
|
263
|
-
x.storeItemTags.forEach((t) => t.tag)
|
|
262
|
+
x.storeItemTags.forEach((t) => t.tag),
|
|
263
|
+
x.variantFor
|
|
264
264
|
])
|
|
265
265
|
// .trace()
|
|
266
266
|
.toPagedList({
|
|
@@ -3,4 +3,5 @@ import { toBase36 } from "../../common/toBase36";
|
|
|
3
3
|
import { IStoreItem } from "../../model/model";
|
|
4
4
|
|
|
5
5
|
// eslint-disable-next-line @typescript-eslint/no-base-to-string
|
|
6
|
-
export const storeItemLink = (item: IStoreItem) =>
|
|
6
|
+
export const storeItemLink = (item: IStoreItem) =>
|
|
7
|
+
apiPath(`/store/${toBase36(item.storeID)}/${ toBase36(item.variantForID ?? item.storeItemID)}/${encodeURIComponent(item.name)}`);
|