Compare commits

..

No commits in common. "923f5ec27cd84fb22212afee34c57234484783fb" and "38480a1eec2c45fb6ede7fb27166e6f47b5e97fc" have entirely different histories.

4 changed files with 12 additions and 20 deletions

View File

@ -1,6 +1,6 @@
[metadata]
license = MIT
version = 1.0.0
version = 1.0.0-alpha.9
name = flaschengeist-events
description = Events plugin for Flaschengeist
url = https://flaschengeist.dev/Flaschengeist/flaschengeist-schedule
@ -24,7 +24,7 @@ python_requires = >=3.8
packages =
flaschengeist_events
install_requires =
flaschengeist >= 2.0.0
flaschengeist >= 2.0.0.dev0
[options.package_data]
* = *.toml, script.py.mako, *.ini, migrations/*.py

View File

@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "1.0.0",
"version": "1.0.0-alpha.9",
"name": "@flaschengeist/schedule",
"author": "Ferdinand Thiessen <rpm@fthiessen.de>",
"homepage": "https://flaschengeist.dev/Flaschengeist",
@ -22,8 +22,8 @@
"@quasar/quasar-ui-qcalendar": "^4.0.0-beta.11"
},
"devDependencies": {
"@flaschengeist/api": "^1.0.0",
"@flaschengeist/types": "^1.0.0",
"@flaschengeist/api": "^1.0.0-alpha.8",
"@flaschengeist/types": "^1.0.0-alpha.10",
"@quasar/app-webpack": "^3.7.2",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
@ -38,8 +38,8 @@
"typescript": "^4.5.4"
},
"peerDependencies": {
"@flaschengeist/api": "^1.0.0",
"@flaschengeist/users": "^1.0.0"
"@flaschengeist/api": "^1.0.0-alpha.8",
"@flaschengeist/users": "^1.0.0-alpha.4"
},
"prettier": {
"singleQuote": true,

View File

@ -183,7 +183,7 @@ export default defineComponent({
}
function fromTemplate(tpl: FG.Event) {
const today = props.modelValue?.start || new Date();
const today = new Date();
template.value = tpl;
event.value = Object.assign({}, tpl, { id: undefined });
@ -199,16 +199,9 @@ export default defineComponent({
if (event.value.end) event.value.end.setTime(event.value.end.getTime() + diff);
event.value.jobs = [];
tpl.jobs.forEach((job) => {
const copied_job: FG.Job = Object.assign({}, job, {
id: NaN,
start: new Date(),
end: undefined,
});
copied_job.start.setTime(job.start.getTime() + diff);
if (job.end) {
copied_job.end = new Date();
copied_job.end.setTime(job.end.getTime() + diff);
}
const copied_job: FG.Job = Object.assign({}, job, { id: NaN });
copied_job.start.setTime(copied_job.start.getTime() + diff);
if (copied_job.end) copied_job.end.setTime(copied_job.end.getTime() + diff);
event.value.jobs.push(<Job>copied_job);
});
}
@ -299,7 +292,6 @@ export default defineComponent({
const diff = newValue.getTime() - oldValue.getTime();
event.value?.jobs.forEach((job) => {
job.start.setTime(job.start.getTime() + diff);
job.end?.setTime(job.end.getTime() + diff);
});
computed_end.value?.setTime(computed_end.value?.getTime() + diff);
setTimeout(() => {

View File

@ -235,7 +235,7 @@ export default defineComponent({
'November',
'Dezember',
'-',
][value?.getMonth() === 0 ? 0 : value?.getMonth() || 12];
][value?.getMonth() || 12];
}
function asYear(value?: Date) {
return value?.getFullYear() || '-';