From 45ac6be5af99832afad1c0966b6182a3db7bdbc9 Mon Sep 17 00:00:00 2001 From: Fabian Kromer Date: Mon, 2 Dec 2024 09:12:04 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fixed=20regressions=20resulting?= =?UTF-8?q?=20in=20basic=20functionalities=20to=20break=20after=20Meteor?= =?UTF-8?q?=203=20upgrade=20=F0=9F=94=87=20remove=20development=20logs=20?= =?UTF-8?q?=E2=AC=86=EF=B8=8F=20upgrade=20dependencies=20to=20latest=20Met?= =?UTF-8?q?eor.js=20version=203.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .meteor/packages | 12 ++--- .meteor/release | 2 +- .meteor/versions | 9 ++-- Dockerfile | 6 +-- .../details/components/dailytimetable.js | 24 +++++----- .../details/components/detailtimetable.js | 44 +++++++++---------- .../ui/pages/details/components/filterbar.js | 6 +-- .../ui/pages/details/components/pagination.js | 2 +- .../details/components/periodtimetable.js | 24 +++++----- .../details/components/workingtimetable.js | 20 ++++----- imports/ui/pages/details/dashboard.js | 26 +++++------ .../components/projectAccessRights.js | 6 +-- .../editproject/components/taskModal.js | 4 +- .../components/wekanInterfaceSettings.js | 6 +-- .../pages/track/components/projectsearch.js | 10 ++--- .../ui/pages/track/components/tasksearch.js | 10 ++--- .../ui/pages/track/components/usersearch.js | 8 ++-- imports/ui/pages/track/tracktime.js | 18 ++++---- imports/utils/oidc/oidc_server.js | 2 - package.json | 2 +- 20 files changed, 119 insertions(+), 122 deletions(-) diff --git a/.meteor/packages b/.meteor/packages index d5c0fc6e..d1a2989d 100644 --- a/.meteor/packages +++ b/.meteor/packages @@ -6,21 +6,21 @@ meteor-base@1.5.2 # Packages every Meteor app needs to have mobile-experience@1.1.2 # Packages for a great mobile UX -mongo@2.0.2 # The database Meteor supports right now +mongo@2.0.3 # The database Meteor supports right now reactive-var@1.0.13 # Reactive variable for tracker tracker@1.3.4 # Meteor's client-side reactive programming library es5-shim@4.8.1 # ECMAScript 5 compatibility for older browsers. -ecmascript@0.16.9 # Enable ECMAScript2015+ syntax in app code -shell-server@0.6.0 # Server-side component of the `meteor shell` command +ecmascript@0.16.10 # Enable ECMAScript2015+ syntax in app code +shell-server@0.6.1 # Server-side component of the `meteor shell` command -accounts-password@3.0.2 +accounts-password@3.0.3 check@1.4.4 random@1.2.2 dynamic-import@0.7.4 ostrio:loggerconsole faburem:client-server-logger -email@3.1.0 +email@3.1.1 ostrio:flow-router-extra@3.11.0-rc300.1 jquery@3.0.0 faburem:accounts-anonymous @@ -35,4 +35,4 @@ blaze-html-templates ddp-rate-limiter@1.2.2 standard-minifier-css@1.9.3 standard-minifier-js@3.0.0 -fourseven:scss@4.17.0-rc.0 +leonardoventurini:scss diff --git a/.meteor/release b/.meteor/release index b1e86a35..8d20e1a2 100644 --- a/.meteor/release +++ b/.meteor/release @@ -1 +1 @@ -METEOR@3.0.4 +METEOR@3.1 diff --git a/.meteor/versions b/.meteor/versions index 2a9d3cc8..9fc88c99 100644 --- a/.meteor/versions +++ b/.meteor/versions @@ -36,7 +36,6 @@ faburem:accounts-anonymous@0.5.2 faburem:client-server-logger@0.0.5 facts-base@1.0.2 fetch@0.1.5 -fourseven:scss@4.17.0-rc.0 geojson-utils@1.0.12 hot-code-push@1.0.5 html-tools@2.0.0 @@ -45,6 +44,7 @@ id-map@1.2.0 inter-process-messaging@0.1.2 jquery@3.0.2 launch-screen@2.0.1 +leonardoventurini:scss@2.0.0 localstorage@1.2.1 logging@1.3.5 mdg:validated-method@1.3.0 @@ -58,11 +58,11 @@ mobile-status-bar@1.1.1 modern-browsers@0.1.11 modules@0.20.3 modules-runtime@0.13.2 -mongo@2.0.2 +mongo@2.0.3 mongo-decimal@0.2.0 mongo-dev-server@1.1.1 mongo-id@1.0.9 -npm-mongo@4.17.4 +npm-mongo@6.10.0 oauth@3.0.0 oauth2@1.3.3 observe-sequence@2.0.0 @@ -92,8 +92,7 @@ templating-compiler@2.0.0 templating-runtime@2.0.1 templating-tools@2.0.0 tracker@1.3.4 -typescript@5.4.3 -underscore@1.6.4 +typescript@5.6.3 url@1.3.5 webapp@2.0.4 webapp-hashing@1.1.2 diff --git a/Dockerfile b/Dockerfile index d05a86f5..7dd50281 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20.18 +FROM node:22.11 ENV METEOR_ALLOW_SUPERUSER true RUN curl https://install.meteor.com/\?release\=3.0 | sh RUN meteor --version @@ -15,7 +15,7 @@ ENV DISABLE_CLIENT_STATS true ENV METEOR_DISABLE_OPTIMISTIC_CACHING 1 RUN meteor build /build/ --server-only --architecture os.linux.x86_64 -FROM node:20.18-alpine +FROM node:20.11-alpine RUN apk --no-cache add \ bash \ curl \ @@ -38,7 +38,7 @@ RUN rm -rf /app/bundle/programs/server/npm/node_modules/moment/src/locale RUN find /app/bundle/programs/server/npm/node_modules/astronomia/data/ -type f -not -name "deltat.js" -or -name "vsop87Bearth.js" -delete RUN find /app/bundle/programs/server/npm/node_modules/astronomia/lib/data/ -type f -not -name "deltat.js" -or -name "vsop87Bearth.js" -delete -FROM node:20.18-alpine +FROM node:20.11-alpine RUN apk --no-cache add \ bash \ ca-certificates diff --git a/imports/ui/pages/details/components/dailytimetable.js b/imports/ui/pages/details/components/dailytimetable.js index 5d93d393..711f3bd2 100644 --- a/imports/ui/pages/details/components/dailytimetable.js +++ b/imports/ui/pages/details/components/dailytimetable.js @@ -24,21 +24,21 @@ Template.dailytimetable.onCreated(function dailytimetablecreated() { this.totalEntries = new ReactiveVar() this.outboundInterfaces = new ReactiveVar([]) this.autorun(() => { - if (this.data.project.get() - && this.data.resource.get() - && this.data.period.get() - && this.data.limit.get() - && this.data.customer.get()) { - this.projectUsersHandle = this.subscribe('projectResources', { projectId: this.data.project.get() }) + if (this.data?.project.get() + && this.data?.resource.get() + && this.data?.period.get() + && this.data?.limit.get() + && this.data?.customer.get()) { + this.projectUsersHandle = this.subscribe('projectResources', { projectId: this.data?.project.get() }) const methodParameters = { - projectId: this.data.project.get(), - userId: this.data.resource.get(), - period: this.data.period.get(), - limit: this.data.limit.get(), - customer: this.data.customer.get(), + projectId: this.data?.project.get(), + userId: this.data?.resource.get(), + period: this.data?.period.get(), + limit: this.data?.limit.get(), + customer: this.data?.customer.get(), page: Number(FlowRouter.getQueryParam('page')), } - if (this.data.period.get() === 'custom') { + if (this.data?.period.get() === 'custom') { methodParameters.dates = { startDate: getUserSetting('customStartDate') ? getUserSetting('customStartDate') : dayjs.utc().startOf('month').toDate(), endDate: getUserSetting('customEndDate') ? getUserSetting('customEndDate') : dayjs.utc().toDate(), diff --git a/imports/ui/pages/details/components/detailtimetable.js b/imports/ui/pages/details/components/detailtimetable.js index 22df2c90..a011eaca 100644 --- a/imports/ui/pages/details/components/detailtimetable.js +++ b/imports/ui/pages/details/components/detailtimetable.js @@ -93,25 +93,25 @@ Template.detailtimetable.onCreated(function workingtimetableCreated() { this.subscribe('customfieldsForClass', { classname: 'time_entry' }) this.subscribe('customfieldsForClass', { classname: 'project' }) this.autorun(() => { - if (this.data.project.get() - && this.data.resource.get() - && this.data.customer.get() - && this.data.period.get() - && this.data.limit.get()) { + if (this.data?.project.get() + && this.data?.resource.get() + && this.data?.customer.get() + && this.data?.period.get() + && this.data?.limit.get()) { this.myProjectsHandle = this.subscribe('myprojects', {}) - this.projectResourcesHandle = this.subscribe('projectResources', { projectId: this.data.project.get() }) + this.projectResourcesHandle = this.subscribe('projectResources', { projectId: this.data?.project.get() }) const subscriptionParameters = { - projectId: this.data.project.get(), - userId: this.data.resource.get(), - customer: this.data.customer.get(), - period: this.data.period.get(), - limit: this.data.limit.get(), + projectId: this.data?.project.get(), + userId: this.data?.resource.get(), + customer: this.data?.customer.get(), + period: this.data?.period.get(), + limit: this.data?.limit.get(), search: this.search.get(), sort: this.sort.get(), page: Number(FlowRouter.getQueryParam('page')), filters: this.filters.get(), } - if (this.data.period.get() === 'custom') { + if (this.data?.period.get() === 'custom') { subscriptionParameters.dates = { startDate: getUserSetting('customStartDate') ? getUserSetting('customStartDate') : dayjs.utc().startOf('month').toDate(), endDate: getUserSetting('customEndDate') ? getUserSetting('customEndDate') : dayjs.utc().toDate(), @@ -122,22 +122,22 @@ Template.detailtimetable.onCreated(function workingtimetableCreated() { } }) this.autorun(async () => { - if (this.data.project.get() - && this.data.resource.get() - && this.data.customer.get() - && this.data.period.get() - && this.data.limit.get()) { + if (this.data?.project.get() + && this.data?.resource.get() + && this.data?.customer.get() + && this.data?.period.get() + && this.data?.limit.get()) { this.selector.set(await buildDetailedTimeEntriesForPeriodSelectorAsync({ - projectId: this.data.project.get(), + projectId: this.data?.project.get(), search: this.search.get(), - customer: this.data.customer.get(), - period: this.data.period.get(), + customer: this.data?.customer.get(), + period: this.data?.period.get(), dates: { startDate: getUserSetting('customStartDate') ? getUserSetting('customStartDate') : dayjs.utc().startOf('month').toDate(), endDate: getUserSetting('customEndDate') ? getUserSetting('customEndDate') : dayjs.utc().toDate(), }, - userId: this.data.resource.get(), - limit: this.data.limit.get(), + userId: this.data?.resource.get(), + limit: this.data?.limit.get(), page: Number(FlowRouter.getQueryParam('page')), sort: this.sort.get(), filters: this.filters.get(), diff --git a/imports/ui/pages/details/components/filterbar.js b/imports/ui/pages/details/components/filterbar.js index 2b9fb185..948bb671 100644 --- a/imports/ui/pages/details/components/filterbar.js +++ b/imports/ui/pages/details/components/filterbar.js @@ -58,21 +58,21 @@ Template.filterbar.helpers({ Template.filterbar.events({ 'change .js-projectselect': (event, templateInstance) => { event.preventDefault() - if ($(event.currentTarget).val().length > 0 && !templateInstance.data.isComponent) { + if ($(event.currentTarget).val().length > 0 && !templateInstance.data?.isComponent) { FlowRouter.setParams({ projectId: templateInstance.$(event.currentTarget).val().join(',') }) } }, 'change .js-resourceselect': (event, templateInstance) => { event.preventDefault() if (templateInstance.$(event.currentTarget).val().length > 0 - && !templateInstance.data.isComponent) { + && !templateInstance.data?.isComponent) { FlowRouter.setQueryParams({ resource: templateInstance.$(event.currentTarget).val().join(',') }) } }, 'change .js-customerselect': (event, templateInstance) => { event.preventDefault() if (templateInstance.$(event.currentTarget).val().length > 0 - && !templateInstance.data.isComponent) { + && !templateInstance.data?.isComponent) { FlowRouter.setQueryParams({ customer: templateInstance.$(event.currentTarget).val().join(',') }) } }, diff --git a/imports/ui/pages/details/components/pagination.js b/imports/ui/pages/details/components/pagination.js index fefa91bd..0bf51c92 100644 --- a/imports/ui/pages/details/components/pagination.js +++ b/imports/ui/pages/details/components/pagination.js @@ -5,7 +5,7 @@ Template.pagination.onCreated(function paginationCreated() { this.currentPage = new ReactiveVar(1) this.numPages = new ReactiveVar(1) this.autorun(() => { - this.numPages.set(Math.ceil(Number((this.data.totalEntries.get() / this.data.limit.get()))) + this.numPages.set(Math.ceil(Number((this.data?.totalEntries.get() / this.data?.limit.get()))) .toFixed(0)) if (FlowRouter.getQueryParam('page')) { this.currentPage.set(FlowRouter.getQueryParam('page')) diff --git a/imports/ui/pages/details/components/periodtimetable.js b/imports/ui/pages/details/components/periodtimetable.js index 81dce50e..6e9db078 100644 --- a/imports/ui/pages/details/components/periodtimetable.js +++ b/imports/ui/pages/details/components/periodtimetable.js @@ -24,21 +24,21 @@ Template.periodtimetable.onCreated(function periodtimetableCreated() { this.totalPeriodTimeCards = new ReactiveVar() this.outboundInterfaces = new ReactiveVar([]) this.autorun(() => { - if (this.data.project.get() - && this.data.resource.get() - && this.data.period.get() - && this.data.limit.get() - && this.data.customer.get()) { - this.projectUsersHandle = this.subscribe('projectResources', { projectId: this.data.project.get() }) + if (this.data?.project.get() + && this.data?.resource.get() + && this.data?.period.get() + && this.data?.limit.get() + && this.data?.customer.get()) { + this.projectUsersHandle = this.subscribe('projectResources', { projectId: this.data?.project.get() }) const methodParameters = { - projectId: this.data.project.get(), - userId: this.data.resource.get(), - period: this.data.period.get(), - customer: this.data.customer.get(), - limit: this.data.limit.get(), + projectId: this.data?.project.get(), + userId: this.data?.resource.get(), + period: this.data?.period.get(), + customer: this.data?.customer.get(), + limit: this.data?.limit.get(), page: Number(FlowRouter.getQueryParam('page')), } - if (this.data.period.get() === 'custom') { + if (this.data?.period.get() === 'custom') { methodParameters.dates = { startDate: getUserSetting('customStartDate') ? getUserSetting('customStartDate') : dayjs.utc().startOf('month').toDate(), endDate: getUserSetting('customEndDate') ? getUserSetting('customEndDate') : dayjs.utc().toDate(), diff --git a/imports/ui/pages/details/components/workingtimetable.js b/imports/ui/pages/details/components/workingtimetable.js index 408abd37..6c99d134 100644 --- a/imports/ui/pages/details/components/workingtimetable.js +++ b/imports/ui/pages/details/components/workingtimetable.js @@ -21,19 +21,19 @@ Template.workingtimetable.onCreated(function workingtimetableCreated() { this.totalWorkingTimeEntries = new ReactiveVar() this.autorun(() => { - if (this.data.project.get() - && this.data.resource.get() - && this.data.period.get() - && this.data.limit.get()) { - this.projectUsersHandle = this.subscribe('projectResources', { projectId: this.data.project.get() }) + if (this.data?.project.get() + && this.data?.resource.get() + && this.data?.period.get() + && this.data?.limit.get()) { + this.projectUsersHandle = this.subscribe('projectResources', { projectId: this.data?.project.get() }) const methodParameters = { - projectId: this.data.project.get(), - userId: this.data.resource.get(), - period: this.data.period.get(), - limit: this.data.limit.get(), + projectId: this.data?.project.get(), + userId: this.data?.resource.get(), + period: this.data?.period.get(), + limit: this.data?.limit.get(), page: Number(FlowRouter.getQueryParam('page')), } - if (this.data.period.get() === 'custom') { + if (this.data?.period.get() === 'custom') { methodParameters.dates = { startDate: getUserSetting('customStartDate') ? getUserSetting('customStartDate') : dayjs.utc().startOf('month').toDate(), endDate: getUserSetting('customEndDate') ? getUserSetting('customEndDate') : dayjs.utc().toDate(), diff --git a/imports/ui/pages/details/dashboard.js b/imports/ui/pages/details/dashboard.js index a752f5c8..8e984233 100644 --- a/imports/ui/pages/details/dashboard.js +++ b/imports/ui/pages/details/dashboard.js @@ -77,18 +77,18 @@ Template.dashboard.onCreated(function dashboardCreated() { } } } - } else if (this.data.project.get() - && this.data.resource.get() - && this.data.customer.get() - && this.data.period.get() && this.data.period.get() !== 'all') { - if (this.data.period.get() === 'custom') { + } else if (this.data?.project.get() + && this.data?.resource.get() + && this.data?.customer.get() + && this.data?.period.get() && this.data?.period.get() !== 'all') { + if (this.data?.period.get() === 'custom') { this.detailedTimeEntriesHandle = this.subscribe( 'getDetailedTimeEntriesForPeriod', { - projectId: this.data.project.get(), - userId: this.data.resource.get(), - customer: this.data.customer.get(), - period: this.data.period.get(), + projectId: this.data?.project.get(), + userId: this.data?.resource.get(), + customer: this.data?.customer.get(), + period: this.data?.period.get(), dates: { startDate: getUserSetting('customStartDate') ? getUserSetting('customStartDate') : dayjs.utc().startOf('month').toDate(), endDate: getUserSetting('customEndDate') ? getUserSetting('customEndDate') : dayjs.utc().toDate(), @@ -100,10 +100,10 @@ Template.dashboard.onCreated(function dashboardCreated() { this.detailedTimeEntriesHandle = this.subscribe( 'getDetailedTimeEntriesForPeriod', { - projectId: this.data.project.get(), - userId: this.data.resource.get(), - customer: this.data.customer.get(), - period: this.data.period.get(), + projectId: this.data?.project.get(), + userId: this.data?.resource.get(), + customer: this.data?.customer.get(), + period: this.data?.period.get(), limit: -1, }, ) diff --git a/imports/ui/pages/overview/editproject/components/projectAccessRights.js b/imports/ui/pages/overview/editproject/components/projectAccessRights.js index edf866f7..a2c0348e 100644 --- a/imports/ui/pages/overview/editproject/components/projectAccessRights.js +++ b/imports/ui/pages/overview/editproject/components/projectAccessRights.js @@ -9,9 +9,9 @@ import Projects from '../../../../../api/projects/projects.js' Template.projectAccessRights.onCreated(function projectAccessRightsCreated() { this.project = new ReactiveVar() this.autorun(() => { - if (this.data.projectId) { - this.project.set(Projects.findOne({ _id: this.data.projectId })) - this.handle = this.subscribe('singleProject', this.data.projectId) + if (this.data?.projectId) { + this.project.set(Projects.findOne({ _id: this.data?.projectId })) + this.handle = this.subscribe('singleProject', this.data?.projectId) if (this.handle.ready()) { const userIds = this.project.get().team ? this.project.get().team : [] this.subscribe('projectTeam', { userIds }) diff --git a/imports/ui/pages/overview/editproject/components/taskModal.js b/imports/ui/pages/overview/editproject/components/taskModal.js index 69affff2..8d6fdf57 100644 --- a/imports/ui/pages/overview/editproject/components/taskModal.js +++ b/imports/ui/pages/overview/editproject/components/taskModal.js @@ -10,8 +10,8 @@ import BsDialogs from '../../../../shared components/bootstrapDialogs' Template.taskModal.onCreated(function taskModalCreated() { this.editTask = new ReactiveVar(false) this.autorun(() => { - if (this.data.editTaskID.get()) { - this.editTask.set(Tasks.findOne({ _id: this.data.editTaskID.get() })) + if (this.data?.editTaskID.get()) { + this.editTask.set(Tasks.findOne({ _id: this.data?.editTaskID.get() })) } else { this.editTask.set(false) } diff --git a/imports/ui/pages/overview/editproject/components/wekanInterfaceSettings.js b/imports/ui/pages/overview/editproject/components/wekanInterfaceSettings.js index 8ce277d5..4db8e603 100644 --- a/imports/ui/pages/overview/editproject/components/wekanInterfaceSettings.js +++ b/imports/ui/pages/overview/editproject/components/wekanInterfaceSettings.js @@ -165,9 +165,9 @@ Template.wekanInterfaceSettings.onCreated(function wekanInterfaceSettingsCreated this.wekanSwimlanes = new ReactiveVar() this.project = new ReactiveVar() this.autorun(() => { - if (this.data.projectId) { - this.project.set(Projects.findOne({ _id: this.data.projectId })) - this.handle = this.subscribe('singleProject', this.data.projectId) + if (this.data?.projectId) { + this.project.set(Projects.findOne({ _id: this.data?.projectId })) + this.handle = this.subscribe('singleProject', this.data?.projectId) } }) }) diff --git a/imports/ui/pages/track/components/projectsearch.js b/imports/ui/pages/track/components/projectsearch.js index 20c8b889..0f08ad2b 100644 --- a/imports/ui/pages/track/components/projectsearch.js +++ b/imports/ui/pages/track/components/projectsearch.js @@ -13,8 +13,8 @@ Template.projectsearch.onCreated(function createProjectSearch() { this.tcid = new ReactiveVar() this.projects = new ReactiveVar([]) this.autorun(() => { - if (this.data.tcid && this.data.tcid?.get()) { - this.tcid.set(this.data.tcid?.get()) + if (this.data?.tcid && this.data?.tcid?.get()) { + this.tcid.set(this.data?.tcid?.get()) } else if (FlowRouter.getParam('tcid')) { this.tcid.set(FlowRouter.getParam('tcid')) } @@ -25,11 +25,11 @@ Template.projectsearch.onCreated(function createProjectSearch() { this.autorun(() => { if (this.subscriptionsReady()) { - if (this.data.projectId && this.data.projectId.get() && this.data.projectId.get() !== 'all') { - const project = Projects.findOne({ _id: this.data.projectId.get() }) + if (this.data?.projectId && this.data?.projectId.get() && this.data?.projectId.get() !== 'all') { + const project = Projects.findOne({ _id: this.data?.projectId.get() }) this.$('.js-target-project').val(project?.name) this.$('.js-target-project').get(0).setAttribute('data-value', project?._id) - this.selectedId.set(this.data.projectId.get()) + this.selectedId.set(this.data?.projectId.get()) } else if (FlowRouter.getParam('projectId')) { const project = Projects.findOne({ _id: FlowRouter.getParam('projectId') }) if (FlowRouter.getParam('projectId') !== 'all') { diff --git a/imports/ui/pages/track/components/tasksearch.js b/imports/ui/pages/track/components/tasksearch.js index 2e88e54a..85c94d12 100644 --- a/imports/ui/pages/track/components/tasksearch.js +++ b/imports/ui/pages/track/components/tasksearch.js @@ -56,8 +56,8 @@ Template.tasksearch.onCreated(function tasksearchcreated() { }) this.autorun(() => { let tcid - if (this.data.tcid && this.data.tcid.get()) { - tcid = this.data.tcid.get() + if (this.data?.tcid && this.data?.tcid.get()) { + tcid = this.data?.tcid.get() } else if (FlowRouter.getParam('tcid')) { tcid = FlowRouter.getParam('tcid') } @@ -145,13 +145,13 @@ Template.tasksearch.onCreated(function tasksearchcreated() { } }) this.autorun(() => { - this.subscribe('mytasks', { filter: this.filter.get(), projectId: this.data.projectId.get() ? this.data.projectId.get() : FlowRouter.getParam('projectId') }) + this.subscribe('mytasks', { filter: this.filter.get(), projectId: this.data?.projectId.get() ? this.data?.projectId.get() : FlowRouter.getParam('projectId') }) }) this.autorun(() => { - if (this.data.projectId.get()) { + if (this.data?.projectId.get()) { this.taskSelectPopup = Blaze.renderWithData( Template.taskSelectPopup, - { projectId: this.data.projectId }, + { projectId: this.data?.projectId }, document.body, ) } diff --git a/imports/ui/pages/track/components/usersearch.js b/imports/ui/pages/track/components/usersearch.js index 4299a372..2340a3bf 100644 --- a/imports/ui/pages/track/components/usersearch.js +++ b/imports/ui/pages/track/components/usersearch.js @@ -17,8 +17,8 @@ Template.usersearch.onCreated(function usersearchcreated() { this.users = new ReactiveVar() this.autorun(() => { let tcid - if (this.data.tcid && this.data.tcid.get()) { - tcid = this.data.tcid.get() + if (this.data?.tcid && this.data?.tcid.get()) { + tcid = this.data?.tcid.get() } else if (FlowRouter.getParam('tcid')) { tcid = FlowRouter.getParam('tcid') } @@ -48,8 +48,8 @@ Template.usersearch.onCreated(function usersearchcreated() { if (FlowRouter.getParam('projectId')) { loadUsers(FlowRouter.getParam('projectId')) } - if (this.data.projectId.get()) { - loadUsers(this.data.projectId.get()) + if (this.data?.projectId.get()) { + loadUsers(this.data?.projectId.get()) } }) }) diff --git a/imports/ui/pages/track/tracktime.js b/imports/ui/pages/track/tracktime.js index 97b703a7..ce0db6e5 100644 --- a/imports/ui/pages/track/tracktime.js +++ b/imports/ui/pages/track/tracktime.js @@ -90,20 +90,20 @@ Template.tracktime.onCreated(function tracktimeCreated() { this.subscribe('customfieldsForClass', { classname: 'time_entry' }) let handle this.autorun(() => { - if (this.data?.tcid && this.data.tcid.get()) { - this.tcid.set(this.data.tcid.get()) + if (this.data?.tcid && this.data?.tcid.get()) { + this.tcid.set(this.data?.tcid.get()) } else if (FlowRouter.getParam('tcid')) { this.tcid.set(FlowRouter.getParam('tcid')) } - if (this.data?.dateArg && this.data.dateArg.get()) { - this.date.set(this.data.dateArg.get()) - } else if (!(this.data?.dateArg && this.data.dateArg.get()) - && !(this.data?.tcid && this.data.tcid.get()) && FlowRouter.getQueryParam('date')) { + if (this.data?.dateArg && this.data?.dateArg.get()) { + this.date.set(this.data?.dateArg.get()) + } else if (!(this.data?.dateArg && this.data?.dateArg.get()) + && !(this.data?.tcid && this.data?.tcid.get()) && FlowRouter.getQueryParam('date')) { this.date.set(dayjs(FlowRouter.getQueryParam('date'), 'YYYY-MM-DD').toDate()) } - if (this.data?.projectIdArg && this.data.projectIdArg.get()) { - this.projectId.set(this.data.projectIdArg.get()) - } else if (!((this.data?.projectIdArg && this.data.projectIdArg.get()) || (this.data?.tcid && this.data.tcid.get())) && FlowRouter.getParam('projectId')) { + if (this.data?.projectIdArg && this.data?.projectIdArg.get()) { + this.projectId.set(this.data?.projectIdArg.get()) + } else if (!((this.data?.projectIdArg && this.data?.projectIdArg.get()) || (this.data?.tcid && this.data?.tcid.get())) && FlowRouter.getParam('projectId')) { this.projectId.set(FlowRouter.getParam('projectId')) } if (this.tcid.get()) { diff --git a/imports/utils/oidc/oidc_server.js b/imports/utils/oidc/oidc_server.js index 5ac1bbcd..7e5398e5 100644 --- a/imports/utils/oidc/oidc_server.js +++ b/imports/utils/oidc/oidc_server.js @@ -114,7 +114,6 @@ async function getUserInfo(accessToken, expiresAt) { async function registerOidc() { Accounts.oauth.registerService(SERVICE_NAME) OAuth.registerService(SERVICE_NAME, 2, null, async (query) => { - console.log('here') const token = await getToken(query) const accessToken = token.access_token || token.id_token const expiresAt = (+new Date()) + (1000 * parseInt(token.expires_in, 10)) @@ -126,7 +125,6 @@ async function registerOidc() { expiresAt: userinfo.expiresAt, email: userinfo.email, } - console.log(userinfo) if (accessToken) { const tokenContent = getTokenContent(accessToken) const config = await getConfiguration() diff --git a/package.json b/package.json index 488f00ee..6d8baf31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "titra", - "version": "0.99.22", + "version": "0.99.23", "private": true, "scripts": { "start": "meteor run"