import { defineComponent, ref, reactive, computed, unref, useSSRContext } from "vue"; import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain } from "vue/server-renderer"; import "/app/node_modules/hookable/dist/index.mjs"; import "/app/node_modules/klona/dist/index.mjs"; import { a as useI18n } from "../server.mjs"; import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js"; import "/app/node_modules/ofetch/dist/node.mjs"; import "#internal/nuxt/paths"; import "/app/node_modules/unctx/dist/index.mjs"; import "/app/node_modules/h3/dist/index.mjs"; import "pinia"; import "/app/node_modules/defu/dist/defu.mjs"; import "vue-router"; import "/app/node_modules/ufo/dist/index.mjs"; import "/app/node_modules/cookie-es/dist/index.mjs"; import "/app/node_modules/destr/dist/index.mjs"; import "/app/node_modules/ohash/dist/index.mjs"; import "/app/node_modules/@unhead/vue/dist/index.mjs"; import "@vue/devtools-api"; 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))}