Sha256: c9640fd11e7f9827679df0c38323124faae01a62cbe2befd86eca37a3b528ffd

Contents?: true

Size: 1.56 KB

Versions: 3

Compression:

Stored size: 1.56 KB

Contents

/*

Copyright (c) 2023, all rights reserved.

All the information provided by this platform is protected by international laws related  to
industrial property, intellectual property, copyright and relative international laws.
All intellectual or industrial property rights of the code, texts, trade mark, design,
pictures and any other information belongs to the owner of this platform.

Without the written permission of the owner, any replication, modification,
transmission, publication is strictly forbidden.

For more information read the license file including with this software.

// · ~·~     ~·~     ~·~     ~·~     ~·~     ~·~     ~·~     ~·~     ~·~     ~·~     ~·~     ~·~
// ·

*/

// · 
import { defineStore } from "pinia"

// · 
export const useEvents = defineStore("driver.events", {
    state: () => {
        return {
            showModal: false,
            options: {
                event_types: []
            },
            submit: {
                event: false,
                delete: false
            },
        }
    },

    actions: {

        getOptions() {
            let url = this.url.driver('events/options')
            this.http.get(url).then(result => {
                if (result) {
                    this.options.event_types = result.event_types.map(option => {
                        return { label: option.text, value: option.value };
                    });
                }
            }).catch(error => {
                this.msg.danger(I18n.t("core.shared.messages_danger_internal_error"))
            })
        },
    }
})

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
lesli_calendar-0.2.2 lib/vue/stores/events.js
lesli_calendar-0.2.1 lib/vue/stores/events.js
lesli_driver-0.2.0 lib/vue/stores/events.js