Skip to content

Commit

Permalink
Bug fixes and enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
mfakih294 committed Dec 3, 2020
1 parent 6936140 commit e1430af
Show file tree
Hide file tree
Showing 13 changed files with 923 additions and 820 deletions.
6 changes: 5 additions & 1 deletion grails-app/controllers/UrlMappings.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ class UrlMappings {
"/m" (controller: 'page', action: 'mobile')
"/media" (controller: 'page', action: 'mobile')


"/cal" (controller: 'page', action: 'appCalendar')

"/kanban" (controller: 'page', action: 'appKanban')
"/daftar" (controller: 'page', action: 'appDaftar')

"/dash" (controller: 'page', action: 'appDashboard')
"/d" (controller: 'page', action: 'appDashboard')

"/light" (controller: 'page', action: 'appLight')
"/q" (controller: 'page', action: 'appLight')
"/l" (controller: 'page', action: 'appLight')

"/slides"(controller: 'page', action: 'slides')
Expand Down
8 changes: 7 additions & 1 deletion grails-app/controllers/app/IndexCardController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,13 @@ class IndexCardController { // entity id = 16
// n.status = WorkStatus.findByCode('pending')
n.save()
}
render(template: "/gTemplates/recordSummary", model: [record: n])

if (params['courseNgs'] && params['courseNgs'] != 'null') {
n.course = mcs.Course.get(params['courseNgs'].toLong())
n.department = n.course.department
n.save()
}
render(template: "/gTemplates/recordSummary", model: [record: n])
// render('<i style="font-size: tiny">' + params.description + '</i>')
// } else {
// render 'No description entered'
Expand Down
26 changes: 13 additions & 13 deletions grails-app/controllers/ker/ExportController.groovy
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ class ExportController {
[Date.parse('yyyy-MM-dd', params.start) - 20, Date.parse('yyyy-MM-dd', params.end) + 20]).each() {

def title = '' + it.type?.code + ' ' +
(it.task ? 'T-' + StringUtils.abbreviate(it.task?.summary, 60) + ' ' : '') +
(it.goal ? 'G-' + StringUtils.abbreviate(it.goal?.summary, 80) + ' ' : '') + //it.goal?.code + ' '
(it.task ? 'T-' + StringUtils.abbreviate(it.task?.summary, 60) + ' / ' : '') +
(it.goal ? 'G-' + StringUtils.abbreviate(it.goal?.summary, 80) + ' / ' : '') + //it.goal?.code + ' '
(it.course ? '(' + it.course?.code + ') ' : '') +
(it.summary ? it.summary + ' ' : '')
// (it.description ? StringUtils.abbreviate(it.description, 40) : ' ')
Expand All @@ -152,7 +152,7 @@ class ExportController {
textColor : it.type?.style ?: '#515150',

url : request.contextPath + '/page/record/' + it.id + '?entityCode=' + savedSearch.entity,
allDay : (it.level != 'm' || it.startDate.hours < 6 ? true : false)])
allDay : (it.level != 'm' || it.startDate.hours < 5 ? true : false)])
}

}
Expand Down Expand Up @@ -244,9 +244,9 @@ class ExportController {
//[new Date(Long.parseLong(params.start) * 1000), new Date(Long.parseLong(params.end) * 1000)]).each() {
[start: Date.parse('yyyy-MM-dd', params.start) - 20, end: Date.parse('yyyy-MM-dd', params.end) + 20]).each() {

def title = '' + (it.type?.code ? '#' + it.type?.code : '') + '' +
(it.task ? 'T-' + StringUtils.abbreviate(it.task?.summary, 60) + ' ' : '') +
(it.goal ? 'G-' + StringUtils.abbreviate(it.goal?.summary, 80) + ' ' : '') + //it.goal?.code + ' '
def title = '' + (it.type?.code ? '#' + it.type?.code + ' ' : '') + '' +
(it.task ? 'T-' + StringUtils.abbreviate(it.task?.summary, 60) + ' / ' : '') +
(it.goal ? 'G-' + StringUtils.abbreviate(it.goal?.summary, 80) + ' / ' : '') + //it.goal?.code + ' '
(it.course ? '(' + it.course?.code + ') ' : '') +
(it.summary ? it.summary + ' ' : '')
// (it.description ? StringUtils.abbreviate(it.description, 40) : ' ')
Expand All @@ -261,15 +261,15 @@ class ExportController {
textColor : 'white',//it.type?.style ?: '#515150',

url : request.contextPath + '/page/record/' + it.id + '?entityCode=J',
allDay : (it.level != 'm' || it.startDate.hours > 50 ? true : false)])
allDay : (it.level != 'm' || it.startDate.hours < 5 ? true : false)])
}
Task.executeQuery("from Planner t where t.startDate between :start and :end",
//[new Date(Long.parseLong(params.start) * 1000), new Date(Long.parseLong(params.end) * 1000)]).each() {
[start: Date.parse('yyyy-MM-dd', params.start) - 20, end: Date.parse('yyyy-MM-dd', params.end) + 20]).each() {

def title = '' + (it.type?.code ? '#' + it.type?.code : '') + ' ' +
(it.task ? 'T-' + StringUtils.abbreviate(it.task?.summary, 60) + ' ' : '') +
(it.goal ? 'G-' + StringUtils.abbreviate(it.goal?.summary, 80) + ' ' : '') + //it.goal?.code + ' '
(it.task ? 'T-' + StringUtils.abbreviate(it.task?.summary, 60) + ' / ' : '') +
(it.goal ? 'G-' + StringUtils.abbreviate(it.goal?.summary, 80) + ' / ' : '') + //it.goal?.code + ' '
(it.course ? '(' + it.course?.code + ') ' : '') +
(it.summary ? it.summary + ' ' : '')
// (it.description ? StringUtils.abbreviate(it.description, 40) : ' ')
Expand All @@ -284,7 +284,7 @@ class ExportController {
textColor : 'white',//it.type?.style ?: '#515150',

url : request.contextPath + '/page/record/' + it.id + '?entityCode=P',
allDay : (it.level != 'm' || it.startDate.hours < 6 ? true : false)])
allDay : (it.level != 'm' || it.startDate.hours < 5 ? true : false)])
}

