112 lines
4.6 KiB
JavaScript
112 lines
4.6 KiB
JavaScript
import { b as attributes, o as clsx, c as bind_props, f as head, j as ensure_array_like, i as escape_html, k as attr, m as stringify } from "../../../chunks/index2.js";
|
|
import { C as Card, a as Card_header, b as Card_title, c as Card_description, d as Card_content } from "../../../chunks/card-title.js";
|
|
import { c as cn } from "../../../chunks/utils2.js";
|
|
import "clsx";
|
|
import { B as Button } from "../../../chunks/button.js";
|
|
function Card_footer($$renderer, $$props) {
|
|
$$renderer.component(($$renderer2) => {
|
|
let {
|
|
ref = null,
|
|
class: className,
|
|
children,
|
|
$$slots,
|
|
$$events,
|
|
...restProps
|
|
} = $$props;
|
|
$$renderer2.push(`<div${attributes({
|
|
"data-slot": "card-footer",
|
|
class: clsx(cn("flex items-center px-6 [.border-t]:pt-6", className)),
|
|
...restProps
|
|
})}>`);
|
|
children?.($$renderer2);
|
|
$$renderer2.push(`<!----></div>`);
|
|
bind_props($$props, { ref });
|
|
});
|
|
}
|
|
function _page($$renderer, $$props) {
|
|
$$renderer.component(($$renderer2) => {
|
|
let { data } = $$props;
|
|
head("9fk07v", $$renderer2, ($$renderer3) => {
|
|
$$renderer3.title(($$renderer4) => {
|
|
$$renderer4.push(`<title>Users — Base</title>`);
|
|
});
|
|
});
|
|
$$renderer2.push(`<main class="flex min-h-0 flex-1 flex-col gap-4 p-4 sm:gap-6 sm:p-6"><h1 class="text-2xl font-semibold">Users</h1> <div class="grid gap-4 sm:grid-cols-2 lg:grid-cols-3"><!--[-->`);
|
|
const each_array = ensure_array_like(data.users);
|
|
for (let $$index = 0, $$length = each_array.length; $$index < $$length; $$index++) {
|
|
let user = each_array[$$index];
|
|
$$renderer2.push("<!---->");
|
|
Card?.($$renderer2, {
|
|
class: "flex flex-col",
|
|
children: ($$renderer3) => {
|
|
$$renderer3.push("<!---->");
|
|
Card_header?.($$renderer3, {
|
|
class: "flex flex-row items-center gap-3",
|
|
children: ($$renderer4) => {
|
|
$$renderer4.push(`<div class="flex size-10 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground text-sm font-medium">${escape_html(user.name ? String(user.name).slice(0, 2).toUpperCase() : user.email ? String(user.email).slice(0, 2).toUpperCase() : "?")}</div> <div class="min-w-0 flex-1">`);
|
|
$$renderer4.push("<!---->");
|
|
Card_title?.($$renderer4, {
|
|
class: "truncate",
|
|
children: ($$renderer5) => {
|
|
$$renderer5.push(`<!---->${escape_html(user.name ?? user.email ?? user.id)}`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer4.push(`<!----> `);
|
|
if (user.email && user.name) {
|
|
$$renderer4.push("<!--[-->");
|
|
$$renderer4.push("<!---->");
|
|
Card_description?.($$renderer4, {
|
|
class: "truncate text-xs",
|
|
children: ($$renderer5) => {
|
|
$$renderer5.push(`<!---->${escape_html(user.email)}`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer4.push(`<!---->`);
|
|
} else {
|
|
$$renderer4.push("<!--[!-->");
|
|
}
|
|
$$renderer4.push(`<!--]--></div>`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer3.push(`<!----> `);
|
|
$$renderer3.push("<!---->");
|
|
Card_content?.($$renderer3, {
|
|
class: "flex-1",
|
|
children: ($$renderer4) => {
|
|
$$renderer4.push(`<p class="text-muted-foreground text-sm">Prism ${escape_html(user.prism ? "✓" : "—")} · TasGrid ${escape_html(user.tasgrid ? "✓" : "—")} · Stackq ${escape_html(user.stackq ? "✓" : "—")} · HRM ${escape_html(user.hrm ? "✓" : "—")}</p>`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer3.push(`<!----> `);
|
|
$$renderer3.push("<!---->");
|
|
Card_footer?.($$renderer3, {
|
|
children: ($$renderer4) => {
|
|
$$renderer4.push(`<a${attr("href", `/users/${stringify(user.id)}`)} class="block">`);
|
|
Button($$renderer4, {
|
|
variant: "outline",
|
|
class: "w-full",
|
|
children: ($$renderer5) => {
|
|
$$renderer5.push(`<!---->View`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer4.push(`<!----></a>`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer3.push(`<!---->`);
|
|
},
|
|
$$slots: { default: true }
|
|
});
|
|
$$renderer2.push(`<!---->`);
|
|
}
|
|
$$renderer2.push(`<!--]--></div></main>`);
|
|
});
|
|
}
|
|
export {
|
|
_page as default
|
|
};
|