Compare commits

..

3 Commits

7 changed files with 1661 additions and 1396 deletions

View File

@ -10,29 +10,29 @@
"dev": "webpack serve" "dev": "webpack serve"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.23.2", "@babel/core": "^7.24.3",
"@babel/plugin-transform-runtime": "^7.23.2", "@babel/plugin-transform-runtime": "^7.24.3",
"@babel/preset-env": "^7.23.2", "@babel/preset-env": "^7.24.3",
"babel-loader": "^9.1.3", "babel-loader": "^9.1.3",
"css-loader": "^6.8.1", "css-loader": "^6.10.0",
"style-loader": "^3.3.3", "style-loader": "^3.3.4",
"ts-loader": "^9.5.0", "ts-loader": "^9.5.1",
"typescript": "^5.2.2", "typescript": "^5.4.3",
"webpack": "^5.89.0", "webpack": "^5.91.0",
"webpack-cli": "^5.1.4", "webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1" "webpack-dev-server": "^5.0.4"
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.23.2", "@babel/runtime": "^7.24.1",
"@fullcalendar/core": "^6.1.9", "@fullcalendar/core": "^6.1.11",
"@fullcalendar/icalendar": "^6.1.9", "@fullcalendar/icalendar": "^6.1.11",
"@fullcalendar/resource": "^6.1.9", "@fullcalendar/resource": "^6.1.11",
"@fullcalendar/resource-timegrid": "^6.1.9", "@fullcalendar/resource-timegrid": "^6.1.11",
"@fullcalendar/resource-timeline": "^6.1.9", "@fullcalendar/resource-timeline": "^6.1.11",
"@fullcalendar/timegrid": "^6.1.9", "@fullcalendar/timegrid": "^6.1.11",
"core-js": "^3.33.2", "core-js": "^3.36.1",
"ical.js": "^1.5.0", "ical.js": "^1.5.0",
"preact": "^10.18.2", "preact": "^10.20.1",
"unique-colors": "^1.0.1" "unique-colors": "^1.0.1"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,8 @@
"type": "module", "type": "module",
"exports": "./server.js", "exports": "./server.js",
"dependencies": { "dependencies": {
"express": "^4.18.2", "express": "^4.19.2",
"puppeteer": "^21.5.0" "puppeteer": "^22.6.1"
}, },
"scripts": { "scripts": {
"start": "npm run dev", "start": "npm run dev",
@ -12,9 +12,9 @@
"serve": "node dist/server.js" "serve": "node dist/server.js"
}, },
"devDependencies": { "devDependencies": {
"@types/express": "^4.17.20", "@types/express": "^4.17.21",
"@types/node": "^20.8.10", "@types/node": "^20.11.30",
"tsx": "^3.14.0", "tsx": "^4.7.1",
"typescript": "^5.2.2" "typescript": "^5.4.3"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -67,6 +67,7 @@ export function main(
.filter(([shop_name, shop]) => shop.calendar !== undefined) .filter(([shop_name, shop]) => shop.calendar !== undefined)
.forEach(([shop_name, shop], idx) => { .forEach(([shop_name, shop], idx) => {
calendar.addEventSource({ calendar.addEventSource({
id: shop_name,
url: '/calendar/ical/' + shop.calendar + '/public/basic.ics', url: '/calendar/ical/' + shop.calendar + '/public/basic.ics',
format: 'ics', format: 'ics',
color: colors[idx], color: colors[idx],
@ -91,6 +92,22 @@ export function main(
); );
} }
} }
// Add background event if resource has children
let tool_resource = calendar.getResourceById(eventData.resourceId);
let children = tool_resource?.getChildren();
if (tool_resource && children?.length) {
let new_event = {
...eventData,
resourceIds: [
tool_resource.id,
...children.map((resource) => resource.id),
],
display: 'background',
};
calendar.addEvent(new_event, shop_name);
}
return eventData; return eventData;
}, },
}); });

View File

@ -38,7 +38,11 @@
"ShopBot, PRSstandard 96-48-8", "ShopBot, PRSstandard 96-48-8",
"Table Saw, SawStop 3HP 10\"", "Table Saw, SawStop 3HP 10\"",
"Planer, Powermatic 20\"", "Planer, Powermatic 20\"",
"Jointer, Powermatic 8\"" "Jointer, Powermatic 8\"",
"Rikon 70-305 Wood Lathe",
"Rikon 70-100 Wood Lathe",
"Record CL3 Wood Lathe",
"Powermatic 45 Wood Lathe"
] ]
} }
} }

View File

@ -37,15 +37,17 @@ module.exports = [
}, },
devServer: { devServer: {
allowedHosts: 'all', allowedHosts: 'all',
proxy: { proxy: [
'/calendar': { {
context: ['/calendar'],
target: 'https://calendar.google.com', target: 'https://calendar.google.com',
changeOrigin: true, changeOrigin: true,
}, },
'/ipad.png': { {
context: ['/ipad.png'],
target: 'http://localhost:1234', target: 'http://localhost:1234',
}, },
}, ],
}, },
module: { module: {
rules: [ rules: [