From 11dca03aa898d39b633e8e8893706e4096205203 Mon Sep 17 00:00:00 2001 From: Chad Derya Date: Mon, 9 Sep 2019 22:09:35 +0100 Subject: [PATCH] Added delete to terminals --- src/api/terminal.js | 11 ++ src/components/PopUps/Delete/index.vue | 10 +- src/views/products/components/EditorImage.vue | 111 ------------------ src/views/products/list.vue | 2 +- src/views/terminals/list.vue | 7 +- 5 files changed, 27 insertions(+), 114 deletions(-) delete mode 100644 src/views/products/components/EditorImage.vue diff --git a/src/api/terminal.js b/src/api/terminal.js index 07a8a6c6..e84d61dc 100644 --- a/src/api/terminal.js +++ b/src/api/terminal.js @@ -22,6 +22,17 @@ export function updateTerminal(data) { return axios.put(`${TerminalEndpointUrl}/terminal/${data._id}`, dto) } +export function deleteTerminal(data) { + // put this logic in the .vue file + if (data !== '') { + console.log(data) + const chad = `${TerminalEndpointUrl}/terminal/${data}?secret=MySecretForTerminal&platform=${store.state.platform}` + // return axios.delete(${ProductEndpointUrl}/fuels/${data}?secret=MySecretForTermina&platform=${store.state.platform}) + return chad + } + return 'error' +} + function __dataToDTO(data) { return { 'name': data.name, diff --git a/src/components/PopUps/Delete/index.vue b/src/components/PopUps/Delete/index.vue index dd4b6445..56a35bb4 100644 --- a/src/components/PopUps/Delete/index.vue +++ b/src/components/PopUps/Delete/index.vue @@ -45,6 +45,8 @@ - - diff --git a/src/views/products/list.vue b/src/views/products/list.vue index 167edb32..6afbd9be 100644 --- a/src/views/products/list.vue +++ b/src/views/products/list.vue @@ -42,7 +42,7 @@ diff --git a/src/views/terminals/list.vue b/src/views/terminals/list.vue index 9e91c5e0..8a6cda82 100644 --- a/src/views/terminals/list.vue +++ b/src/views/terminals/list.vue @@ -22,6 +22,10 @@ Edit + @@ -33,10 +37,11 @@