fix : update vuetify - export btns

This commit is contained in:
zeinab.ashrafi
2025-04-27 13:43:01 +03:30
parent 6276d37ece
commit d3895d6e37
9 changed files with 11428 additions and 15 deletions
+11374
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -8,8 +8,8 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"@mdi/font": "^2.5.94",
"@fortawesome/fontawesome-free": "^5.7.2", "@fortawesome/fontawesome-free": "^5.7.2",
"@mdi/font": "^2.5.94",
"axios": "^1.5.0", "axios": "^1.5.0",
"bootstrap": "^4.0.0", "bootstrap": "^4.0.0",
"chart.js": "^3.7.1", "chart.js": "^3.7.1",
@@ -30,7 +30,7 @@
"vue-style-loader": "^4.1.2", "vue-style-loader": "^4.1.2",
"vue2-dropzone": "^3.6.0", "vue2-dropzone": "^3.6.0",
"vuelidate": "^0.7.4", "vuelidate": "^0.7.4",
"vuetify": "^1.2.5", "vuetify": "^1.5.24",
"vuetify-upload-component": "^1.0.6", "vuetify-upload-component": "^1.0.6",
"vuex": "^3.0.1", "vuex": "^3.0.1",
"vuex-router-sync": "^5.0.0" "vuex-router-sync": "^5.0.0"
@@ -64,4 +64,4 @@
"last 2 versions", "last 2 versions",
"not dead" "not dead"
] ]
} }
+8
View File
@@ -104,6 +104,14 @@
<span class="black--text">Close</span> <span class="black--text">Close</span>
</v-btn> </v-btn>
<v-spacer/> <v-spacer/>
<router-link :to="{ name: 'AddLabel' ,query: { packageId: data.id }}">
<v-btn class="WM-CyanBlueGradient-BG" @click="closeModal" style="padding:10px 60px">
<v-icon class="white--text mr-2 caption">fas fa-edit</v-icon>
<span class="white--text">Add Label</span>
</v-btn>
</router-link>
<v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px"> <v-btn class="WM-CyanBlueGradient-BG" @click="print" style="padding:10px 60px">
<v-icon class="white--text mr-2 caption">fas fa-print</v-icon> <v-icon class="white--text mr-2 caption">fas fa-print</v-icon>
<span class="white--text">Print</span> <span class="white--text">Print</span>
+10 -5
View File
@@ -186,7 +186,6 @@ const urls = {
return `/Item/Verify/${id}`; return `/Item/Verify/${id}`;
}, },
Barcode: function (code, type) { Barcode: function (code, type) {
return `/BarCode/${code}/${type}`; return `/BarCode/${code}/${type}`;
}, },
packageBarcode: function (code) { packageBarcode: function (code) {
@@ -198,8 +197,14 @@ const urls = {
changeItemStatus: function (id) { changeItemStatus: function (id) {
return `/Items/ChangeStatus/${id}`; return `/Items/ChangeStatus/${id}`;
}, },
// transferItem: function (id) { exportItems: function () {
// return `/transfers/${id}`; return `/export/items`;
// } },
exportPackages: function () {
return `/export/packages`;
},
exportCycles: function () {
return `/export/cycles`;
},
}; };
export { urls }; export {urls};
+2 -3
View File
@@ -1,12 +1,11 @@
import 'font-awesome/css/font-awesome.min.css' import 'font-awesome/css/font-awesome.min.css'
import Vue from 'vue'; import Vue from 'vue';
// import vuetify from '@/plugins/vuetify'
// Components // Components
import './components' import './components'
// Plugins // Plugins
import './plugins'; import './plugins';
import './plugins/vuetify'
// Config // Config
import { baseUrl } from './config'; import { baseUrl } from './config';
+8 -1
View File
@@ -46,7 +46,7 @@
<span>Filter</span> <span>Filter</span>
</v-tooltip> </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> <v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
<span class="black--text">EXPORT</span> <span class="black--text">EXPORT</span>
</v-btn> </v-btn>
@@ -248,6 +248,13 @@ export default {
this.medicalCenters = result.data.data.MedicalCenters; 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: { computed: {
...mapGetters("modal", ["getModalResult"]) ...mapGetters("modal", ["getModalResult"])
+8 -1
View File
@@ -40,7 +40,7 @@
<span>Filter</span> <span>Filter</span>
</v-tooltip> </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> <v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
<span class="black--text">EXPORT</span> <span class="black--text">EXPORT</span>
</v-btn> </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) { removeModal(id) {
this.changeCurrentModal({ this.changeCurrentModal({
modal: "modal-user-confirmation", modal: "modal-user-confirmation",
+7
View File
@@ -79,6 +79,7 @@
<script> <script>
import {ApiService} from "@/services"; import {ApiService} from "@/services";
import {urls} from "@/config/urls"; import {urls} from "@/config/urls";
import toast from "@/services/global/toast.service";
export default { export default {
metaInfo() { metaInfo() {
@@ -147,6 +148,12 @@ export default {
if (result && result.status == 200) { if (result && result.status == 200) {
this.items = result.data.data; 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() { async submitForm() {
let result; let result;
+8 -2
View File
@@ -29,7 +29,7 @@
<span>Filter</span> <span>Filter</span>
</v-tooltip> </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> <v-icon class="black--text mr-2 caption">fas fa-share-square</v-icon>
<span class="black--text">EXPORT</span> <span class="black--text">EXPORT</span>
</v-btn> </v-btn>
@@ -297,7 +297,13 @@ export default {
const target = this.items.find(i => i.id === item.id) const target = this.items.find(i => i.id === item.id)
if (target) target.status = newStatus 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: { computed: {
...mapGetters("modal", ["getModalResult"]) ...mapGetters("modal", ["getModalResult"])