Skip to content

Commit

Permalink
🐛 fixed Day input in week view - moves input by one day #204
Browse files Browse the repository at this point in the history
🐛 fixed the labels in the administration > extensions page
⬆️ updated package dependencies
  • Loading branch information
faburem committed Feb 15, 2024
1 parent c501bb5 commit 59eb6c3
Show file tree
Hide file tree
Showing 13 changed files with 51 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .meteor/packages
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ ostrio:flow-router-extra
jquery@3.0.0
faburem:accounts-anonymous
mdg:validated-method
service-configuration@1.3.2
service-configuration@1.3.3
oauth@2.2.1
accounts-base@2.2.9
accounts-base@2.2.10
accounts-oauth@1.4.3
oauth2@1.3.2
browser-policy-framing@1.1.2
Expand Down
2 changes: 1 addition & 1 deletion .meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
METEOR@2.14
METEOR@2.15
15 changes: 7 additions & 8 deletions .meteor/versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accounts-base@2.2.9
accounts-base@2.2.10
accounts-oauth@1.4.3
accounts-password@2.4.0
allow-deny@1.1.1
Expand Down Expand Up @@ -47,7 +47,7 @@ launch-screen@2.0.0
localstorage@1.2.0
logging@1.3.3
mdg:validated-method@1.3.0
meteor@1.11.4
meteor@1.11.5
meteor-base@1.5.1
minifier-css@1.6.4
minifier-js@2.7.5
Expand All @@ -66,7 +66,7 @@ oauth@2.2.1
oauth2@1.3.2
observe-sequence@1.0.22
ordered-dict@1.1.0
ostrio:flow-router-extra@3.9.0
ostrio:flow-router-extra@3.10.0
ostrio:logger@2.1.1
ostrio:loggerconsole@2.1.0
promise@0.12.2
Expand All @@ -78,7 +78,7 @@ reactive-var@1.0.12
reload@1.3.1
retry@1.1.0
routepolicy@1.1.1
service-configuration@1.3.2
service-configuration@1.3.3
sha@1.0.9
shell-server@0.5.0
socket-stream-client@0.5.2
Expand All @@ -91,10 +91,9 @@ templating-compiler@1.4.2
templating-runtime@1.6.4
templating-tools@1.2.3
tracker@1.3.3
tunguska:reactive-aggregate@1.3.12
tunguska:reactive-aggregate@1.3.13
typescript@4.9.5
underscore@1.0.13
underscore@1.6.0
url@1.3.2
webapp@1.13.6
webapp@1.13.8
webapp-hashing@1.1.1
zodern:types@1.0.11
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<tr>
<th>{{t "globals.name"}}</th>
<th>{{t "globals.description"}}</th>
<th>{{t "details.state"}}</th>
<th>{{t "globals.status"}}</th>
<th>{{t "tracktime.actions"}}</th>
</tr>
</thead>
Expand Down
15 changes: 10 additions & 5 deletions imports/ui/pages/track/components/weektable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import dayjs from 'dayjs'
import utc from 'dayjs/plugin/utc'
import isoWeek from 'dayjs/plugin/isoWeek'
import customParseFormat from 'dayjs/plugin/customParseFormat'
import { FlowRouter } from 'meteor/ostrio:flow-router-extra'
import { t } from '../../../../utils/i18n.js'
Expand All @@ -20,18 +21,19 @@ function isHoliday(date) {
Template.weektable.onCreated(function weekTableCreated() {
dayjs.extend(utc)
dayjs.extend(customParseFormat)
dayjs.extend(isoWeek)
this.subscribe('myprojects', {})

this.holidays = new ReactiveVar([])
getHolidays().then((holidays) => {
this.holidays.set(holidays)
})
this.startDate = new ReactiveVar(dayjs.utc().startOf('week').add(getUserSetting('startOfWeek'), 'day'))
this.endDate = new ReactiveVar(dayjs.utc().endOf('week').add(getUserSetting('startOfWeek'), 'day'))
this.startDate = new ReactiveVar(dayjs.utc().isoWeekday(getUserSetting('startOfWeek')))
this.endDate = new ReactiveVar(dayjs.utc().isoWeekday(getUserSetting('startOfWeek')).add(6, 'day'))
this.autorun(() => {
if (FlowRouter.getQueryParam('date')) {
this.startDate.set(dayjs.utc(FlowRouter.getQueryParam('date')).startOf('week').add(getUserSetting('startOfWeek'), 'day'), 'YYYY-MM-DD')
this.endDate.set(dayjs.utc(FlowRouter.getQueryParam('date')).endOf('week').add(getUserSetting('startOfWeek'), 'day'), 'YYYY-MM-DD')
this.startDate.set(dayjs.utc(FlowRouter.getQueryParam('date')).isoWeekday(getUserSetting('startOfWeek')), 'YYYY-MM-DD')
this.endDate.set(dayjs.utc(FlowRouter.getQueryParam('date')).isoWeekday(getUserSetting('startOfWeek')).add(6, 'day'), 'YYYY-MM-DD')
}
})
})
Expand Down Expand Up @@ -127,7 +129,9 @@ Template.weektable.events({
hours /= 60
}
const projectId = $(element).data('project-id')
const date = dayjs.utc(startDate.add(Number(templateInstance.$(element).data('week-day')) + 1, 'day').format('YYYY-MM-DD')).toDate()
console.log(startDate)
const date = dayjs.utc(startDate.add(Number(templateInstance.$(element).data('week-day')), 'day').format('YYYY-MM-DD')).toDate()
console.log(date)
const existingElement = weekArray
.findIndex((arrayElement) => arrayElement.projectId === projectId
&& arrayElement.task === task && dayjs(arrayElement.date).isSame(dayjs(date)))
Expand All @@ -144,6 +148,7 @@ Template.weektable.events({
}
})
if (weekArray.length > 0 && !inputError) {
console.log(weekArray)
Meteor.call('upsertWeek', weekArray, (error) => {
if (error) {
console.error(error)
Expand Down
3 changes: 2 additions & 1 deletion imports/ui/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"ok": "Ok",
"definition": "Definition",
"user": "Benutzer",
"global_setting": "Globale Einstellung"
"global_setting": "Globale Einstellung",
"status": "Status"
},
"navigation": {
"track": "Zeit erfassen",
Expand Down
3 changes: 2 additions & 1 deletion imports/ui/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"ok": "Ok",
"definition": "Definition",
"user": "User",
"global_setting": "Global setting"
"global_setting": "Global setting",
"status": "Status"
},
"navigation": {
"track": "Track time",
Expand Down
5 changes: 3 additions & 2 deletions imports/ui/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
"time_entry": "Entrée de temps",
"class": "Classe",
"type": "Type",
"yes": "Oui",
"yes": "Oui",
"no": "Non",
"cancel": "Annuler",
"ok": "Ok",
"definition": "Definition",
"user": "Utilisateur",
"global_setting": "Réglage général"
"global_setting": "Réglage général",
"status": "Statut"
},
"navigation": {
"track": "Suivi",
Expand Down
3 changes: 2 additions & 1 deletion imports/ui/translations/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"ok": "Ок",
"definition": "Определение",
"user": "Пользователь",
"global_setting": "Глобальная настройка"
"global_setting": "Глобальная настройка",
"status": "Статус"
},
"navigation": {
"track": "Учитывать время",
Expand Down
3 changes: 2 additions & 1 deletion imports/ui/translations/ukr.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"ok": "Ок",
"definition": "Визначення",
"user": "Користувач",
"global_setting": "Глобальні налаштування"
"global_setting": "Глобальні налаштування",
"status": "Статус"
},
"navigation": {
"track": "Облікувати час",
Expand Down
3 changes: 2 additions & 1 deletion imports/ui/translations/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"no": "",
"cancel": "取消",
"ok": "确定",
"definition": "定义"
"definition": "定义",
"status": "状态"
},
"navigation": {
"track": "记录",
Expand Down
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "titra",
"version": "0.96.4",
"version": "0.96.5",
"private": true,
"scripts": {
"start": "meteor run"
Expand All @@ -19,20 +19,20 @@
"bootstrap": "^5.3.2",
"cl-editor": "^2.3.0",
"content-type": "^1.0.5",
"date-holidays": "^3.23.7",
"date-holidays": "^3.23.8",
"dayjs": "^1.11.10",
"dayjs-precise-range": "^1.0.1",
"docker-names": "^1.2.1",
"file-saver": "^2.0.5",
"frappe-charts": "1.6.2",
"frappe-datatable": "^1.17.14",
"frappe-gantt": "^0.6.1",
"hotkeys-js": "^3.13.5",
"hotkeys-js": "^3.13.7",
"is-dark": "^1.0.4",
"jquery": "3.7.1",
"jquery-serializejson": "^3.2.1",
"ldapjs": "2.3.3",
"math-expression-evaluator": "^2.0.4",
"math-expression-evaluator": "^2.0.5",
"meteor-node-stubs": "^1.2.7",
"namedavatar": "^1.2.0",
"node-emoji": "^2.1.3",
Expand Down

0 comments on commit 59eb6c3

Please sign in to comment.