fix upload picture

This commit is contained in:
Peter Maquiran
2024-09-20 11:45:11 +01:00
parent 9da65a1e7b
commit d8eb3ddbd6
16 changed files with 356 additions and 130 deletions
-44
View File
@@ -1,6 +1,5 @@
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 = {
@@ -70,46 +69,3 @@ 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)