Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use global helper instead of custom helper function
  • Loading branch information
faburem committed Aug 21, 2025
commit 683fd4c2495021676814623fd9e633cf19c174ae
10 changes: 5 additions & 5 deletions imports/ui/pages/overview/editproject/components/taskModal.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ <h5 class="modal-title">
<input type="date" id="end" name="end" class="form-control" value="{{end}}"/>
<label class="form-label" for="end">{{t "task.endDate"}}</label>
</div>
{{#if isTaskPlanningEnabled}}
<div class="mb-3 form-floating">
<input type="number" id="estimatedHours" name="estimatedHours" class="form-control" value="{{estimatedHours}}" step="0.25" min="0"/>
<label class="form-label" for="estimatedHours">{{t "task.estimatedHours"}}</label>
</div>
{{#if getGlobalSetting "enableTaskPlanning"}}
<div class="mb-3 form-floating">
<input type="number" id="estimatedHours" name="estimatedHours" class="form-control" value="{{estimatedHours}}" step="0.25" min="0"/>
<label class="form-label" for="estimatedHours">{{t "task.estimatedHours"}}</label>
</div>
{{/if}}
<div class="mb-3 form-floating">
<select id="dependencies" name="dependencies" class="form-select">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { t } from '../../../../../utils/i18n.js'
import './taskModal.html'
import Tasks from '../../../../../api/tasks/tasks'
import CustomFields from '../../../../../api/customfields/customfields.js'
import { showToast, getGlobalSetting } from '../../../../../utils/frontend_helpers.js'
import { showToast } from '../../../../../utils/frontend_helpers.js'
import BsDialogs from '../../../../shared components/bootstrapDialogs'

Template.taskModal.onCreated(function taskModalCreated() {
Expand Down Expand Up @@ -95,7 +95,6 @@ Template.taskModal.helpers({
: new Date().toJSON().slice(0, 10)),
end: () => (Template.instance().editTask.get() ? Template.instance().editTask.get().end?.toJSON().slice(0, 10) : ''),
estimatedHours: () => (Template.instance().editTask.get() ? Template.instance().editTask.get().estimatedHours || '' : ''),
isTaskPlanningEnabled: () => getGlobalSetting('enableTaskPlanning'),
possibleDependencies: () => Tasks.find({ projectId: FlowRouter.getParam('id'), _id: { $ne: Template.instance().editTask.get()?._id } }),
isSelectedDep: (dependency) => (Template.instance().editTask.get()?.dependencies?.includes(dependency) ? 'selected' : ''),
replaceSpecialChars: (string) => string.replace(/[^A-Z0-9]/ig, '_'),
Expand Down
Loading