Skip to content

Commit

Permalink
🐛 fixed regressions resulting in basic functionalities to break after…
Browse files Browse the repository at this point in the history
… Meteor 3 upgrade

🔇 remove development logs
⬆️ upgrade dependencies to latest Meteor.js version 3.1
  • Loading branch information
faburem committed Dec 2, 2024
1 parent dbc28ba commit 45ac6be
Show file tree
Hide file tree
Showing 20 changed files with 119 additions and 122 deletions.
12 changes: 6 additions & 6 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

[email protected] # Packages every Meteor app needs to have
[email protected] # Packages for a great mobile UX
[email protected].2 # The database Meteor supports right now
[email protected].3 # The database Meteor supports right now
[email protected] # Reactive variable for tracker
[email protected] # Meteor's client-side reactive programming library

[email protected] # ECMAScript 5 compatibility for older browsers.
[email protected].9 # Enable ECMAScript2015+ syntax in app code
[email protected].0 # Server-side component of the `meteor shell` command
[email protected].10 # Enable ECMAScript2015+ syntax in app code
[email protected].1 # Server-side component of the `meteor shell` command

[email protected].2
[email protected].3
[email protected]
[email protected]
[email protected]
ostrio:loggerconsole
faburem:client-server-logger
[email protected].0
[email protected].1
ostrio:[email protected]
[email protected]
faburem:accounts-anonymous
Expand All @@ -35,4 +35,4 @@ blaze-html-templates
[email protected]
[email protected]
[email protected]
fourseven:scss@4.17.0-rc.0
leonardoventurini:scss
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@3.0.4
METEOR@3.1
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 \
Expand All @@ -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
Expand Down
24 changes: 12 additions & 12 deletions imports/ui/pages/details/components/dailytimetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
44 changes: 22 additions & 22 deletions imports/ui/pages/details/components/detailtimetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down
6 changes: 3 additions & 3 deletions imports/ui/pages/details/components/filterbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(',') })
}
},
Expand Down
2 changes: 1 addition & 1 deletion imports/ui/pages/details/components/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
24 changes: 12 additions & 12 deletions imports/ui/pages/details/components/periodtimetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
20 changes: 10 additions & 10 deletions imports/ui/pages/details/components/workingtimetable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
26 changes: 13 additions & 13 deletions imports/ui/pages/details/dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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,
},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
4 changes: 2 additions & 2 deletions imports/ui/pages/overview/editproject/components/taskModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
})
})
Expand Down
Loading

0 comments on commit 45ac6be

Please sign in to comment.