Task.executeQuery("from Task t where t.endDate between :start and :end",
Expand All @@ -305,7 +305,7 @@ class ExportController {
borderColor : 'MediumSeaGreen',
textColor : 'white',//it.type?.style ?: '#515150',
url : request.contextPath + '/page/record/' + it.id + '?entityCode=T',
allDay : true ])
allDay : false ])
}


Expand All @@ -328,7 +328,7 @@ class ExportController {
textColor : 'white',//it.type?.style ?: '#515150',

url : request.contextPath + '/page/record/' + it.id + '?entityCode=T',
allDay : true ])
allDay : false ])
}


Expand All @@ -351,7 +351,7 @@ class ExportController {
borderColor : 'DarkKhaki',
textColor : 'white',//it.type?.style ?: '#515150',
url : request.contextPath + '/page/record/' + it.id + '?entityCode=R',
allDay : true ])
allDay : false ])
}
/*
def cc = 1000
Expand Down
12 changes: 11 additions & 1 deletion grails-app/controllers/ker/OperationController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -1766,11 +1766,14 @@ past.each(){

def j

if (params.type == 'J')
if (params.type == 'J') {
session['lastCalendarEntryType'] = 'J'
j = new mcs.Journal([startDate : Date.parse('dd.MM.yyyy HH:mm', params.start),
endDate : Date.parse('dd.MM.yyyy HH:mm', params.end),
description: params.description ?: '...'])
}
else if (params.type == 'P') {//(params.title.startsWith('p ') || params.title.startsWith('م ')) {
session['lastCalendarEntryType'] = 'P'
j = new mcs.Planner([startDate : Date.parse('dd.MM.yyyy HH:mm', params.start),
endDate : Date.parse('dd.MM.yyyy HH:mm', params.end),
description: params.description ?: '...'])
Expand All @@ -1779,6 +1782,13 @@ past.each(){
// j.level = 'd'
// else
j.level = 'm'
j.bookmarked = true

if (params.task && params.task != 'null')
j.task = Task.get(params.task.toLong())

if (params.goal && params.goal != 'null')
j.goal = Goal.get(params.goal.toLong())

if (params.title?.contains('--'))
j.properties = ker.GenericsController.transformMcsNotation(params.title?.replace('--', ' -- '))['properties']
Expand Down
9 changes: 7 additions & 2 deletions grails-app/controllers/ker/PageController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,11 @@ class PageController {
}

def record() {
render(view: '/page/record', model: [record:
grailsApplication.classLoader.loadClass(entityMapping[params.entityCode]).get(params.id)
def record = grailsApplication.classLoader.loadClass(entityMapping[params.entityCode]).get(params.id)
if (record)
render(view: '/page/record', model: [record:record
])
else render 'Record not found.'
}

def panel() {
Expand Down Expand Up @@ -582,6 +584,9 @@ class PageController {
def mobile() {
render(view: '/appMobile/mobile', model: [mobileView: true])
}
def media() {
render(view: '/appMobile/mobile', model: [mobileView: true])
}

def colors() {

Expand Down
Loading

0 comments on commit e1430af

Please sign in to comment.