-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kadir Balku
authored and
Kadir Balku
committed
Aug 2, 2024
1 parent
4a9abd3
commit 9ff9e20
Showing
4 changed files
with
5,139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import { reactive as p, computed as m, onMounted as f, openBlock as a, createElementBlock as i, createElementVNode as o, toDisplayString as g, renderSlot as _, createTextVNode as h, createCommentVNode as k, Fragment as y, renderList as v, createBlock as w, pushScopeId as I, popScopeId as S } from "vue"; | ||
import { _ as C, u as b } from "./main-dh3x2JlS.mjs"; | ||
import { useRoute as x } from "vue-router"; | ||
import "@viur/vue-utils"; | ||
import { I as L } from "./ItemCard-_VC1K2XM.mjs"; | ||
const V = (t) => (I("data-v-532e5cf3"), t = t(), S(), t), B = { | ||
key: 0, | ||
class: "viur-shop-loading-wrap" | ||
}, H = /* @__PURE__ */ V(() => /* @__PURE__ */ o("sl-spinner", null, null, -1)), T = [ | ||
H | ||
], E = { | ||
key: 1, | ||
class: "bind" | ||
}, M = { class: "page-header" }, N = { class: "viur-shop-category-view-list" }, A = ["loading", "disabled"], j = { | ||
__name: "CategoryView", | ||
props: { | ||
skellist: { type: Array }, | ||
filter: { type: Boolean, default: !0 }, | ||
pageHeader: { type: String, default: "Artikel Liste" }, | ||
listHandler: { type: Object, required: !0 } | ||
}, | ||
setup(t) { | ||
const l = t, n = x(), c = b(), e = p({ | ||
skellist: [], | ||
loading: !0, | ||
currentCursor: "", | ||
isLastItem: !1, | ||
itemCount: 99, | ||
itemType: m(() => n.params.identifier) | ||
}), s = l.listHandler; | ||
async function d() { | ||
e.loading = !0, await s.next(), e.skellist.length < s.state.skellist.length ? (e.skellist = s.state.skellist, e.loading = !1) : (e.loading = !1, e.isLastItem = !0); | ||
} | ||
return f(async () => { | ||
await c.init(), await s.fetch(!0), e.skellist = s.state.skellist, e.loading = !1; | ||
}), (u, q) => e.loading ? (a(), i("div", B, T)) : (a(), i("div", E, [ | ||
o("div", M, [ | ||
o("h1", null, g(t.pageHeader), 1) | ||
]), | ||
t.filter ? _(u.$slots, "filter", { key: 0 }, () => [ | ||
h(" text-transform text-transform TEST ") | ||
], !0) : k("", !0), | ||
o("div", N, [ | ||
(a(!0), i(y, null, v(e.skellist, (r) => (a(), w(L, { | ||
key: r.shop_name, | ||
item: r | ||
}, null, 8, ["item"]))), 128)) | ||
]), | ||
o("sl-button", { | ||
onClick: d, | ||
loading: e.loading, | ||
disabled: e.isLastItem, | ||
class: "viur-shop-category-view-more-button" | ||
}, " Mehr anzeigen ", 8, A) | ||
])); | ||
} | ||
}, $ = /* @__PURE__ */ C(j, [["__scopeId", "data-v-532e5cf3"]]); | ||
export { | ||
$ as default | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { openBlock as l, createElementBlock as n, createElementVNode as e, toDisplayString as r, withModifiers as m, unref as d, createTextVNode as p, pushScopeId as u, popScopeId as h } from "vue"; | ||
import { Request as _ } from "@viur/vue-utils"; | ||
import { _ as f, u as v } from "./main-dh3x2JlS.mjs"; | ||
const i = (t) => (u("data-v-dc32dd0b"), t = t(), h(), t), b = { class: "viur-shop-item-card-card" }, g = ["src", "alt"], k = { class: "viur-shop-item-card-headline" }, x = /* @__PURE__ */ i(() => /* @__PURE__ */ e("h4", { class: "viur-shop-item-card-subline" }, "B 21 x H 6,5 x T 19 cm", -1)), I = { class: "viur-shop-item-card-price" }, y = { | ||
class: "viur-shop-item-card-footer", | ||
slot: "footer" | ||
}, S = /* @__PURE__ */ i(() => /* @__PURE__ */ e("sl-icon", { | ||
name: "bag-plus", | ||
slot: "prefix" | ||
}, null, -1)), C = /* @__PURE__ */ i(() => /* @__PURE__ */ e("sl-button", { | ||
size: "small", | ||
outline: "", | ||
class: "viur-shop-item-card-add-to-favourites-btn", | ||
variant: "primary", | ||
title: "Add to favourites" | ||
}, [ | ||
/* @__PURE__ */ e("sl-icon", { | ||
name: "heart", | ||
slot: "prefix" | ||
}) | ||
], -1)), w = { | ||
__name: "ItemCard", | ||
props: { | ||
item: { | ||
type: Object, | ||
required: !0 | ||
} | ||
}, | ||
setup(t) { | ||
const a = v(); | ||
function c(s) { | ||
let o = "https://images.unsplash.com/photo-1559209172-0ff8f6d49ff7?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"; | ||
return s.dk_artikel.dest.image ? _.downloadUrlFor(s.dk_artikel.dest.image) : o; | ||
} | ||
return (s, o) => (l(), n("sl-card", b, [ | ||
e("img", { | ||
slot: "image", | ||
src: c(t.item), | ||
alt: t.item.shop_name, | ||
loading: "lazy", | ||
class: "viur-shop-item-card-image" | ||
}, null, 8, g), | ||
e("h3", k, r(t.item.shop_name), 1), | ||
x, | ||
e("div", I, r(t.item.shop_price_retail) + " €", 1), | ||
e("div", y, [ | ||
e("sl-button", { | ||
size: "small", | ||
class: "viur-shop-item-card-add-to-cart-btn", | ||
variant: "primary", | ||
title: "Add to cart", | ||
onClick: o[0] || (o[0] = m((B) => d(a).addToCart(t.item.key, d(a).state.basket), ["stop"])) | ||
}, [ | ||
S, | ||
p(" In den Warenkorb ") | ||
]), | ||
C | ||
]) | ||
])); | ||
} | ||
}, T = /* @__PURE__ */ f(w, [["__scopeId", "data-v-dc32dd0b"]]); | ||
export { | ||
T as I | ||
}; |
Oops, something went wrong.