Üye dökümanları için silme butonu eklendi
This commit is contained in:
@ -16,7 +16,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-part-content" v-if="customerDocumentStore.loaded">
|
<div class="form-part-content" v-if="customerDocumentStore.loaded">
|
||||||
<template v-if="customerDocumentStore.customerDocumentsList.length > 0">
|
<template v-if="customerDocumentStore.customerDocumentsList.length > 0">
|
||||||
<div class="form-inner-comment waiting-d" v-if="customerDocumentStore.customerDocumentsList.length < 3">
|
<div
|
||||||
|
class="form-inner-comment waiting-d"
|
||||||
|
v-if="customerDocumentStore.customerDocumentsList.length < 3">
|
||||||
En az
|
En az
|
||||||
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
<strong>Ticaret Sicil Gazetesi, Vergi Levhası, İmza Sirküleri</strong>
|
||||||
sisteme yüklenmiş olmalıdır.
|
sisteme yüklenmiş olmalıdır.
|
||||||
@ -26,12 +28,26 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
@click="EditDocument"
|
@click="EditDocument"
|
||||||
:filePath="file.filePath"
|
:filePath="file.filePath"
|
||||||
:editable="usersStore.selectedUserApproveId === 3 || usersStore.selectedUserApproveId === 0"
|
:editable="
|
||||||
title="title" />
|
usersStore.isPanelUser ||
|
||||||
|
(!usersStore.isPanelUser &&
|
||||||
|
(usersStore.selectedUserApproveId === 3 ||
|
||||||
|
usersStore.selectedUserApproveId === 0))
|
||||||
|
"
|
||||||
|
title="title">
|
||||||
|
<template #actionButtons v-if="usersStore.isPanelUser">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteDocumentPop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<template v-if="!usersStore.isPanelUser && usersStore.selectedUserApproveId !== 5">
|
<template
|
||||||
|
v-if="!usersStore.isPanelUser && usersStore.selectedUserApproveId !== 5">
|
||||||
<div class="form-inner-comment">
|
<div class="form-inner-comment">
|
||||||
<span>
|
<span>
|
||||||
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
|
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
|
||||||
@ -79,20 +95,21 @@
|
|||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onBeforeMount } from 'vue'
|
import { onBeforeMount } from 'vue'
|
||||||
|
|
||||||
import PanelUserDocument from '../panel/PanelUserDocument.vue'
|
import PanelUserDocument from '../panel/PanelUserDocument.vue'
|
||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
|
||||||
const dataStore = useDataStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
import { useCustomerDocumentStore } from '../../stores/customerDocumentStore'
|
import { useCustomerDocumentStore } from '../../stores/customerDocumentStore'
|
||||||
const customerDocumentStore = useCustomerDocumentStore()
|
const customerDocumentStore = useCustomerDocumentStore()
|
||||||
import { useCustomerDocumentService } from '../../service/customerDocumentService'
|
import { useCustomerDocumentService } from '../../service/customerDocumentService'
|
||||||
const customerDocumentService = useCustomerDocumentService()
|
const customerDocumentService = useCustomerDocumentService()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
|
||||||
const NewDocument = () => {
|
const NewDocument = () => {
|
||||||
customerDocumentStore.ResetForm()
|
customerDocumentStore.ResetForm()
|
||||||
@ -106,6 +123,31 @@
|
|||||||
customerDocumentStore.documentPanel = true
|
customerDocumentStore.documentPanel = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DeleteDocumentPop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Doküman Sil',
|
||||||
|
id: 'deletedoc',
|
||||||
|
content: 'Dokümanı silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Doküman Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteDocument(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteDocument = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('Popup/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deletedoc')
|
||||||
|
await customerDocumentService.GetDocumentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
usersStore.SetSelectedUser()
|
usersStore.SetSelectedUser()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user