import { defineComponent, ref, reactive, unref, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain } from 'vue/server-renderer'; import { a as useI18n } from './server.mjs'; import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'vue-router'; import 'node:url'; import 'pinia'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/utils'; import 'unhead/plugins'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "point-rules", __ssrInlineRender: true, setup(__props) { const { t } = useI18n(); const loading = ref(true); const error = ref(false); const rules = ref([]); const showModal = ref(false); const showDeleteModal = ref(false); const editingRule = ref(null); const deletingRule = ref(null); const saving = ref(false); const formError = ref(""); const toast = ref(""); const form = reactive({ action_key: "", points: 0, description: "", is_active: true }); return (_ctx, _push, _parent, _attrs) => { var _a; _push(`
${ssrInterpolate(unref(t)("gamification.point_rules.subtitle"))}
${ssrInterpolate(unref(t)("gamification.point_rules.load_error"))}
| ${ssrInterpolate(unref(t)("gamification.point_rules.col_id"))} | ${ssrInterpolate(unref(t)("gamification.point_rules.col_action_key"))} | ${ssrInterpolate(unref(t)("gamification.point_rules.col_points"))} | ${ssrInterpolate(unref(t)("gamification.point_rules.col_description"))} | ${ssrInterpolate(unref(t)("gamification.point_rules.col_status"))} | ${ssrInterpolate(unref(t)("gamification.point_rules.col_actions"))} |
|---|---|---|---|---|---|
| ${ssrInterpolate(rule.id)} | ${ssrInterpolate(rule.action_key)} | ${ssrInterpolate(rule.points >= 0 ? "+" : "")}${ssrInterpolate(rule.points)} | ${ssrInterpolate(rule.description || "\u2014")} | ${ssrInterpolate(rule.is_active ? unref(t)("gamification.point_rules.active") : unref(t)("gamification.point_rules.inactive"))} | |
| ${ssrInterpolate(unref(t)("gamification.point_rules.empty"))} | |||||
${ssrInterpolate(unref(t)("gamification.point_rules.delete_confirm_body", { action_key: (_a = unref(deletingRule)) == null ? void 0 : _a.action_key }))}