Compare commits
4 Commits
aae7512498
...
62dbaef278
| Author | SHA1 | Date | |
|---|---|---|---|
| 62dbaef278 | |||
| 9869edf4a6 | |||
| 624b8fae56 | |||
| 97a77a2a37 |
@ -9,7 +9,15 @@
|
||||
:data="file"
|
||||
@click="ReplaceImage"
|
||||
onlyPreview
|
||||
:filePath="file.fileUrl" />
|
||||
:filePath="file.fileUrl">
|
||||
<template #actionButtons v-if="!usersStore.isPanelUser">
|
||||
<i
|
||||
class="ico-c ico-btn ico-section back-grad-alert"
|
||||
@click="DeleteImagePop(file)">
|
||||
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||
</i>
|
||||
</template>
|
||||
</file-list-item>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-item form-item-picture clickable" @click="picturePanel = true">
|
||||
@ -43,12 +51,14 @@
|
||||
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useSiteManagementPageStore } from '../../stores/siteManagementPageStore'
|
||||
const siteManagementPageStore = useSiteManagementPageStore()
|
||||
import { useDialogStore } from '@/components/global/dialogStore'
|
||||
const dialogStore = useDialogStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
const picturePanel = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
@ -108,6 +118,32 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const DeleteImagePop = (data: Record<string, any>) => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Resim Sil',
|
||||
id: 'deleteimage',
|
||||
content: 'Resmi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||
closeText: 'Vazgeç',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Resmi Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteImage(data.id)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const DeleteImage = async (id: number | string) => {
|
||||
var dt = await dataStore.dataDelete('DocumentPage/' + id)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
dialogStore.CloseDialog('deleteimage')
|
||||
await GetData()
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await GetData()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user