import { defineComponent, ref, reactive, computed, 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: "levels", __ssrInlineRender: true, setup(__props) { const { t } = useI18n(); const loading = ref(true); const error = ref(false); const saving = ref(false); const levels2 = ref([]); const showModal = ref(false); const editingLevel = ref(null); const formError = ref(""); const form = reactive({ level_number: 1, rank_name: "", min_points: 0, is_penalty: false }); const sortedLevels = computed(() => { return [...levels2.value].sort((a, b) => a.level_number - b.level_number); }); return (_ctx, _push, _parent, _attrs) => { _push(`
${ssrInterpolate(unref(t)("gamification.levels.subtitle"))}
${ssrInterpolate(unref(t)("gamification.levels.load_error"))}
| ${ssrInterpolate(unref(t)("gamification.levels.col_level"))} | ${ssrInterpolate(unref(t)("gamification.levels.col_rank"))} | ${ssrInterpolate(unref(t)("gamification.levels.col_min_points"))} | ${ssrInterpolate(unref(t)("gamification.levels.col_type"))} | ${ssrInterpolate(unref(t)("gamification.levels.col_actions"))} |
|---|---|---|---|---|
| ${ssrInterpolate(level.level_number)} | ${ssrInterpolate(level.rank_name)} | ${ssrInterpolate(level.min_points.toLocaleString())} | `); if (level.is_penalty) { _push(`${ssrInterpolate(unref(t)("gamification.levels.penalty"))}`); } else { _push(`${ssrInterpolate(unref(t)("gamification.levels.normal"))}`); } _push(` | |
| ${ssrInterpolate(unref(t)("gamification.levels.no_levels"))} | ||||
${ssrInterpolate(unref(formError))}