AllApiCalls.js 1.33 KB
import GetApis from "@/Services/GetApis.js";
import PutApis from "@/Services/PutApis.js";

export default {
    mixins: [GetApis, PutApis],
    data() {
        return {
            // UploadPdf.vue
            emptyPdf: '',
            // UploadFiles.vue
            trigger: '',
            pptFile: "",
            pptFileName: "",
            pdfFile: "",
            pdfFileName: "",
            courseData: [],
            teachersList: [],
            schoolEvents: [],
            particularEvent: {},

        }
    },
    methods: {
        /************************** METHODS USED FOR COMMON FILES *********************/
        /* METHODS USED FOR UploadPdf.vue */
        pdfFileSelected(e, message) {

            this.pdfFile = e.fileInBase64;
            this.pdfFileName = e.selectedFileName;
            this.emptyPdf = e.emptyPdf;

        },

        /* METHODS USED FOR UploadFiles.vue */
        fileSelected(e, message) {
            if (message == "uploadPPT") {
                this.pptFile = e.fileInBase64;
                this.pptFileName = e.selectedFileName;
                this.trigger = e.trigger;
            }
            if (message == "uploadPDF") {
                this.pdfFile = e.fileInBase64;
                this.pdfFileName = e.selectedFileName;
                this.emptyPdf = e.trigger;
            }
        },


    },
}