Compare commits
4 Commits
38480a1eec
...
923f5ec27c
Author | SHA1 | Date |
---|---|---|
Tim Gröger | 923f5ec27c | |
Tim Gröger | 084ad8f945 | |
Tim Gröger | 7b1e37b3a7 | |
Tim Gröger | 9a648e8443 |
|
@ -1,6 +1,6 @@
|
|||
[metadata]
|
||||
license = MIT
|
||||
version = 1.0.0-alpha.9
|
||||
version = 1.0.0
|
||||
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.dev0
|
||||
flaschengeist >= 2.0.0
|
||||
|
||||
[options.package_data]
|
||||
* = *.toml, script.py.mako, *.ini, migrations/*.py
|
||||
|
|
10
package.json
10
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"license": "MIT",
|
||||
"version": "1.0.0-alpha.9",
|
||||
"version": "1.0.0",
|
||||
"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-alpha.8",
|
||||
"@flaschengeist/types": "^1.0.0-alpha.10",
|
||||
"@flaschengeist/api": "^1.0.0",
|
||||
"@flaschengeist/types": "^1.0.0",
|
||||
"@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-alpha.8",
|
||||
"@flaschengeist/users": "^1.0.0-alpha.4"
|
||||
"@flaschengeist/api": "^1.0.0",
|
||||
"@flaschengeist/users": "^1.0.0"
|
||||
},
|
||||
"prettier": {
|
||||
"singleQuote": true,
|
||||
|
|
|
@ -183,7 +183,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
function fromTemplate(tpl: FG.Event) {
|
||||
const today = new Date();
|
||||
const today = props.modelValue?.start || new Date();
|
||||
template.value = tpl;
|
||||
|
||||
event.value = Object.assign({}, tpl, { id: undefined });
|
||||
|
@ -199,9 +199,16 @@ 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 });
|
||||
copied_job.start.setTime(copied_job.start.getTime() + diff);
|
||||
if (copied_job.end) copied_job.end.setTime(copied_job.end.getTime() + diff);
|
||||
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);
|
||||
}
|
||||
event.value.jobs.push(<Job>copied_job);
|
||||
});
|
||||
}
|
||||
|
@ -292,6 +299,7 @@ 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(() => {
|
||||
|
|
|
@ -235,7 +235,7 @@ export default defineComponent({
|
|||
'November',
|
||||
'Dezember',
|
||||
'-',
|
||||
][value?.getMonth() || 12];
|
||||
][value?.getMonth() === 0 ? 0 : value?.getMonth() || 12];
|
||||
}
|
||||
function asYear(value?: Date) {
|
||||
return value?.getFullYear() || '-';
|
||||
|
|
Loading…
Reference in New Issue