fix(fe smartblock): fixing smartblock_page.ts name

This commit is contained in:
Marco Cavalli 2025-05-26 15:18:28 +02:00
parent 25ca1d17a5
commit ee1010dacd
4 changed files with 7 additions and 41 deletions

View file

@ -2,7 +2,7 @@
import Table from "@/components/content/partials/Table.vue";
import ConfirmDelete from "@/components/content/partials/dialogs/ConfirmDelete.vue";
import {onBeforeMount, reactive, ref, watch} from "vue";
import {blocks_page} from "@/composables/content/blocks_page.ts";
import {smartblock_page} from "@/composables/content/smartblock_page.ts";
import SmartBlockEditor from "@partials/SmartBlockEditor.vue";
import {useSmartBlockStore} from "@/stores/smartblock.store.ts";
import {baseSmartBlock} from "@models/smartblock/smartblock.ts";
@ -21,7 +21,7 @@ const props = defineProps({
const smartBlockStore = useSmartBlockStore()
const { items, listData, headers, selected, loading, search, getItems, editItem, deleteItem } = blocks_page()
const { items, listData, headers, selected, loading, search, getItems, editItem, deleteItem } = smartblock_page()
const itemEdited = ref({
id: null

View file

@ -1,15 +1,15 @@
<script setup lang="ts">
import TrackList from "@/components/content/partials/TrackList.vue";
import {useAuthStore} from "@/stores/auth.store.ts";
import {onBeforeMount, onMounted, reactive, ref, watch} from "vue";
import {baseSmartBlock, smartblock} from "@models/smartblock/smartblock.ts";
import {blocks_page} from "@/composables/content/blocks_page.ts";
import {onMounted, ref, watch} from "vue";
import {smartblock} from "@models/smartblock/smartblock.ts";
import {smartblock_page} from "@/composables/content/smartblock_page.ts";
import {formatFromSeconds} from "@/helpers/TimeFormatter.ts";
import {useSmartBlockStore} from "@/stores/smartblock.store.ts";
const auth = useAuthStore();
const { loading, getTracklist } = blocks_page()
const { loading, getTracklist } = smartblock_page()
const emit = defineEmits([
'saveItem'

View file

@ -119,42 +119,8 @@ export function smartblock(item) {
case 'criteria':
fields[key].component = SmartBlockCriteriaFieldGroup
break
// case 'limit':
// fields[key].component = SmartBlockLimit
// break
// case 'repeat_tracks':
// case 'overflow_tracks':
// fields[key].component = VCheckbox
// fields[key].type = 'checkbox'
// break
// case 'sort':
// fields[key].component = VSelect
// fields[key].items = [
// {
// title: 'Random',
// value: 'random'
// },
// {
// title: 'Dal più recente',
// value: 'newest'
// },
// {
// title: 'Dal meno recente',
// value: 'oldest'
// },
// {
// title: 'Più recentemente andate in onda',
// value: 'mostrecentplay'
// },
// {
// title: 'Meno recentemente andate in onda',
// value: 'leastrecentplay'
// }
// ]
// break
}
})
// console.log(fields)
return fields
}
}

View file

@ -5,7 +5,7 @@ import {deleteSmartBlock, getSmartBlock, SmartBlockTableHeader} from "@models/sm
import {showTableHeader} from "@models/show/show.ts";
import {useAuthStore} from "@/stores/auth.store.ts";
export function blocks_page() {
export function smartblock_page() {
const items = ref([])
const selected = ref([])
const loading = ref(false)