@local-civics/mgmt-ui 0.1.254 → 0.1.256
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/index.d.ts +1 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4057,8 +4057,8 @@ const CommentCenter = (props) => {
|
|
|
4057
4057
|
const groupUserIds = Array.from(new Set(group.items.map((gi) => gi.recipientId)));
|
|
4058
4058
|
const onTitleClick = tab === "students" ? props.onStudentClick ? () => props.onStudentClick(group.key, { badgeId: void 0, lessonId: void 0, groupUserIds }) : void 0 : tab === "badges" ? props.onBadgeClick ? () => props.onBadgeClick(group.key) : void 0 : props.onLessonClick ? () => props.onLessonClick(group.key) : void 0;
|
|
4059
4059
|
return /* @__PURE__ */ React.createElement("div", { key: group.key, className: "overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2.5 border-b border-slate-100 bg-slate-50/60 px-5 py-2.5" }, tab === "students" ? /* @__PURE__ */ React.createElement("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-mint-400/20 text-[10px] font-bold text-dark-blue-400" }, (group.title[0] || "?").toUpperCase()) : tab === "badges" ? /* @__PURE__ */ React.createElement("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-mint-400/15" }, /* @__PURE__ */ React.createElement(IconAlbum, { size: 15, stroke: 2, className: "text-mint-400" })) : /* @__PURE__ */ React.createElement("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-lg bg-gold-400/15" }, /* @__PURE__ */ React.createElement(IconLambda, { size: 15, stroke: 2, className: "text-gold-400" })), onTitleClick ? /* @__PURE__ */ React.createElement("button", { type: "button", onClick: onTitleClick, className: "text-left text-xs font-extrabold text-sky-blue-400 hover:underline" }, group.title) : /* @__PURE__ */ React.createElement("div", { className: "text-xs font-extrabold text-dark-blue-400" }, group.title)), group.items.map((item, i) => {
|
|
4060
|
-
const materialName = tab === "students" ? item.
|
|
4061
|
-
const materialType = tab === "students" ? item.
|
|
4060
|
+
const materialName = tab === "students" ? item.lessonName || item.badgeName || "General" : item.recipientName;
|
|
4061
|
+
const materialType = tab === "students" ? item.lessonId ? "Lesson" : item.badgeId ? "Badge" : void 0 : void 0;
|
|
4062
4062
|
return /* @__PURE__ */ React.createElement(
|
|
4063
4063
|
"div",
|
|
4064
4064
|
{
|
|
@@ -4082,7 +4082,7 @@ const CommentCenter = (props) => {
|
|
|
4082
4082
|
/* @__PURE__ */ React.createElement("div", { className: "truncate text-[11px] text-slate-500" }, item.commenterName || "\u2014"),
|
|
4083
4083
|
/* @__PURE__ */ React.createElement("div", { className: "text-xs text-slate-600" }, item.commentText),
|
|
4084
4084
|
/* @__PURE__ */ React.createElement("div", { className: "truncate text-[11px] text-slate-400" }, formatDate$1(item.createdAt)),
|
|
4085
|
-
/* @__PURE__ */ React.createElement("div", { className: "flex justify-center" }, item.requireValidation && /* @__PURE__ */ React.createElement("span", { className:
|
|
4085
|
+
/* @__PURE__ */ React.createElement("div", { className: "flex justify-center" }, item.requireValidation && /* @__PURE__ */ React.createElement("span", { className: `rounded-full px-2 py-0.5 text-[10px] font-bold text-dark-blue-400 ${item.resolvedAt ? "bg-mint-400/15" : "bg-gold-400/15"}` }, item.resolvedAt ? "Resolved" : "Needs validation")),
|
|
4086
4086
|
/* @__PURE__ */ React.createElement("div", { className: "flex justify-center" }, !item.requireValidation ? /* @__PURE__ */ React.createElement("span", { className: "text-[11px] text-slate-400" }, "\u2014") : item.resolvedAt ? /* @__PURE__ */ React.createElement(IconCheck, { size: 16, stroke: 3, className: "text-mint-400" }) : item.isLocal ? /* @__PURE__ */ React.createElement("span", { className: "text-[11px] text-slate-400" }, "Pending") : /* @__PURE__ */ React.createElement(
|
|
4087
4087
|
"button",
|
|
4088
4088
|
{
|
|
@@ -4237,7 +4237,7 @@ function SubmissionCommentPanel(props) {
|
|
|
4237
4237
|
"Leave a Comment"
|
|
4238
4238
|
))), /* @__PURE__ */ React.createElement("div", { className: "mt-4 flex flex-col gap-3" }, props.loading && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-400" }, "Loading comments\u2026"), !props.loading && props.comments.length === 0 && /* @__PURE__ */ React.createElement("p", { className: "text-sm text-slate-400" }, "No comments yet."), !props.loading && props.comments.map((c) => {
|
|
4239
4239
|
const resolved = !!c.resolvedAt;
|
|
4240
|
-
return /* @__PURE__ */ React.createElement("div", { key: c.commentId, className: "rounded-lg border border-slate-100 bg-slate-50 p-3.5" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "text-xs font-bold text-dark-blue-400" }, c.commenterName || "Educator"), /* @__PURE__ */ React.createElement("div", { className: "text-[10.5px] text-slate-400" }, formatDate(c.createdAt))), /* @__PURE__ */ React.createElement("p", { className: "mt-1.5 text-sm text-slate-600" }, c.commentText), c.requireValidation && /* @__PURE__ */ React.createElement("div", { className: "mt-2.5 flex items-center gap-2" }, /* @__PURE__ */ React.createElement("span", { className: `rounded-full px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide ${!resolved ? "bg-gold-100 text-dark-blue-400" : c.needsSubmission ? "bg-sky-blue-400/15 text-dark-blue-400" : "bg-mint-100 text-dark-blue-400"}` }, !resolved ? "Needs
|
|
4240
|
+
return /* @__PURE__ */ React.createElement("div", { key: c.commentId, className: "rounded-lg border border-slate-100 bg-slate-50 p-3.5" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-start justify-between gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "text-xs font-bold text-dark-blue-400" }, c.commenterName || "Educator"), /* @__PURE__ */ React.createElement("div", { className: "text-[10.5px] text-slate-400" }, formatDate(c.createdAt))), c.targetLabel && /* @__PURE__ */ React.createElement("div", { className: "mt-1 text-[11px] font-bold text-slate-400" }, c.targetLabel), /* @__PURE__ */ React.createElement("p", { className: "mt-1.5 text-sm text-slate-600" }, c.commentText), c.requireValidation && /* @__PURE__ */ React.createElement("div", { className: "mt-2.5 flex items-center gap-2" }, /* @__PURE__ */ React.createElement("span", { className: `rounded-full px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide ${!resolved ? "bg-gold-100 text-dark-blue-400" : c.needsSubmission ? "bg-sky-blue-400/15 text-dark-blue-400" : "bg-mint-100 text-dark-blue-400"}` }, !resolved ? "Needs validation" : c.needsSubmission ? "Needs submission" : "Resolved"), !resolved && !c.isLocal && props.onResolve && /* @__PURE__ */ React.createElement(
|
|
4241
4241
|
"button",
|
|
4242
4242
|
{
|
|
4243
4243
|
type: "button",
|