From 29511d2bc31657ec7d6ede0f5b026bb9a3a1b2f3 Mon Sep 17 00:00:00 2001 From: Amir Date: Sun, 5 Feb 2023 16:26:07 +0800 Subject: [PATCH] Finalize components pengurusan gambar marhun --- package-lock.json | 28 ++++++- package.json | 1 + resources/js/components/ByeComponent.vue | 12 --- resources/js/components/ByeDetail.vue | 3 - resources/js/components/HelloComponent.vue | 12 --- resources/js/components/HelloDetail.vue | 3 - .../marhun/DisplayLelongBid.vue.vue | 40 ++++----- .../pengurusangambar/marhun/MarhunImage.vue | 81 ++++++++++++++----- .../marhun/SelectBatchLelong.vue | 4 +- .../marhun/SelectCawangan.vue | 35 +++----- resources/js/vue-app.js | 9 +-- 11 files changed, 123 insertions(+), 105 deletions(-) delete mode 100644 resources/js/components/ByeComponent.vue delete mode 100644 resources/js/components/ByeDetail.vue delete mode 100644 resources/js/components/HelloComponent.vue delete mode 100644 resources/js/components/HelloDetail.vue diff --git a/package-lock.json b/package-lock.json index 7e90ac2f..c422058b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "datatables.net": "^1.11.3", "datatables.net-dt": "^1.11.3", "jquery-confirm": "^3.3.4", + "v-viewer": "^3.0.11", "viewerjs": "^1.11.2", "vue": "^3.2.13", "vue-loader": "^17.0.1" @@ -5828,8 +5829,7 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -8804,6 +8804,18 @@ "uuid": "bin/uuid" } }, + "node_modules/v-viewer": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/v-viewer/-/v-viewer-3.0.11.tgz", + "integrity": "sha512-E8LOdAxhzuktt4HB3PswVCccQ1Q1sYHYnLsS6zaJISpb5EvmAFs5sYNfXnDLFxVb5DQ82v4ZlGxkYlseXwWRJw==", + "dependencies": { + "lodash": "^4.17.21", + "viewerjs": "^1.9.0" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", @@ -13881,8 +13893,7 @@ "lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash.debounce": { "version": "4.0.8", @@ -16088,6 +16099,15 @@ "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", "dev": true }, + "v-viewer": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/v-viewer/-/v-viewer-3.0.11.tgz", + "integrity": "sha512-E8LOdAxhzuktt4HB3PswVCccQ1Q1sYHYnLsS6zaJISpb5EvmAFs5sYNfXnDLFxVb5DQ82v4ZlGxkYlseXwWRJw==", + "requires": { + "lodash": "^4.17.21", + "viewerjs": "^1.9.0" + } + }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", diff --git a/package.json b/package.json index 47b0a7de..aa79a2ca 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "datatables.net": "^1.11.3", "datatables.net-dt": "^1.11.3", "jquery-confirm": "^3.3.4", + "v-viewer": "^3.0.11", "viewerjs": "^1.11.2", "vue": "^3.2.13", "vue-loader": "^17.0.1" diff --git a/resources/js/components/ByeComponent.vue b/resources/js/components/ByeComponent.vue deleted file mode 100644 index b7d37d0b..00000000 --- a/resources/js/components/ByeComponent.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - \ No newline at end of file diff --git a/resources/js/components/ByeDetail.vue b/resources/js/components/ByeDetail.vue deleted file mode 100644 index dd408ab6..00000000 --- a/resources/js/components/ByeDetail.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/resources/js/components/HelloComponent.vue b/resources/js/components/HelloComponent.vue deleted file mode 100644 index ba117d86..00000000 --- a/resources/js/components/HelloComponent.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - \ No newline at end of file diff --git a/resources/js/components/HelloDetail.vue b/resources/js/components/HelloDetail.vue deleted file mode 100644 index c6bc85e2..00000000 --- a/resources/js/components/HelloDetail.vue +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue b/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue index 5b320ab8..5cc7e457 100644 --- a/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue +++ b/resources/js/components/pengurusangambar/marhun/DisplayLelongBid.vue.vue @@ -1,24 +1,15 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/resources/js/components/pengurusangambar/marhun/MarhunImage.vue b/resources/js/components/pengurusangambar/marhun/MarhunImage.vue index c8a3d026..4b099503 100644 --- a/resources/js/components/pengurusangambar/marhun/MarhunImage.vue +++ b/resources/js/components/pengurusangambar/marhun/MarhunImage.vue @@ -1,12 +1,29 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/resources/js/components/pengurusangambar/marhun/SelectBatchLelong.vue b/resources/js/components/pengurusangambar/marhun/SelectBatchLelong.vue index 9956806c..37ea1c88 100644 --- a/resources/js/components/pengurusangambar/marhun/SelectBatchLelong.vue +++ b/resources/js/components/pengurusangambar/marhun/SelectBatchLelong.vue @@ -11,7 +11,7 @@
- +
@@ -22,7 +22,7 @@ import SelectCawangan from "./SelectCawangan.vue" import axios from "axios"; const listLelong = ref(); -const pilihLelong = ref(); +const pilihLelong = ref('Batch Lelong'); const componentKey = ref(0); const isLoadingGetListLelong = ref(false); diff --git a/resources/js/components/pengurusangambar/marhun/SelectCawangan.vue b/resources/js/components/pengurusangambar/marhun/SelectCawangan.vue index ad9f0d4d..97b3fc66 100644 --- a/resources/js/components/pengurusangambar/marhun/SelectCawangan.vue +++ b/resources/js/components/pengurusangambar/marhun/SelectCawangan.vue @@ -1,20 +1,12 @@ @@ -28,16 +20,10 @@ const props = defineProps({ }) const listCawangan = ref(); -const pilihIdCawangan = ref(); +const pilihIdCawangan = ref('Cawangan'); const componentKeySecond = ref(0); -const isLoadingGetListCawangan = ref(false); - -function testLoading() { - isLoadingGetListCawangan.value = !isLoadingGetListCawangan.value; -} function getListCawangan() { - isLoadingGetListCawangan.value = true; axios.get("/listCawangan", { params: { lelong_id: props.selectedLelong, @@ -45,7 +31,6 @@ function getListCawangan() { }).then((response) => { listCawangan.value = response.data; }).catch((error) => { alert(error); }); - isLoadingGetListCawangan.value = false; } function pilihCawangan(e) { @@ -56,5 +41,5 @@ function pilihCawangan(e) { onMounted(() => { getListCawangan(); -}) +}); diff --git a/resources/js/vue-app.js b/resources/js/vue-app.js index 9f658763..ed621403 100644 --- a/resources/js/vue-app.js +++ b/resources/js/vue-app.js @@ -1,14 +1,11 @@ import { createApp } from 'vue' import './axios' +import 'viewerjs/dist/viewer.css' +import VueViewer from 'v-viewer' -// import HelloComponent from "./components/HelloComponent.vue" -// import ByeComponent from "./components/ByeComponent.vue" import SelectBatchLelong from "./components/pengurusangambar/marhun/SelectBatchLelong.vue" -// const appHelloComponent = createApp(HelloComponent); -// const appByeComponent = createApp(ByeComponent); const appSelectBatchLelong = createApp(SelectBatchLelong); +appSelectBatchLelong.use(VueViewer); -// appHelloComponent.mount("#appHelloComponent"); -// appByeComponent.mount("#appByeComponent"); appSelectBatchLelong.mount("#appSelectBatchLelong"); \ No newline at end of file