diff --git a/Services/client/src/stores/storage.ts b/Services/client/src/stores/storage.ts index faecae2..2eebab0 100644 --- a/Services/client/src/stores/storage.ts +++ b/Services/client/src/stores/storage.ts @@ -214,6 +214,10 @@ const useStorage = defineStore('storageStore', () => { createdAt: data.createdAt, createdBy: data.createdBy, }) + } else { + error.title = 'ตั้งชื่อ Folder ซ้ำ' + error.msg = '' + error.show() } folder.value[path].sort((a, b) => a.pathname.localeCompare(b.pathname)) @@ -281,11 +285,11 @@ const useStorage = defineStore('storageStore', () => { ) } - const idx = folder.value[path].findIndex( - (v) => v.pathname === currentInfo.path, - ) - console.log(idx) - + if (currentInfo.path.includes(arr[arr.length - 1])) { + error.title = 'ตำเเหน่งที่คุณอยู่ถูกลบ' + error.msg = '' + error.show() + } }) socket.on('FileUpload', (data: StorageFile) => { const arr = data.pathname.split('/').filter(Boolean)