Melhorias

Alterar a ordem de apresentação do pop up sobre a recorrencia - Apresentar logo após o click no botão de edição do evento;
A app não envia o comentario na revisão de eventos;
Ao remover a recorrência do evento a app não remove os eventos da Agenda
This commit is contained in:
Peter Maquiran
2024-07-02 14:15:06 +01:00
parent f0402a1e5b
commit fea0279ad7
199 changed files with 40665 additions and 164593 deletions
+49 -7
View File
@@ -1,5 +1,6 @@
importScripts('https://www.gstatic.com/firebasejs/8.2.0/firebase-app.js');
importScripts('https://www.gstatic.com/firebasejs/8.2.0/firebase-messaging.js');
importScripts('./assets/dexie/dist/dexie.js');
// Initialize the Firebase app in the service worker by passing the generated config
var firebaseConfig = {
@@ -28,7 +29,7 @@ messaging.onBackgroundMessage(function(payload) {
/* self.registration.showNotification(notificationTitle,
notificationOptions); */
});
});
self.addEventListener('install', function(event) {
@@ -40,7 +41,7 @@ self.addEventListener('activate', function(event) {
// console.log('Activated', event);
});
self.addEventListener('push', function(event) {
self.addEventListener('push', function(event) {
var uid = "EXISTS_IN_CORE.JS";
var token = "ALSO_EXISTS_IN_CORE.JS";
@@ -49,13 +50,11 @@ self.addEventListener('push', function(event) {
});
self.addEventListener('message', function(event){
var data = JSON.parse(event.data);
// var data = JSON.parse(event.data);
// console.log("SW Received Message:");
// console.log(data);
console.log(event.data);
self.userID = data.uid;
self.userToken = data.token;
});
@@ -70,4 +69,47 @@ self.addEventListener('message', function(event){
});
}
});
}); */
}); */
// Define the schema using a plain object (similar to zod schema in TypeScript)
const tableSharedCalendarSchema = {
wxUserId: 'number',
wxFullName: 'string',
wxeMail: 'string',
role: 'string',
roleId: 'number',
shareType: 'number',
startDate: 'string',
endDate: 'string'
};
// Database declaration
const AgendaDataSource = new Dexie('AgendaDataSource');
// Define the database schema
AgendaDataSource.version(1).stores({
shareCalendar: '++wxUserId, wxFullName, wxeMail, role, roleId, shareType, startDate, endDate'
});
// Define the table schema using Dexie.js' Table interface (optional)
const shareCalendarTable = AgendaDataSource.table('shareCalendar');
(async()=> {
console.log(await shareCalendarTable.toArray())
})();
// setInterval(()=>{
// shareCalendarTable.add({
// wxUserId: new Date().getTime(),
// wxFullName: "3-",
// wxeMail: "SessionStore.user.Email",
// role: "SessionStore.user.RoleDescription",
// roleId: "SessionStore.user.RoleID",
// shareType: 3,
// date: '',
// })
// }, 1000)