mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-12 17:13:19 +03:30
fix : update vuetify - export btns
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
<span>Filter</span>
|
||||
</v-tooltip>
|
||||
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;">
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click="download()" style="padding: 10px 30px;">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>
|
||||
@@ -248,6 +248,13 @@ export default {
|
||||
this.medicalCenters = result.data.data.MedicalCenters;
|
||||
}
|
||||
},
|
||||
async download() {
|
||||
const result = await ApiService.get(urls.exportCycles());
|
||||
if (result && result.status == 200) {
|
||||
console.log(result)
|
||||
window.open(result.download, '_blank');
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalResult"])
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<span>Filter</span>
|
||||
</v-tooltip>
|
||||
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;">
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click="download()" style="padding: 10px 30px;">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>
|
||||
@@ -252,6 +252,13 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
async download() {
|
||||
const result = await ApiService.get(urls.exportItems());
|
||||
if (result && result.status == 200) {
|
||||
console.log(result)
|
||||
window.open(result.download, '_blank');
|
||||
}
|
||||
},
|
||||
removeModal(id) {
|
||||
this.changeCurrentModal({
|
||||
modal: "modal-user-confirmation",
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
<script>
|
||||
import {ApiService} from "@/services";
|
||||
import {urls} from "@/config/urls";
|
||||
import toast from "@/services/global/toast.service";
|
||||
|
||||
export default {
|
||||
metaInfo() {
|
||||
@@ -147,6 +148,12 @@ export default {
|
||||
if (result && result.status == 200) {
|
||||
this.items = result.data.data;
|
||||
}
|
||||
if (this.$route.query.packageId) {
|
||||
this.formData.package_id = this.items.find((i) => i.id == this.$route.query.packageId);
|
||||
if (!this.formData.package_id) {
|
||||
toast.error('package is not in the list');
|
||||
}
|
||||
}
|
||||
},
|
||||
async submitForm() {
|
||||
let result;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<span>Filter</span>
|
||||
</v-tooltip>
|
||||
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" style="padding: 10px 30px;">
|
||||
<v-btn class="WM-Outline-Btn WM-Border mr-2 WM-Margin-BT-0 WM-Border-Black" @click="download()" style="padding: 10px 30px;">
|
||||
<v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
|
||||
<span class="black--text">EXPORT</span>
|
||||
</v-btn>
|
||||
@@ -297,7 +297,13 @@ export default {
|
||||
const target = this.items.find(i => i.id === item.id)
|
||||
if (target) target.status = newStatus
|
||||
}
|
||||
}
|
||||
},
|
||||
async download() {
|
||||
const result = await ApiService.get(urls.exportPackages());
|
||||
if (result && result.status == 200) {
|
||||
window.open(result.download, '_blank');
|
||||
}
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapGetters("modal", ["getModalResult"])
|
||||
|
||||
Reference in New Issue
Block a user