- add EventEmmitter for directly binding Events to component
- add NotificationToast for messages - add leaflet map component and zoom control component - change focus:ring to focus:ring-2 inside BaseButton - `@tailwindcss/line-clamp` plugin is now included by default...remove it from tailwind.config.js - npm updates
This commit is contained in:
parent
080c21126b
commit
cd66f318b6
22 changed files with 1063 additions and 292 deletions
46
resources/js/Stores/map.ts
Normal file
46
resources/js/Stores/map.ts
Normal file
|
@ -0,0 +1,46 @@
|
|||
import { defineStore } from 'pinia';
|
||||
// import axios from 'axios';
|
||||
|
||||
|
||||
export const MapService = defineStore('map', {
|
||||
state: () => ({
|
||||
|
||||
// dataset: {} as Dataset,
|
||||
|
||||
mapService: new Map<string, any>(),
|
||||
|
||||
}),
|
||||
actions: {
|
||||
// payload = authenticated user
|
||||
setUser(payload) {
|
||||
if (payload.name) {
|
||||
this.userName = payload.name;
|
||||
}
|
||||
if (payload.email) {
|
||||
this.userEmail = payload.email;
|
||||
}
|
||||
if (payload.avatar) {
|
||||
this.userAvatar = payload.avatar;
|
||||
}
|
||||
},
|
||||
|
||||
getMap(id: string): L.Map {
|
||||
return this.mapService.get(id);
|
||||
},
|
||||
|
||||
setMap(id: string, map) {
|
||||
this.mapService.set(id, map);
|
||||
|
||||
},
|
||||
|
||||
hasMap(id: string): boolean {
|
||||
return this.mapService.has(id);
|
||||
},
|
||||
|
||||
deleteMap(id: string): boolean {
|
||||
return this.mapService.delete(id);
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
});
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue