From 674423e84915b624609f707c7b6be4bfa355e6dd Mon Sep 17 00:00:00 2001 From: ohsudev Date: Fri, 28 Oct 2022 12:35:35 -0700 Subject: [PATCH 01/45] Create a new Necropsy scheduler with its own program properties. --- .../views/NecropsyWeeklyScheduler.html | 97 ++++++++++ .../views/NecropsyWeeklyScheduler.view.xml | 7 + .../views/NecropsyWeeklyScheduler.webart.xml | 3 + .../resources/views/NecropsyWeeklyTest.html | 165 ++++++++++++++++++ .../views/NecropsyWeeklyTest.view.xml | 6 + 5 files changed, 278 insertions(+) create mode 100644 extscheduler/resources/views/NecropsyWeeklyScheduler.html create mode 100644 extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml create mode 100644 extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml create mode 100644 extscheduler/resources/views/NecropsyWeeklyTest.html create mode 100644 extscheduler/resources/views/NecropsyWeeklyTest.view.xml diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html new file mode 100644 index 000000000..b8ebbe7a6 --- /dev/null +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -0,0 +1,97 @@ +
+ +
+

Resources

+
+
+

My Events

+
+
+ + + + \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml new file mode 100644 index 000000000..e60575888 --- /dev/null +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml new file mode 100644 index 000000000..9553e6720 --- /dev/null +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.html b/extscheduler/resources/views/NecropsyWeeklyTest.html new file mode 100644 index 000000000..7d98e834d --- /dev/null +++ b/extscheduler/resources/views/NecropsyWeeklyTest.html @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + Scheduler Week View + + + + + \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml b/extscheduler/resources/views/NecropsyWeeklyTest.view.xml new file mode 100644 index 000000000..09c922b7f --- /dev/null +++ b/extscheduler/resources/views/NecropsyWeeklyTest.view.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 0018a72978de40cb8a197080523bbb2bb0fbd560 Mon Sep 17 00:00:00 2001 From: ohsudev Date: Mon, 31 Oct 2022 13:00:06 -0700 Subject: [PATCH 02/45] Create a new Necropsy scheduler with its own program properties. --- extscheduler/resources/views/NecropsyWeeklyScheduler.html | 2 +- .../resources/views/NecropsyWeeklyScheduler.webart.xml | 3 +++ extscheduler/resources/views/weeklyScheduler.html | 7 ++++--- .../resources/web/extscheduler/App/view/InfoPanel.js | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html index b8ebbe7a6..89c2ec25b 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.html +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -22,7 +22,7 @@

My Events

} - - Scheduler Week View + Necropsy Scheduler Week View \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyLauncher.view.xml b/extscheduler/resources/views/NecropsyLauncher.view.xml new file mode 100644 index 000000000..998f1d4e0 --- /dev/null +++ b/extscheduler/resources/views/NecropsyLauncher.view.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyLauncher.webpart.xml b/extscheduler/resources/views/NecropsyLauncher.webpart.xml new file mode 100644 index 000000000..36e24e876 --- /dev/null +++ b/extscheduler/resources/views/NecropsyLauncher.webpart.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml index 9553e6720..13d89e219 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml @@ -1,3 +1,7 @@ + + + + \ No newline at end of file From 2314b20c5720f83606ded38fccb72c9289975b8c Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 19 Apr 2023 14:13:52 -0700 Subject: [PATCH 06/45] Modified Necropsy Scheduler program --- extscheduler/resources/module.xml | 2 +- .../resources/views/NecropsyLauncher.html | 13 +- .../views/NecropsyWeeklyScheduler.html | 32 +- .../resources/views/NecropsyWeeklyTest.html | 16 +- .../views/NecropsyWeeklyTest.view.xml | 2 +- .../resources/views/schedulertest.html | 1 + .../resources/views/weeklyNecropsyTest.html | 166 ++++++++ .../views/weeklyNecropsyTest.view.xml | 6 + .../resources/views/weeklyScheduler.html | 33 +- extscheduler/resources/views/weeklyTest.html | 5 +- .../resources/views/weeklyTest.view.xml | 2 +- .../web/extscheduler/App/view/EventForm.js | 141 +++++-- .../extscheduler/App/view/EventFormAmended.js | 398 ++++++++++++++++++ .../web/extscheduler/App/view/InfoPanel.js | 20 +- .../extscheduler/App/view/InfoPanelAmended.js | 24 ++ .../App/view/InfoPanelModelAmended.js | 109 +++++ .../extscheduler/App/view/NavigationBar.js | 16 +- .../App/view/NavigationBarAmended.js | 21 + .../web/extscheduler/App/view/Scheduler.js | 44 +- .../extscheduler/App/view/SchedulerAmended.js | 99 +++++ 20 files changed, 999 insertions(+), 151 deletions(-) create mode 100644 extscheduler/resources/views/weeklyNecropsyTest.html create mode 100644 extscheduler/resources/views/weeklyNecropsyTest.view.xml create mode 100644 extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js create mode 100644 extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js create mode 100644 extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js create mode 100644 extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js create mode 100644 extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js diff --git a/extscheduler/resources/module.xml b/extscheduler/resources/module.xml index c67e137ca..ba2e743f0 100644 --- a/extscheduler/resources/module.xml +++ b/extscheduler/resources/module.xml @@ -23,7 +23,7 @@ A comma separated list of column names to display for the EventForm.js file. Column Names(Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate) true true - Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate + Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate,project,location,fasting,deliveryrequest ADMIN diff --git a/extscheduler/resources/views/NecropsyLauncher.html b/extscheduler/resources/views/NecropsyLauncher.html index f235c3cf6..8e09f94e9 100644 --- a/extscheduler/resources/views/NecropsyLauncher.html +++ b/extscheduler/resources/views/NecropsyLauncher.html @@ -12,7 +12,12 @@ border: false }, items: [{ - html: 'This is the Necropsy Scheduler Module. Below are links to the Necropsy Scheduler Program, and related reports.', + html: 'Please see the User Manual for step-by-step instructions.\n' + + '\n' + + 'To change a future event, please delete the incorrect entry and create a new one.\n' + + 'To change a past event, please email Wendy Price with an explanation or you will be billed.\n' + + '\n' + + 'If you have any questions about using Scheduler, please contact onprcitsupport@ohsu.edu. We\'re happy to help via email or meet with you to demonstrate.', style: 'padding-bottom: 10px;' },{ xtype: 'ldk-navpanel', @@ -23,17 +28,19 @@ name: 'View Necropsy Scheduler Calendar', url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { + // url: LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyweeklyTest', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { returnUrl: window.location.pathname + window.location.search }) },{ - name: 'View Scheduler Resource and Events Reports', + + name: 'View Scheduler Present/Future Resource and Events Reports', url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyScheduler', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { // returnUrl: window.location.pathname + window.location.search }) - }] + }] }] diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html index b9e14e3e4..fe37d56e6 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.html +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -37,7 +37,7 @@

My Events

} else { - var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklyTest', null, { + var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { returnUrl: window.location.pathname + window.location.search }); Ext4.get('launch-link').update('Launch Scheduler'); @@ -48,49 +48,27 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Resources', + columns: 'Name,color', sort: 'Name' }); var timeFrameFilter = null; var renderEventsQueryWebPart = function() { - var filters = [LABKEY.Filter.create('Owner', true, LABKEY.user.isAdmin ? LABKEY.Filter.Types.HAS_ANY_VALUE : LABKEY.Filter.Types.EQUALS)]; - if (timeFrameFilter != null) - filters.push(timeFrameFilter); + new LABKEY.QueryWebPart({ renderTo: 'events-qwp', frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - filters: filters, + columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,location', + filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN)], sort: 'StartDate,ResourceId,Name' }); }; - Ext4.create('Ext.form.RadioGroup', { - renderTo: 'events-radiogroup', - width: 250, - columns: 3, - items: [ - {boxLabel: 'All', name: 'timeframe', inputValue: 'All'}, - {boxLabel: 'Previous', name: 'timeframe', inputValue: 'Previous'}, - {boxLabel: 'Upcoming', name: 'timeframe', inputValue: 'Upcoming', checked: true} - ], - listeners: { - change: function(radiogroup, newValue) - { - if (newValue.timeframe == 'Previous') - timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN); - else if (newValue.timeframe == 'Upcoming') - timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL); - else - timeFrameFilter = null; - renderEventsQueryWebPart(); - } - } - }); renderEventsQueryWebPart(); }); diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.html b/extscheduler/resources/views/NecropsyWeeklyTest.html index 20851b15a..b9a22425d 100644 --- a/extscheduler/resources/views/NecropsyWeeklyTest.html +++ b/extscheduler/resources/views/NecropsyWeeklyTest.html @@ -5,21 +5,21 @@ - + - - + + - + - + - + Necropsy Scheduler Week View @@ -43,7 +43,7 @@ 'ResourceCombo', 'Resources', 'Scheduler', - 'Viewport' + 'ViewportAmmended' ] }); }; @@ -80,7 +80,7 @@ LABKEY.Query.selectRows({ schemaName: 'extscheduler', queryName: 'Events', - columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity', + columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,location,project', success: function(data){ // need to convert the date fields from a string to JS Date object diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml b/extscheduler/resources/views/NecropsyWeeklyTest.view.xml index 09c922b7f..5332b2730 100644 --- a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml +++ b/extscheduler/resources/views/NecropsyWeeklyTest.view.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/extscheduler/resources/views/schedulertest.html b/extscheduler/resources/views/schedulertest.html index 04a44fdec..e8bd161bd 100644 --- a/extscheduler/resources/views/schedulertest.html +++ b/extscheduler/resources/views/schedulertest.html @@ -5,6 +5,7 @@ Simple Ext Demo + diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html new file mode 100644 index 000000000..4bda3f14a --- /dev/null +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + Scheduler Week View + + + + + \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyNecropsyTest.view.xml b/extscheduler/resources/views/weeklyNecropsyTest.view.xml new file mode 100644 index 000000000..37e713490 --- /dev/null +++ b/extscheduler/resources/views/weeklyNecropsyTest.view.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyScheduler.html b/extscheduler/resources/views/weeklyScheduler.html index 9a7a2515e..fffd2b662 100644 --- a/extscheduler/resources/views/weeklyScheduler.html +++ b/extscheduler/resources/views/weeklyScheduler.html @@ -4,7 +4,7 @@

Resources


-

My Events

+

My Events

@@ -38,7 +38,6 @@

My Events

else { var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { - // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { returnUrl: window.location.pathname + window.location.search }); Ext4.get('launch-link').update('Launch Scheduler'); @@ -49,49 +48,27 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Resources', + columns: 'Name,color', sort: 'Name' }); var timeFrameFilter = null; var renderEventsQueryWebPart = function() { - var filters = [LABKEY.Filter.create('Owner', true, LABKEY.user.isAdmin ? LABKEY.Filter.Types.HAS_ANY_VALUE : LABKEY.Filter.Types.EQUALS)]; - if (timeFrameFilter != null) - filters.push(timeFrameFilter); + new LABKEY.QueryWebPart({ renderTo: 'events-qwp', frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - filters: filters, + columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,location', + filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], sort: 'StartDate,ResourceId,Name' }); }; - Ext4.create('Ext.form.RadioGroup', { - renderTo: 'events-radiogroup', - width: 250, - columns: 3, - items: [ - {boxLabel: 'All', name: 'timeframe', inputValue: 'All'}, - {boxLabel: 'Previous', name: 'timeframe', inputValue: 'Previous'}, - {boxLabel: 'Upcoming', name: 'timeframe', inputValue: 'Upcoming XT', checked: true} - ], - listeners: { - change: function(radiogroup, newValue) - { - if (newValue.timeframe == 'Previous') - timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN); - else if (newValue.timeframe == 'Upcoming') - timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL); - else - timeFrameFilter = null; - renderEventsQueryWebPart(); - } - } - }); renderEventsQueryWebPart(); }); diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index 7d98e834d..35a6ea667 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -9,7 +9,8 @@ - + + @@ -80,7 +81,7 @@ LABKEY.Query.selectRows({ schemaName: 'extscheduler', queryName: 'Events', - columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity', + columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,project,location', success: function(data){ // need to convert the date fields from a string to JS Date object diff --git a/extscheduler/resources/views/weeklyTest.view.xml b/extscheduler/resources/views/weeklyTest.view.xml index 340ce7333..ea8538224 100644 --- a/extscheduler/resources/views/weeklyTest.view.xml +++ b/extscheduler/resources/views/weeklyTest.view.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/EventForm.js b/extscheduler/resources/web/extscheduler/App/view/EventForm.js index 56e0ac4dd..0182430bb 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventForm.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventForm.js @@ -47,26 +47,26 @@ Ext.define('App.view.EventForm', { } }, - { - xtype : 'combo', - fieldLabel : 'User', - store : 'users', - queryMode : 'local', - name : 'UserId', - displayField : 'FullName', - valueField : 'UserId', - editable : false, - typeAhead : true, - allowBlank : !this.editable, - hidden : this.eventFormColumns.indexOf('UserId') === -1, - bind : { - value : '{eventRecord.UserId}', - readOnly : !this.editable - } - }, + // { + // xtype : 'combo', + // fieldLabel : 'User', + // store : 'users', + // queryMode : 'local', + // name : 'UserId', + // displayField : 'FullName', + // valueField : 'UserId', + // editable : false, + // typeAhead : true, + // allowBlank : !this.editable, + // hidden : this.eventFormColumns.indexOf('UserId') === -1, + // bind : { + // value : '{eventRecord.UserId}', + // readOnly : !this.editable + // } + // }, { xtype : 'textfield', - fieldLabel : 'Alias', + fieldLabel : 'Animal ID', name : 'Alias', reference : 'eventAliasField', //allowBlank : !this.editable, @@ -77,45 +77,102 @@ Ext.define('App.view.EventForm', { readOnly : !this.editable } }, + // { + // xtype : 'numberfield', + // fieldLabel : 'Quantity', + // name : 'Quantity', + // value : 1, + // minValue: 1, + // allowDecimals : false, + // reference : 'eventQuantityField', + // allowBlank : !this.editable, + // hidden : this.eventFormColumns.indexOf('Quantity') === -1, + // bind : { + // value : '{eventRecord.Quantity}', + // readOnly : !this.editable + // } + // }, { - xtype : 'numberfield', - fieldLabel : 'Quantity', - name : 'Quantity', - value : 1, - minValue: 1, - allowDecimals : false, - reference : 'eventQuantityField', - allowBlank : !this.editable, - hidden : this.eventFormColumns.indexOf('Quantity') === -1, + xtype : 'textfield', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Center Project', + name : 'location', + reference : 'eventProjectField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('project') === -1, + bind : { + value : '{eventRecord.project}', + readOnly : !this.editable + } + }, + { + xtype : 'textfield', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Type of Fasting Requested', + name : 'Fasting', + reference : 'eventFastimgField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('fasting') === -1, + bind : { + value : '{eventRecord.fasting}', + readOnly : !this.editable + } + }, + { + xtype : 'textfield', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Animal Delivery Requested', + name : 'deliveryrequest', + reference : 'eventDeliveryRequestField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('deliveryrequest') === -1, bind : { - value : '{eventRecord.Quantity}', + value : '{eventRecord.deliveryrequestt}', readOnly : !this.editable } }, { - xtype : 'textarea', + xtype : 'textfield', labelAlign: 'top', width: 320, - height: 200, - fieldLabel : 'Comments', - name : 'Comments', - reference : 'eventCommentsField', + height: 20, + fieldLabel : 'Necropsy Location', + name : 'location', + reference : 'eventLocationField', style: 'margin-top: 20px;', allowBlank : true, - hidden : this.eventFormColumns.indexOf('Comments') === -1, + hidden : this.eventFormColumns.indexOf('location') === -1, bind : { - value : '{eventRecord.Comments}', + value : '{eventRecord.location}', readOnly : !this.editable } - /* xtype: 'textarea', + }, + { + xtype: 'textarea', labelAlign: 'top', - width: 500, - height: 200, - fieldLabel: 'Question/Comment', - name: 'comment', + width: 320, + height: 50, + fieldLabel: 'Comments', + name: 'Comments', + reference: 'eventCommentsField', style: 'margin-top: 20px;', - allowBlank: false - */ }, + allowBlank: true, + hidden: this.eventFormColumns.indexOf('Comments') === -1, + bind: { + value: '{eventRecord.Comments}', + readOnly: !this.editable + } + }, + { xtype : 'fieldcontainer', layout : 'hbox', diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js new file mode 100644 index 000000000..2868d433a --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -0,0 +1,398 @@ +Ext.define('App.view.EventForm', { + extend : 'Ext.form.Panel', + alias : 'widget.eventform', + reference : 'eventform', + cls : 'eventform', + width : 340, + bodyPadding : 15, + defaults : { + anchor : '100%', + labelWidth : 80 + }, + + editable : false, + scheduler : null, + + eventPeriodLength: 30, + + initComponent: function() + { + var context = LABKEY.getModuleContext('extscheduler'); + this.eventPeriodLength = parseInt(context['ExtSchedulerEventPeriodLength']); + this.eventFormColumns = context['ExtSchedulerEventFormColumns'].split(','); + + this.items = [ + //{ + // xtype : 'textfield', + // fieldLabel : 'Name', + // name : 'Name', + // reference : 'eventNameField', + // allowBlank : !this.editable, + // hidden : this.eventFormColumns.indexOf('Name') === -1, + // bind : { + // value : '{eventRecord.Name}', + // readOnly : !this.editable + // } + //}, + { + xtype : 'resourcecombo', + fieldLabel : 'Resource', + name : 'ResourceId', + reference : 'eventResourceField', + allowBlank : !this.editable, + hidden : this.eventFormColumns.indexOf('ResourceId') === -1, + bind : { + value : '{eventRecord.ResourceId}', + readOnly : !this.editable + + } + }, + // { + // xtype : 'combo', + // fieldLabel : 'User', + // store : 'users', + // queryMode : 'local', + // name : 'UserId', + // displayField : 'FullName', + // valueField : 'UserId', + // editable : false, + // typeAhead : true, + // allowBlank : !this.editable, + // hidden : this.eventFormColumns.indexOf('UserId') === -1, + // bind : { + // value : '{eventRecord.UserId}', + // readOnly : !this.editable + // } + // }, + { + xtype : 'textfield', + fieldLabel : 'Animal ID', + name : 'Alias', + reference : 'eventAliasField', + //allowBlank : !this.editable, + allowBlank: true, + hidden : this.eventFormColumns.indexOf('Alias') === -1, + bind : { + value : '{eventRecord.Alias}', + readOnly : !this.editable + } + }, + // { + // xtype : 'numberfield', + // fieldLabel : 'Quantity', + // name : 'Quantity', + // value : 1, + // minValue: 1, + // allowDecimals : false, + // reference : 'eventQuantityField', + // allowBlank : !this.editable, + // hidden : this.eventFormColumns.indexOf('Quantity') === -1, + // bind : { + // value : '{eventRecord.Quantity}', + // readOnly : !this.editable + // } + // }, + { + xtype : 'textfield', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Center Project', + name : 'location', + reference : 'eventProjectField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('project') === -1, + bind : { + value : '{eventRecord.project}', + readOnly : !this.editable + } + }, + { + xtype : 'textfield', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Type of Fasting Requested', + name : 'Fasting', + reference : 'eventFastimgField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('fasting') === -1, + bind : { + value : '{eventRecord.fasting}', + readOnly : !this.editable + } + }, + { + xtype : 'textfield', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Animal Delivery Requested', + name : 'deliveryrequest', + reference : 'eventDeliveryRequestField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('deliveryrequest') === -1, + bind : { + value : '{eventRecord.deliveryrequestt}', + readOnly : !this.editable + } + }, + { + xtype : 'textfield', + labelAlign: 'top', + width: 320, + height: 20, + fieldLabel : 'Necropsy Location', + name : 'location', + reference : 'eventLocationField', + style: 'margin-top: 20px;', + allowBlank : true, + hidden : this.eventFormColumns.indexOf('location') === -1, + bind : { + value : '{eventRecord.location}', + readOnly : !this.editable + } + }, + { + xtype: 'textarea', + labelAlign: 'top', + width: 320, + height: 50, + fieldLabel: 'Comments', + name: 'Comments', + reference: 'eventCommentsField', + style: 'margin-top: 20px;', + allowBlank: true, + hidden: this.eventFormColumns.indexOf('Comments') === -1, + bind: { + value: '{eventRecord.Comments}', + readOnly: !this.editable + } + }, + + { + xtype : 'fieldcontainer', + layout : 'hbox', + hidden : this.eventFormColumns.indexOf('StartDate') === -1, + items : [ + this.getStartDateField(), + this.getStartTimeField() + ] + }, + { + xtype : 'fieldcontainer', + layout : 'hbox', + hidden : this.eventFormColumns.indexOf('EndDate') === -1, + items : [ + this.getEndDateField(), + this.getEndTimeField() + ] + }, + + ]; + + if (this.editable) + { + this.buttons = [ + { + text: 'Cancel', + scope: this, + handler: function() + { + this.up('window').close(); + } + }, + { + text: 'Create', + formBind: true, + scope: this, + handler: function() + { + var values = this.getValues(); + + // concat the start/end date and times + values.StartDate = values.StartDate + ' ' + values.StartTime; + values.EndDate = values.EndDate + ' ' + values.EndTime; + + var userRecord = Ext.getStore('users').findRecord('UserId', values.UserId); + values.UserID = userRecord.get('UserId'); + + if (values.Name == null || values.Name == '') + { + if (userRecord.get('LastName') != null && userRecord.get('LastName') != '') + values.Name = userRecord.get('FirstName') + ' ' + userRecord.get('LastName'); //updated 9/2/2016 per user request + else + values.Name = userRecord.get('DisplayName') + } + + LABKEY.Query.insertRows({ + schemaName: 'extscheduler', + queryName: 'events', + rows: [values], + scope: this, + success: function(response) + { + window.location.reload(); + }, + failure: function(response) + { + Ext.Msg.alert('Error', response.exception); + } + }); + + } + } + ]; + } + + this.callParent(); + }, + + getStartDateField : function() + { + if (!this.startDateField) + { + this.startDateField = Ext.create('Ext.form.field.Date', { + fieldLabel : 'Starts', + labelWidth : 80, + flex : 1, + name : 'StartDate', + format : 'Y-m-d', + allowBlank : !this.editable, + bind : { + value : '{StartDate}', + readOnly : !this.editable + } + }); + + this.startDateField.on('change', function(datefield, newValue){ + this.getEndDateField().setMinValue(newValue); + if (this.getEndDateField().getValue() < newValue) + this.getEndDateField().setValue(newValue); + this.getEndDateField().clearInvalid(); + + if (this.getStartTimeField().getValue() == null) + this.getStartTimeField().setValue('8:00'); + + this.ensureEndTimeAfterStart(); + + this.getStartTimeField().enable(); + this.getEndDateField().enable(); + this.getEndTimeField().enable(); + }, this); + } + + return this.startDateField; + }, + + getStartTimeField : function() + { + if (!this.startTimeField) + { + this.startTimeField = Ext.create('Ext.form.field.Time', { + margin : '0 0 0 10', + width : 90, + name : 'StartTime', + format : 'H:i', + increment : this.eventPeriodLength, + allowBlank : !this.editable, + bind : { + minValue : '{defaultMinTime}', + maxValue : '{defaultMaxTime}', + value : '{StartTime}', + readOnly : !this.editable, + disabled : this.editable + } + }); + + this.startTimeField.on('change', function(timefield, newValue){ + if (this.getEndTimeField().getValue() == null) + this.getEndTimeField().setValue(new Date(newValue.getTime() + (this.eventPeriodLength*60*1000))); + + this.ensureEndTimeAfterStart(); + }, this); + } + + return this.startTimeField; + }, + + getEndDateField : function() + { + if (!this.endDateField) + { + this.endDateField = Ext.create('Ext.form.field.Date', { + fieldLabel : 'Ends', + labelWidth : 80, + flex : 1, + name : 'EndDate', + format : 'Y-m-d', + allowBlank : !this.editable, + bind : { + minValue : '{minEndDate}', + value : '{EndDate}', + readOnly : !this.editable, + disabled : this.editable + } + }); + + this.endDateField.on('change', function(dateField, newValue){ + this.ensureEndTimeAfterStart(); + }, this); + } + + return this.endDateField; + }, + + getEndTimeField : function() + { + if (!this.endTimeField) + { + this.endTimeField = Ext.create('Ext.form.field.Time', { + margin : '0 0 0 10', + name : 'EndTime', + width : 90, + format : 'H:i', + increment : this.eventPeriodLength, + allowBlank : !this.editable, + bind : { + minValue : '{minEndTime}', + maxValue : '{defaultMaxTime}', + value : '{EndTime}', + readOnly : !this.editable, + disabled : this.editable + } + }); + + this.endTimeField.on('change', function(timefield, newValue){ + this.ensureEndTimeAfterStart(); + }, this); + } + + return this.endTimeField; + }, + + ensureEndTimeAfterStart : function() + { + var startDate = this.getStartDateField().getValue(), + startTime = this.getStartTimeField().getValue(), + endDate = this.getEndDateField().getValue(), + endTime = this.getEndTimeField().getValue(), + allNonNull = startDate != null && startTime != null && endDate != null && endTime != null; + + if (allNonNull && startDate.getTime() == endDate.getTime()) + { + var d = new Date(startTime.getTime() + (this.eventPeriodLength*60*1000)); + this.getEndTimeField().setMinValue(d); + + if (startTime.getTime() >= endTime.getTime()) + this.getEndTimeField().setValue(d); + } + else + { + this.getEndTimeField().setMinValue('0:00'); + } + } +}); diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js index 49153d1f9..4da8356f5 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js @@ -18,16 +18,16 @@ Ext.define('App.view.InfoPanel', { xtype : 'eventform', title : 'Event details', editable : false - }, - { - xtype : 'panel', - title : 'Resources XX', - cls : 'resources', - bodyPadding : '0 15', - flex : 1, - layout : 'fit', - margin : '10 0 0 0', - items : [{ xtype : 'resources' }] } + // { + // xtype : 'panel', + // title : 'Resources', + // cls : 'resources', + // bodyPadding : '0 15', + // flex : 1, + // layout : 'fit', + // margin : '10 0 0 0', + // items : [{ xtype : 'resources' }] + // } ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js new file mode 100644 index 000000000..55d41af4e --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -0,0 +1,24 @@ + +Ext.define('App.view.InfoPanel', { + extend : 'Ext.Container', + alias : 'widget.infopanelAmended', + requires : [ + 'App.view.InfoPanelModelAmended' + ], + viewModel : 'infopanelAmended', + reference : 'infopanelAmended', + cls : 'infopanelAmended', + width : 540, + layout : { + type : 'vbox', + align : 'stretch' + }, + items : [ + { + xtype : 'eventform', + title : 'Necropsy Calendar Schedule', + editable : false + } + + ] +}); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js new file mode 100644 index 000000000..47939e5c8 --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js @@ -0,0 +1,109 @@ +Ext.define('App.view.InfoPanelModelAmended', { + extend : 'Ext.app.ViewModel', + alias : 'viewmodel.infopanelAmended', + data : { + //eventRecord should be defined here because otherwise we can't bind {!eventRecord} + eventRecord : null, + defaultMinTime : null, + defaultMaxTime : null, + startDateValue : null + }, + formulas : { + StartDate : { + bind : '{eventRecord.StartDate}', + get : function (date) { + // this notify needs to be sure minValue will be bound before value + this.set('startDateValue', date); + this.notify(); + + return date; + }, + set : function (date) { + var eventRecord = this.get('eventRecord'); + if (!eventRecord || !date) return; + + var time = eventRecord.getStartDate(); + // use time from original record + Sch.util.Date.copyTimeValues(date, time); + + // this notify needs to be sure minValue will be bound before value + this.set('startDateValue', date); + this.notify(); + + // true to keep duration + eventRecord.setStartDate(date, true); + } + }, + + StartTime : { + bind : '{eventRecord.StartDate}', + get : function (time) { + return time; + }, + set : function (time) { + var eventRecord = this.get('eventRecord'); + if (!eventRecord || !time) return; + + var date = Ext.Date.clone(eventRecord.getStartDate()); + // use date from original record + Sch.util.Date.copyTimeValues(date, time); + // true to keep duration + eventRecord.setStartDate(date, true); + } + }, + + EndDate : { + bind : '{eventRecord.EndDate}', + get : function (date) { + return date; + }, + set : function (date) { + var eventRecord = this.get('eventRecord'); + if (!eventRecord || !date) return; + + var time = eventRecord.getEndDate(); + // use time from original record + Sch.util.Date.copyTimeValues(date, time); + eventRecord.setEndDate(date); + } + }, + + EndTime : { + bind : '{eventRecord.EndDate}', + get : function (time) { + return time; + }, + set : function (time) { + var eventRecord = this.get('eventRecord'); + if (!eventRecord || !time) return; + + var date = Ext.Date.clone(eventRecord.getEndDate()); + // use date from original record + Sch.util.Date.copyTimeValues(date, time); + eventRecord.setEndDate(date); + } + }, + + minEndDate : function (get) { + var date = get('startDateValue'); + // true to clone the date before time clearing + return date ? Ext.Date.clearTime(date, true) : null; + }, + + minEndTime : function (get) { + var startDate = get('StartDate'), + endDate = get('EndDate'); + + if (startDate && endDate) { + var cleanStartDate = Ext.Date.clearTime(startDate, true), + cleanEndDate = Ext.Date.clearTime(endDate, true); + + if (Ext.Date.isEqual(cleanStartDate, cleanEndDate)) { + return Ext.Date.clone(startDate); + } + } + + return get('defaultMinTime'); + } + } +}); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js index 4e1fd6081..cbfe1cbea 100644 --- a/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js @@ -8,14 +8,14 @@ Ext.define('App.view.NavigationBar', { title : '', items : [ { - xtype : 'button', - text : 'Return to ' + window.location.host, - handler : function() { - if (LABKEY.ActionURL.getParameter('returnUrl')) - window.location = LABKEY.ActionURL.getParameter('returnUrl'); - else - window.location = LABKEY.ActionURL.buildURL('project', 'begin'); - } + // xtype : 'button', + // text : 'Return to ' + window.location.host, + // handler : function() { + // if (LABKEY.ActionURL.getParameter('returnUrl')) + // window.location = LABKEY.ActionURL.getParameter('returnUrl'); + // else + // window.location = LABKEY.ActionURL.buildURL('project', 'begin'); + // } } ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js new file mode 100644 index 000000000..cbfe1cbea --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js @@ -0,0 +1,21 @@ +Ext.define('App.view.NavigationBar', { + extend : 'Ext.panel.Header', + alias : 'widget.navigationbar', + cls : 'navigationbar', + padding : '0 10 0 5', + height : 40, + border : false, + title : '', + items : [ + { + // xtype : 'button', + // text : 'Return to ' + window.location.host, + // handler : function() { + // if (LABKEY.ActionURL.getParameter('returnUrl')) + // window.location = LABKEY.ActionURL.getParameter('returnUrl'); + // else + // window.location = LABKEY.ActionURL.buildURL('project', 'begin'); + // } + } + ] +}); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/Scheduler.js b/extscheduler/resources/web/extscheduler/App/view/Scheduler.js index 3cf7c3587..2f6f53cdf 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Scheduler.js +++ b/extscheduler/resources/web/extscheduler/App/view/Scheduler.js @@ -15,7 +15,7 @@ Ext.define('App.view.Scheduler', { calendarViewPreset : 'week', mode : 'calendar', eventResizeHandles : 'none', - eventBodyTemplate :'{Name:htmlEncode}
{ResourceName:htmlEncode}
{UserDisplayName:htmlEncode}', + eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{Location:htmlEncode}', snapToIncrement : true, allowOverlap : true, highlightCurrentTime : true, @@ -61,30 +61,34 @@ Ext.define('App.view.Scheduler', { }) }, '->', { - text : 'Create New Event', - iconCls: 'x-fa fa-plus-circle', - hidden: !LABKEY.user.canInsert, - scope: this, - handler: function (btn) { - var scheduler = btn.up('scheduler'); - - Ext.create('Ext.window.Window', { - title : 'Create New Event', - autoShow : true, - modal : true, - items : [{ - xtype: 'eventform', - editable : true, - scheduler : scheduler - }] - }); - } + // text : 'Create New Event', + // iconCls: 'x-fa fa-plus-circle', + // hidden: !LABKEY.user.canInsert, + // scope: this, + // handler: function (btn) { + // var scheduler = btn.up('scheduler'); + // + // Ext.create('Ext.window.Window', { + // title : 'Create New Event', + // autoShow : true, + // modal : true, + // items : [{ + // xtype: 'eventform', + // editable : true, + // scheduler : scheduler + // }] + // }); + // } } ], eventRenderer : function (event, resource, data) { - data.style = 'border-color:' + resource.get('Color'); + + data.style = 'background-color:' + resource.get('Color'); event.data['ResourceName'] = resource.get('Name'); + event.data['Project'] = event.get('project'); + event.data['Location'] = event.get('location'); + event.data['Alias'] = event.get('Alias'); var userRecord = Ext.getStore('users').findRecord('UserId', event.get('UserId')); event.data['UserDisplayName'] = userRecord != null ? userRecord.get('DisplayName') : event.get('UserId'); return event.data; diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js new file mode 100644 index 000000000..448e54e0b --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -0,0 +1,99 @@ +Ext.define('App.view.SchedulerAmended', { + extend : 'Sch.panel.SchedulerGrid', + alias : 'widget.schedulerAmended', + reference : 'schedulerAmended', + startDate : new Date(), + //endDate : new Date(), + startTime : 6, + endTime : 20, + resourceStore : 'resource', + eventStore : 'event', + style : 'border: 1px solid #d0d0d0;', + + readOnly : true, // disables the abilitiy to click in calendar to create event + showTodayLine : true, + calendarViewPreset : 'week', + mode : 'calendar', + eventResizeHandles : 'none', + eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{Location:htmlEncode}', + snapToIncrement : true, + allowOverlap : true, + highlightCurrentTime : true, + calendarTimeAxisCfg : { + height : 30 + }, + + tbar: [ + { + text : 'Previous', + iconCls: 'x-fa fa-arrow-circle-left', + handler: function (btn) { + var scheduler = btn.up('scheduler'); + scheduler.timeAxis.shift(-7, Sch.util.Date.DAY); + } + }, + { + text : 'Today', + handler: function (btn) { + var scheduler = btn.up('scheduler'); + // Clear time here so date adjustment wouldn't result in 2 days span + scheduler.setStart(Sch.util.Date.clearTime(new Date())); + } + }, + { + text : 'Next', + iconCls: 'x-fa fa-arrow-circle-right', + iconAlign: 'right', + handler: function (btn) { + var scheduler = btn.up('scheduler'); + scheduler.timeAxis.shift(7, Sch.util.Date.DAY); + } + }, + '', + { + text : 'Select Date...', + scope : this, + menu : Ext.create('Ext.menu.DatePicker', { + handler : function (dp, date) { + var scheduler = dp.up('scheduler'); + scheduler.setStart(Sch.util.Date.clearTime(date)); + } + }) + }, '->', + { + // text : 'Create New Event', + // iconCls: 'x-fa fa-plus-circle', + // hidden: !LABKEY.user.canInsert, + // scope: this, + // handler: function (btn) { + // var scheduler = btn.up('scheduler'); + // + // Ext.create('Ext.window.Window', { + // title : 'Create New Event', + // autoShow : true, + // modal : true, + // items : [{ + // xtype: 'eventform', + // editable : true, + // scheduler : scheduler + // }] + // }); + // } + } + ], + + eventRenderer : function (event, resource, data) { + data.style = 'background-color:' + resource.get('Color'); + event.data['ResourceName'] = resource.get('Name'); + event.data['Project'] = event.get('project'); + event.data['Location'] = event.get('location'); + event.data['Alias'] = event.get('Alias'); + var userRecord = Ext.getStore('users').findRecord('UserId', event.get('UserId')); + event.data['UserDisplayName'] = userRecord != null ? userRecord.get('DisplayName') : event.get('UserId'); + return event.data; + }, + + onEventCreated : function (newEventRecord) { + this.getEventSelectionModel().select(newEventRecord); + } +}); \ No newline at end of file From 76e8044adacde13edb74e46694f7365bf9dd64a9 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 19 Apr 2023 15:00:14 -0700 Subject: [PATCH 07/45] Modified Necropsy Scheduler program --- .../resources/schemas/extscheduler.xml | 2 ++ .../extscheduler/App/view/EventFormAmended.js | 22 +++++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/extscheduler/resources/schemas/extscheduler.xml b/extscheduler/resources/schemas/extscheduler.xml index e1234afe5..67b1b9e4a 100644 --- a/extscheduler/resources/schemas/extscheduler.xml +++ b/extscheduler/resources/schemas/extscheduler.xml @@ -54,6 +54,8 @@ + + User diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index 2868d433a..c51656343 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -94,9 +94,9 @@ Ext.define('App.view.EventForm', { // }, { xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, + labelAlign: 'top', + // width: 120, + // height: 20, fieldLabel : 'Center Project', name : 'location', reference : 'eventProjectField', @@ -110,9 +110,9 @@ Ext.define('App.view.EventForm', { }, { xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, + labelAlign: 'top', + // width: 120, + // height: 20, fieldLabel : 'Type of Fasting Requested', name : 'Fasting', reference : 'eventFastimgField', @@ -126,10 +126,10 @@ Ext.define('App.view.EventForm', { }, { xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Animal Delivery Requested', + labelAlign: 'top', + // width: 120, + // height: 20, + fieldLabel : 'Animaal Delivery Requested', name : 'deliveryrequest', reference : 'eventDeliveryRequestField', style: 'margin-top: 20px;', @@ -157,7 +157,7 @@ Ext.define('App.view.EventForm', { } }, { - xtype: 'textarea', + xtype: 'textfield', labelAlign: 'top', width: 320, height: 50, From d3b6e2e9bca4bb7690c531f32eb2e48d95e73768 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 21 Apr 2023 11:42:51 -0700 Subject: [PATCH 08/45] Modified Necropsy Scheduler program --- .../queries/extscheduler/events/.qview.xml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 extscheduler/resources/queries/extscheduler/events/.qview.xml diff --git a/extscheduler/resources/queries/extscheduler/events/.qview.xml b/extscheduler/resources/queries/extscheduler/events/.qview.xml new file mode 100644 index 000000000..ba1d7c4cb --- /dev/null +++ b/extscheduler/resources/queries/extscheduler/events/.qview.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file From 01480db095e19632c1dab949ae2b53a2cb7fdec1 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 21 Apr 2023 12:11:29 -0700 Subject: [PATCH 09/45] Modified scheduler program --- .../extscheduler/ExtSchedulerModule.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java index e35ac332f..6c003146d 100644 --- a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java +++ b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java @@ -3,11 +3,19 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.labkey.api.data.ContainerManager; import org.labkey.api.ldk.ExtendedSimpleModule; import org.labkey.api.module.Module; +import org.labkey.api.module.ModuleContext; import org.labkey.api.query.DefaultSchema; +import org.labkey.api.query.DetailsURL; import org.labkey.api.query.QuerySchema; +import org.labkey.api.resource.Resource; +import org.labkey.api.security.permissions.AdminPermission; +import org.labkey.api.settings.AdminConsole; +import org.labkey.api.view.template.ClientDependency; import org.labkey.extscheduler.query.ExtSchedulerQuerySchema; +//import org.labkey.api.ehr.EHRService; import java.util.Collection; import java.util.Collections; @@ -61,4 +69,15 @@ public QuerySchema createSchema(final DefaultSchema schema, Module module) } }); } + + @Override + protected void doStartupAfterSpringConfig(ModuleContext moduleContext) + { + //Added 4-19-2023 R.Blasa +// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/EventFormAmended.js"), this); +// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/ViewportAmended.js"), this); +// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/InfoPanelAmended.js"), this); +// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/SchedulerAmended.js"), this); +// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/ViewportControllerAmended.js"), this); + } } From 0d85711c4657ee9c0922817e6658e138be309692 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Mon, 24 Apr 2023 17:23:27 -0700 Subject: [PATCH 10/45] Modified extscheduler program to include dependency files. --- .../resources/views/weeklyTest.view.xml | 4 +++ .../extscheduler/App/view/EventFormAmended.js | 28 +++++++++---------- .../extscheduler/App/view/InfoPanelAmended.js | 4 +-- .../App/view/NavigationBarAmended.js | 4 +-- .../extscheduler/App/view/SchedulerAmended.js | 4 +-- 5 files changed, 24 insertions(+), 20 deletions(-) diff --git a/extscheduler/resources/views/weeklyTest.view.xml b/extscheduler/resources/views/weeklyTest.view.xml index ea8538224..95b29e5a9 100644 --- a/extscheduler/resources/views/weeklyTest.view.xml +++ b/extscheduler/resources/views/weeklyTest.view.xml @@ -2,5 +2,9 @@ + + + + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index c51656343..4a6c8f989 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -1,7 +1,7 @@ -Ext.define('App.view.EventForm', { +Ext.define('App.view.EventFormAmended', { extend : 'Ext.form.Panel', - alias : 'widget.eventform', - reference : 'eventform', + alias : 'widget.eventformamended', + reference : 'eventformamended', cls : 'eventform', width : 340, bodyPadding : 15, @@ -94,9 +94,9 @@ Ext.define('App.view.EventForm', { // }, { xtype : 'textfield', - labelAlign: 'top', - // width: 120, - // height: 20, + labelAlign: 'left', + width: 120, + height: 20, fieldLabel : 'Center Project', name : 'location', reference : 'eventProjectField', @@ -110,9 +110,9 @@ Ext.define('App.view.EventForm', { }, { xtype : 'textfield', - labelAlign: 'top', - // width: 120, - // height: 20, + labelAlign: 'left', + width: 120, + height: 20, fieldLabel : 'Type of Fasting Requested', name : 'Fasting', reference : 'eventFastimgField', @@ -126,10 +126,10 @@ Ext.define('App.view.EventForm', { }, { xtype : 'textfield', - labelAlign: 'top', - // width: 120, - // height: 20, - fieldLabel : 'Animaal Delivery Requested', + labelAlign: 'left', + width: 120, + height: 20, + fieldLabel : 'Animal Delivery Requested', name : 'deliveryrequest', reference : 'eventDeliveryRequestField', style: 'margin-top: 20px;', @@ -157,7 +157,7 @@ Ext.define('App.view.EventForm', { } }, { - xtype: 'textfield', + xtype: 'textarea', labelAlign: 'top', width: 320, height: 50, diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js index 55d41af4e..bf3b62ad2 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -1,7 +1,7 @@ -Ext.define('App.view.InfoPanel', { +Ext.define('App.view.InfoPanelAmended', { extend : 'Ext.Container', - alias : 'widget.infopanelAmended', + alias : 'widget.infopanelamended', requires : [ 'App.view.InfoPanelModelAmended' ], diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js index cbfe1cbea..a67af136e 100644 --- a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js @@ -1,6 +1,6 @@ -Ext.define('App.view.NavigationBar', { +Ext.define('App.view.NavigationBarAmended', { extend : 'Ext.panel.Header', - alias : 'widget.navigationbar', + alias : 'widget.navigationbaramended', cls : 'navigationbar', padding : '0 10 0 5', height : 40, diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js index 448e54e0b..f54ea8164 100644 --- a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -1,7 +1,7 @@ Ext.define('App.view.SchedulerAmended', { extend : 'Sch.panel.SchedulerGrid', - alias : 'widget.schedulerAmended', - reference : 'schedulerAmended', + alias : 'widget.scheduleramended', + reference : 'scheduleramended', startDate : new Date(), //endDate : new Date(), startTime : 6, From 2a42073efdbb68a5ba82d625d8398746b84f5200 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Mon, 24 Apr 2023 17:28:52 -0700 Subject: [PATCH 11/45] Modified extscheduler program to include dependency files. --- extscheduler/resources/views/NecropsyLauncher.html | 13 +++---------- extscheduler/resources/views/weeklyTest.html | 2 +- .../web/extscheduler/App/view/InfoPanelAmended.js | 6 +++--- .../extscheduler/App/view/InfoPanelModelAmended.js | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/extscheduler/resources/views/NecropsyLauncher.html b/extscheduler/resources/views/NecropsyLauncher.html index 8e09f94e9..f235c3cf6 100644 --- a/extscheduler/resources/views/NecropsyLauncher.html +++ b/extscheduler/resources/views/NecropsyLauncher.html @@ -12,12 +12,7 @@ border: false }, items: [{ - html: 'Please see the User Manual for step-by-step instructions.\n' + - '\n' + - 'To change a future event, please delete the incorrect entry and create a new one.\n' + - 'To change a past event, please email Wendy Price with an explanation or you will be billed.\n' + - '\n' + - 'If you have any questions about using Scheduler, please contact onprcitsupport@ohsu.edu. We\'re happy to help via email or meet with you to demonstrate.', + html: 'This is the Necropsy Scheduler Module. Below are links to the Necropsy Scheduler Program, and related reports.', style: 'padding-bottom: 10px;' },{ xtype: 'ldk-navpanel', @@ -28,19 +23,17 @@ name: 'View Necropsy Scheduler Calendar', url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { - // url: LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyweeklyTest', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { returnUrl: window.location.pathname + window.location.search }) },{ - - name: 'View Scheduler Present/Future Resource and Events Reports', + name: 'View Scheduler Resource and Events Reports', url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyScheduler', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { // returnUrl: window.location.pathname + window.location.search }) - }] + }] }] diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index 35a6ea667..eb29d4a2e 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -37,7 +37,7 @@ 'App': LABKEY.contextPath + '/extscheduler/App' }, views : [ - 'EventForm', + 'EventFormAmended', 'Header', 'InfoPanel', 'NavigationBar', diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js index bf3b62ad2..5ef770098 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -5,9 +5,9 @@ Ext.define('App.view.InfoPanelAmended', { requires : [ 'App.view.InfoPanelModelAmended' ], - viewModel : 'infopanelAmended', - reference : 'infopanelAmended', - cls : 'infopanelAmended', + viewModel : 'infopanelamended', + reference : 'infopanelamended', + cls : 'infopanelamended', width : 540, layout : { type : 'vbox', diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js index 47939e5c8..f7587f061 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js @@ -1,6 +1,6 @@ Ext.define('App.view.InfoPanelModelAmended', { extend : 'Ext.app.ViewModel', - alias : 'viewmodel.infopanelAmended', + alias : 'viewmodel.infopanelamended', data : { //eventRecord should be defined here because otherwise we can't bind {!eventRecord} eventRecord : null, From 8f768564196c59c7c68e089f5971547eab9fc147 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 25 Apr 2023 14:32:16 -0700 Subject: [PATCH 12/45] Modified extscheduler program to include dependency files. --- .../extscheduler/App/view/EventFormAmended.js | 51 ++----------------- .../extscheduler/App/view/InfoPanelAmended.js | 2 +- .../extscheduler/App/view/SchedulerAmended.js | 23 ++------- 3 files changed, 9 insertions(+), 67 deletions(-) diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index 4a6c8f989..8cbb11e50 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -1,7 +1,7 @@ Ext.define('App.view.EventFormAmended', { extend : 'Ext.form.Panel', - alias : 'widget.eventformamended', - reference : 'eventformamended', + alias : 'widget.eventformAmended', + reference : 'eventformAmended', cls : 'eventform', width : 340, bodyPadding : 15, @@ -22,18 +22,7 @@ Ext.define('App.view.EventFormAmended', { this.eventFormColumns = context['ExtSchedulerEventFormColumns'].split(','); this.items = [ - //{ - // xtype : 'textfield', - // fieldLabel : 'Name', - // name : 'Name', - // reference : 'eventNameField', - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('Name') === -1, - // bind : { - // value : '{eventRecord.Name}', - // readOnly : !this.editable - // } - //}, + { xtype : 'resourcecombo', fieldLabel : 'Resource', @@ -47,23 +36,7 @@ Ext.define('App.view.EventFormAmended', { } }, - // { - // xtype : 'combo', - // fieldLabel : 'User', - // store : 'users', - // queryMode : 'local', - // name : 'UserId', - // displayField : 'FullName', - // valueField : 'UserId', - // editable : false, - // typeAhead : true, - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('UserId') === -1, - // bind : { - // value : '{eventRecord.UserId}', - // readOnly : !this.editable - // } - // }, + { xtype : 'textfield', fieldLabel : 'Animal ID', @@ -77,21 +50,7 @@ Ext.define('App.view.EventFormAmended', { readOnly : !this.editable } }, - // { - // xtype : 'numberfield', - // fieldLabel : 'Quantity', - // name : 'Quantity', - // value : 1, - // minValue: 1, - // allowDecimals : false, - // reference : 'eventQuantityField', - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('Quantity') === -1, - // bind : { - // value : '{eventRecord.Quantity}', - // readOnly : !this.editable - // } - // }, + { xtype : 'textfield', labelAlign: 'left', diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js index 5ef770098..18c71f72f 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -1,7 +1,7 @@ Ext.define('App.view.InfoPanelAmended', { extend : 'Ext.Container', - alias : 'widget.infopanelamended', + alias : 'widget.infopanelAmended', requires : [ 'App.view.InfoPanelModelAmended' ], diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js index f54ea8164..c77c763ce 100644 --- a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -1,7 +1,7 @@ Ext.define('App.view.SchedulerAmended', { extend : 'Sch.panel.SchedulerGrid', - alias : 'widget.scheduleramended', - reference : 'scheduleramended', + alias : 'widget.schedulerAmended', + reference : 'schedulerAmended', startDate : new Date(), //endDate : new Date(), startTime : 6, @@ -61,24 +61,7 @@ Ext.define('App.view.SchedulerAmended', { }) }, '->', { - // text : 'Create New Event', - // iconCls: 'x-fa fa-plus-circle', - // hidden: !LABKEY.user.canInsert, - // scope: this, - // handler: function (btn) { - // var scheduler = btn.up('scheduler'); - // - // Ext.create('Ext.window.Window', { - // title : 'Create New Event', - // autoShow : true, - // modal : true, - // items : [{ - // xtype: 'eventform', - // editable : true, - // scheduler : scheduler - // }] - // }); - // } + } ], From 6e8a7997c8b70e7001ac96fd01fcef572c93965d Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 25 Apr 2023 16:27:05 -0700 Subject: [PATCH 13/45] Modified extscheduler program to include dependency files. --- extscheduler/resources/views/weeklyTest.html | 5 +++-- extscheduler/resources/views/weeklyTest.view.xml | 2 +- .../resources/web/extscheduler/App/view/EventFormAmended.js | 2 +- .../resources/web/extscheduler/App/view/InfoPanelAmended.js | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index eb29d4a2e..f0659fcec 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -9,6 +9,7 @@ + @@ -39,11 +40,11 @@ views : [ 'EventFormAmended', 'Header', - 'InfoPanel', + 'InfoPanelAmended', 'NavigationBar', 'ResourceCombo', 'Resources', - 'Scheduler', + 'SchedulerAmended', 'Viewport' ] }); diff --git a/extscheduler/resources/views/weeklyTest.view.xml b/extscheduler/resources/views/weeklyTest.view.xml index 95b29e5a9..ed7d6198c 100644 --- a/extscheduler/resources/views/weeklyTest.view.xml +++ b/extscheduler/resources/views/weeklyTest.view.xml @@ -5,6 +5,6 @@ - + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index 8cbb11e50..a8e837e6d 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -120,7 +120,7 @@ Ext.define('App.view.EventFormAmended', { labelAlign: 'top', width: 320, height: 50, - fieldLabel: 'Comments', + fieldLabel: 'CommentsXX', name: 'Comments', reference: 'eventCommentsField', style: 'margin-top: 20px;', diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js index 18c71f72f..6e9676be2 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -8,14 +8,14 @@ Ext.define('App.view.InfoPanelAmended', { viewModel : 'infopanelamended', reference : 'infopanelamended', cls : 'infopanelamended', - width : 540, + width : 340, layout : { type : 'vbox', align : 'stretch' }, items : [ { - xtype : 'eventform', + xtype : 'eventformAmended', title : 'Necropsy Calendar Schedule', editable : false } From 632220acd12a526c03a35cb309ef2e90d339f474 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 26 Apr 2023 16:16:03 -0700 Subject: [PATCH 14/45] Modified extscheduler program to include dependency files. --- extscheduler/resources/views/weeklyTest.html | 2 +- .../resources/views/weeklyTest.view.xml | 7 ++- .../web/extscheduler/App/view/EventForm.js | 4 +- .../extscheduler/App/view/EventFormAmended.js | 2 +- .../App/view/NavigationBarAmended.js | 6 +- .../extscheduler/App/view/SchedulerAmended.js | 8 +-- .../web/extscheduler/App/view/Viewport.js | 10 +++- .../extscheduler/App/view/ViewportAmended.js | 29 ++++++++++ .../App/view/ViewportController.js | 6 +- .../App/view/ViewportControllerAmended.js | 58 +++++++++++++++++++ 10 files changed, 114 insertions(+), 18 deletions(-) create mode 100644 extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js create mode 100644 extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index f0659fcec..8b58980da 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -33,7 +33,7 @@ { Ext.application({ name : 'App', - mainView : 'App.view.Viewport', + mainView : 'App.view.ViewportAmended', paths : { 'App': LABKEY.contextPath + '/extscheduler/App' }, diff --git a/extscheduler/resources/views/weeklyTest.view.xml b/extscheduler/resources/views/weeklyTest.view.xml index ed7d6198c..0dcd9ba34 100644 --- a/extscheduler/resources/views/weeklyTest.view.xml +++ b/extscheduler/resources/views/weeklyTest.view.xml @@ -2,9 +2,12 @@ - + - + + + + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/EventForm.js b/extscheduler/resources/web/extscheduler/App/view/EventForm.js index 0182430bb..8a3f1474b 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventForm.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventForm.js @@ -115,7 +115,7 @@ Ext.define('App.view.EventForm', { height: 20, fieldLabel : 'Type of Fasting Requested', name : 'Fasting', - reference : 'eventFastimgField', + reference : 'eventFastingField', style: 'margin-top: 20px;', allowBlank : true, hidden : this.eventFormColumns.indexOf('fasting') === -1, @@ -161,7 +161,7 @@ Ext.define('App.view.EventForm', { labelAlign: 'top', width: 320, height: 50, - fieldLabel: 'Comments', + fieldLabel: 'CommentsTT', name: 'Comments', reference: 'eventCommentsField', style: 'margin-top: 20px;', diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index a8e837e6d..60420dea3 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -2,7 +2,7 @@ Ext.define('App.view.EventFormAmended', { extend : 'Ext.form.Panel', alias : 'widget.eventformAmended', reference : 'eventformAmended', - cls : 'eventform', + cls : 'eventformAmended', width : 340, bodyPadding : 15, defaults : { diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js index a67af136e..5bc5bed8d 100644 --- a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js @@ -1,9 +1,9 @@ Ext.define('App.view.NavigationBarAmended', { extend : 'Ext.panel.Header', - alias : 'widget.navigationbaramended', + alias : 'widget.navigationbarAmended', cls : 'navigationbar', - padding : '0 10 0 5', - height : 40, + // padding : '0 10 0 5', + height : 0, border : false, title : '', items : [ diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js index c77c763ce..af45073b6 100644 --- a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -28,14 +28,14 @@ Ext.define('App.view.SchedulerAmended', { text : 'Previous', iconCls: 'x-fa fa-arrow-circle-left', handler: function (btn) { - var scheduler = btn.up('scheduler'); + var scheduler = btn.up('schedulerAmended'); scheduler.timeAxis.shift(-7, Sch.util.Date.DAY); } }, { text : 'Today', handler: function (btn) { - var scheduler = btn.up('scheduler'); + var scheduler = btn.up('schedulerAmended'); // Clear time here so date adjustment wouldn't result in 2 days span scheduler.setStart(Sch.util.Date.clearTime(new Date())); } @@ -45,7 +45,7 @@ Ext.define('App.view.SchedulerAmended', { iconCls: 'x-fa fa-arrow-circle-right', iconAlign: 'right', handler: function (btn) { - var scheduler = btn.up('scheduler'); + var scheduler = btn.up('schedulerAmended'); scheduler.timeAxis.shift(7, Sch.util.Date.DAY); } }, @@ -55,7 +55,7 @@ Ext.define('App.view.SchedulerAmended', { scope : this, menu : Ext.create('Ext.menu.DatePicker', { handler : function (dp, date) { - var scheduler = dp.up('scheduler'); + var scheduler = dp.up('schedulerAmended'); scheduler.setStart(Sch.util.Date.clearTime(date)); } }) diff --git a/extscheduler/resources/web/extscheduler/App/view/Viewport.js b/extscheduler/resources/web/extscheduler/App/view/Viewport.js index b107d6183..573d33765 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Viewport.js +++ b/extscheduler/resources/web/extscheduler/App/view/Viewport.js @@ -18,12 +18,18 @@ Ext.define('App.view.Viewport', { region : 'north' }, { - xtype : 'infopanel', + xtype : 'infopanelAmended', region : 'east' }, { - xtype : 'scheduler', + xtype : 'schedulerAmended', region : 'center' } + + + + + + ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js new file mode 100644 index 000000000..413a7ba27 --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js @@ -0,0 +1,29 @@ +//This viewport takes a role of container that contains a scheduler. +//If you need more than one scheduler on the page, you need to wrap viewport items in your own view. +Ext.define('App.view.ViewportAmended', { + extend : 'Ext.Viewport', + requires : [ + 'App.view.ViewportControllerAmended' + ], + controller : 'viewportAmended', + viewModel : {}, + layout : 'border', + items : [ + { + xtype : 'navigationbarAmended', + region : 'north' + }, + { + xtype : 'appheader', + region : 'north' + }, + { + xtype : 'infopanelAmended', + region : 'east' + }, + { + xtype : 'schedulerAmended', + region : 'center' + } + ] +}); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportController.js b/extscheduler/resources/web/extscheduler/App/view/ViewportController.js index eea352203..1cb8d43a1 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportController.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportController.js @@ -13,7 +13,7 @@ Ext.define('App.view.ViewportController', { onEventSelect : function (selectionModel, eventRecord) { var refs = this.getReferences(), - infopanelVM = refs.infopanel.getViewModel(), + infopanelVM = refs.infopanelamended.getViewModel(), scheduler = selectionModel.view.ownerGrid; infopanelVM.set({ @@ -27,7 +27,7 @@ Ext.define('App.view.ViewportController', { onEventDeselect : function () { var refs = this.getReferences(), - infopanelVM = refs.infopanel.getViewModel(); + infopanelVM = refs.infopanelamended.getViewModel(); infopanelVM.set({ 'eventRecord' : null, @@ -46,7 +46,7 @@ Ext.define('App.view.ViewportController', { onResourceFilterChange : function (combo, selectedResourceIds) { // Both schedulers share store, so we can use event store from any of them - var eventStore = this.getReferences().scheduler.eventStore; + var eventStore = this.getReferences().schedulerAmended.eventStore; //true to avoid double full view repaints eventStore.clearFilter(true); diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js new file mode 100644 index 000000000..a9c2361ba --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js @@ -0,0 +1,58 @@ +//This controller is watching for viewport and child views which don't have their own viewController. +Ext.define('App.view.ViewportControllerAmended', { + extend : 'Ext.app.ViewController', + alias : 'controller.viewportAmended', + + control : { + 'schedulergrid' : { + eventselect : 'onEventSelect', + eventdeselect : 'onEventDeselect', + viewchange : 'onViewChange' + } + }, + + onEventSelect : function (selectionModel, eventRecord) { + var refs = this.getReferences(), + infopanelVM = refs.infopanelamended.getViewModel(), + scheduler = selectionModel.view.ownerGrid; + + infopanelVM.set({ + 'eventRecord' : eventRecord, + 'defaultMinTime' : scheduler.getStart(), + 'defaultMaxTime' : scheduler.getEnd() + }); + + //refs.eventResourceField.focus(); + }, + + onEventDeselect : function () { + var refs = this.getReferences(), + infopanelVM = refs.infopanelamended.getViewModel(); + + infopanelVM.set({ + 'eventRecord' : null, + 'defaultMinTime' : null, + 'defaultMaxTime' : null + }); + + //refs.eventResourceField.focus(); + }, + + onViewChange : function (timelinePanel) { + var vm = this.getViewModel(); + + vm.set('endDate', timelinePanel.getEndDate()); + }, + + onResourceFilterChange : function (combo, selectedResourceIds) { + // Both schedulers share store, so we can use event store from any of them + var eventStore = this.getReferences().scheduler.eventStore; + + //true to avoid double full view repaints + eventStore.clearFilter(true); + + eventStore.filterBy(function (eventRecord) { + return eventRecord.getResourceId() in selectedResourceIds; + }); + } +}); \ No newline at end of file From 19a9851bce7cc542b229afc2bf592451cc26055a Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 26 Apr 2023 17:13:31 -0700 Subject: [PATCH 15/45] Modified extscheduler program to include dependency files. --- extscheduler/resources/views/weeklyTest.html | 2 +- .../resources/web/extscheduler/App/view/ViewportAmended.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index 8b58980da..bf06e1b21 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -45,7 +45,7 @@ 'ResourceCombo', 'Resources', 'SchedulerAmended', - 'Viewport' + 'ViewportAmended' ] }); }; diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js index 413a7ba27..0d9c1f4da 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js @@ -10,7 +10,7 @@ Ext.define('App.view.ViewportAmended', { layout : 'border', items : [ { - xtype : 'navigationbarAmended', + xtype : 'navigationbar', region : 'north' }, { From 586805f9ae168c1d0feac70f8541938a70954abf Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 26 Apr 2023 18:08:10 -0700 Subject: [PATCH 16/45] Modified extscheduler program to include dependency files. --- .../resources/views/NecropsyLauncher.html | 2 +- .../resources/views/NecropsyWeeklyTest.html | 165 ------------------ .../views/NecropsyWeeklyTest.view.xml | 6 - .../resources/views/weeklyNecropsyTest.html | 13 +- .../views/weeklyNecropsyTest.view.xml | 9 +- extscheduler/resources/views/weeklyTest.html | 16 +- .../resources/views/weeklyTest.view.xml | 9 +- .../web/extscheduler/App/view/EventForm.js | 141 +++++---------- .../web/extscheduler/App/view/InfoPanel.js | 20 +-- .../extscheduler/App/view/NavigationBar.js | 16 +- .../web/extscheduler/App/view/Scheduler.js | 44 +++-- .../web/extscheduler/App/view/Viewport.js | 10 +- .../extscheduler/App/view/ViewportAmended.js | 2 +- .../App/view/ViewportController.js | 6 +- .../App/view/ViewportControllerAmended.js | 2 +- 15 files changed, 111 insertions(+), 350 deletions(-) delete mode 100644 extscheduler/resources/views/NecropsyWeeklyTest.html delete mode 100644 extscheduler/resources/views/NecropsyWeeklyTest.view.xml diff --git a/extscheduler/resources/views/NecropsyLauncher.html b/extscheduler/resources/views/NecropsyLauncher.html index f235c3cf6..8351da6d4 100644 --- a/extscheduler/resources/views/NecropsyLauncher.html +++ b/extscheduler/resources/views/NecropsyLauncher.html @@ -22,7 +22,7 @@ name: 'View Necropsy Scheduler Calendar', - url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { + url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyNecropsyTest', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { returnUrl: window.location.pathname + window.location.search }) diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.html b/extscheduler/resources/views/NecropsyWeeklyTest.html deleted file mode 100644 index b9a22425d..000000000 --- a/extscheduler/resources/views/NecropsyWeeklyTest.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Necropsy Scheduler Week View - - - - - \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml b/extscheduler/resources/views/NecropsyWeeklyTest.view.xml deleted file mode 100644 index 5332b2730..000000000 --- a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html index 4bda3f14a..d89825fcb 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.html +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -9,6 +9,7 @@ + @@ -32,19 +33,19 @@ { Ext.application({ name : 'App', - mainView : 'App.view.Viewport', + mainView : 'App.view.ViewportAmended', paths : { 'App': LABKEY.contextPath + '/extscheduler/App' }, views : [ - 'EventForm', + 'EventFormAmended', 'Header', - 'InfoPanel', - 'NavigationBar', + 'InfoPanelAmended', + 'NavigationBarAmended', 'ResourceCombo', 'Resources', - 'Scheduler', - 'Viewport' + 'SchedulerAmended', + 'ViewportAmended' ] }); }; diff --git a/extscheduler/resources/views/weeklyNecropsyTest.view.xml b/extscheduler/resources/views/weeklyNecropsyTest.view.xml index 37e713490..736b9fd3c 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.view.xml +++ b/extscheduler/resources/views/weeklyNecropsyTest.view.xml @@ -1,6 +1,13 @@ - + + + + + + + + \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index bf06e1b21..7d98e834d 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -9,9 +9,7 @@ - - - + @@ -33,19 +31,19 @@ { Ext.application({ name : 'App', - mainView : 'App.view.ViewportAmended', + mainView : 'App.view.Viewport', paths : { 'App': LABKEY.contextPath + '/extscheduler/App' }, views : [ - 'EventFormAmended', + 'EventForm', 'Header', - 'InfoPanelAmended', + 'InfoPanel', 'NavigationBar', 'ResourceCombo', 'Resources', - 'SchedulerAmended', - 'ViewportAmended' + 'Scheduler', + 'Viewport' ] }); }; @@ -82,7 +80,7 @@ LABKEY.Query.selectRows({ schemaName: 'extscheduler', queryName: 'Events', - columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,project,location', + columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity', success: function(data){ // need to convert the date fields from a string to JS Date object diff --git a/extscheduler/resources/views/weeklyTest.view.xml b/extscheduler/resources/views/weeklyTest.view.xml index 0dcd9ba34..340ce7333 100644 --- a/extscheduler/resources/views/weeklyTest.view.xml +++ b/extscheduler/resources/views/weeklyTest.view.xml @@ -1,13 +1,6 @@ - - - - - - - - + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/EventForm.js b/extscheduler/resources/web/extscheduler/App/view/EventForm.js index 8a3f1474b..56e0ac4dd 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventForm.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventForm.js @@ -47,26 +47,26 @@ Ext.define('App.view.EventForm', { } }, - // { - // xtype : 'combo', - // fieldLabel : 'User', - // store : 'users', - // queryMode : 'local', - // name : 'UserId', - // displayField : 'FullName', - // valueField : 'UserId', - // editable : false, - // typeAhead : true, - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('UserId') === -1, - // bind : { - // value : '{eventRecord.UserId}', - // readOnly : !this.editable - // } - // }, + { + xtype : 'combo', + fieldLabel : 'User', + store : 'users', + queryMode : 'local', + name : 'UserId', + displayField : 'FullName', + valueField : 'UserId', + editable : false, + typeAhead : true, + allowBlank : !this.editable, + hidden : this.eventFormColumns.indexOf('UserId') === -1, + bind : { + value : '{eventRecord.UserId}', + readOnly : !this.editable + } + }, { xtype : 'textfield', - fieldLabel : 'Animal ID', + fieldLabel : 'Alias', name : 'Alias', reference : 'eventAliasField', //allowBlank : !this.editable, @@ -77,102 +77,45 @@ Ext.define('App.view.EventForm', { readOnly : !this.editable } }, - // { - // xtype : 'numberfield', - // fieldLabel : 'Quantity', - // name : 'Quantity', - // value : 1, - // minValue: 1, - // allowDecimals : false, - // reference : 'eventQuantityField', - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('Quantity') === -1, - // bind : { - // value : '{eventRecord.Quantity}', - // readOnly : !this.editable - // } - // }, - { - xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Center Project', - name : 'location', - reference : 'eventProjectField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('project') === -1, - bind : { - value : '{eventRecord.project}', - readOnly : !this.editable - } - }, - { - xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Type of Fasting Requested', - name : 'Fasting', - reference : 'eventFastingField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('fasting') === -1, - bind : { - value : '{eventRecord.fasting}', - readOnly : !this.editable - } - }, { - xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Animal Delivery Requested', - name : 'deliveryrequest', - reference : 'eventDeliveryRequestField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('deliveryrequest') === -1, + xtype : 'numberfield', + fieldLabel : 'Quantity', + name : 'Quantity', + value : 1, + minValue: 1, + allowDecimals : false, + reference : 'eventQuantityField', + allowBlank : !this.editable, + hidden : this.eventFormColumns.indexOf('Quantity') === -1, bind : { - value : '{eventRecord.deliveryrequestt}', + value : '{eventRecord.Quantity}', readOnly : !this.editable } }, { - xtype : 'textfield', + xtype : 'textarea', labelAlign: 'top', width: 320, - height: 20, - fieldLabel : 'Necropsy Location', - name : 'location', - reference : 'eventLocationField', + height: 200, + fieldLabel : 'Comments', + name : 'Comments', + reference : 'eventCommentsField', style: 'margin-top: 20px;', allowBlank : true, - hidden : this.eventFormColumns.indexOf('location') === -1, + hidden : this.eventFormColumns.indexOf('Comments') === -1, bind : { - value : '{eventRecord.location}', + value : '{eventRecord.Comments}', readOnly : !this.editable } - }, - { - xtype: 'textarea', + /* xtype: 'textarea', labelAlign: 'top', - width: 320, - height: 50, - fieldLabel: 'CommentsTT', - name: 'Comments', - reference: 'eventCommentsField', + width: 500, + height: 200, + fieldLabel: 'Question/Comment', + name: 'comment', style: 'margin-top: 20px;', - allowBlank: true, - hidden: this.eventFormColumns.indexOf('Comments') === -1, - bind: { - value: '{eventRecord.Comments}', - readOnly: !this.editable - } - }, - + allowBlank: false + */ }, { xtype : 'fieldcontainer', layout : 'hbox', diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js index 4da8356f5..5654b007d 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js @@ -18,16 +18,16 @@ Ext.define('App.view.InfoPanel', { xtype : 'eventform', title : 'Event details', editable : false + }, + { + xtype : 'panel', + title : 'Resources', + cls : 'resources', + bodyPadding : '0 15', + flex : 1, + layout : 'fit', + margin : '10 0 0 0', + items : [{ xtype : 'resources' }] } - // { - // xtype : 'panel', - // title : 'Resources', - // cls : 'resources', - // bodyPadding : '0 15', - // flex : 1, - // layout : 'fit', - // margin : '10 0 0 0', - // items : [{ xtype : 'resources' }] - // } ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js index cbfe1cbea..4e1fd6081 100644 --- a/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js @@ -8,14 +8,14 @@ Ext.define('App.view.NavigationBar', { title : '', items : [ { - // xtype : 'button', - // text : 'Return to ' + window.location.host, - // handler : function() { - // if (LABKEY.ActionURL.getParameter('returnUrl')) - // window.location = LABKEY.ActionURL.getParameter('returnUrl'); - // else - // window.location = LABKEY.ActionURL.buildURL('project', 'begin'); - // } + xtype : 'button', + text : 'Return to ' + window.location.host, + handler : function() { + if (LABKEY.ActionURL.getParameter('returnUrl')) + window.location = LABKEY.ActionURL.getParameter('returnUrl'); + else + window.location = LABKEY.ActionURL.buildURL('project', 'begin'); + } } ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/Scheduler.js b/extscheduler/resources/web/extscheduler/App/view/Scheduler.js index 2f6f53cdf..3cf7c3587 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Scheduler.js +++ b/extscheduler/resources/web/extscheduler/App/view/Scheduler.js @@ -15,7 +15,7 @@ Ext.define('App.view.Scheduler', { calendarViewPreset : 'week', mode : 'calendar', eventResizeHandles : 'none', - eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{Location:htmlEncode}', + eventBodyTemplate :'{Name:htmlEncode}
{ResourceName:htmlEncode}
{UserDisplayName:htmlEncode}', snapToIncrement : true, allowOverlap : true, highlightCurrentTime : true, @@ -61,34 +61,30 @@ Ext.define('App.view.Scheduler', { }) }, '->', { - // text : 'Create New Event', - // iconCls: 'x-fa fa-plus-circle', - // hidden: !LABKEY.user.canInsert, - // scope: this, - // handler: function (btn) { - // var scheduler = btn.up('scheduler'); - // - // Ext.create('Ext.window.Window', { - // title : 'Create New Event', - // autoShow : true, - // modal : true, - // items : [{ - // xtype: 'eventform', - // editable : true, - // scheduler : scheduler - // }] - // }); - // } + text : 'Create New Event', + iconCls: 'x-fa fa-plus-circle', + hidden: !LABKEY.user.canInsert, + scope: this, + handler: function (btn) { + var scheduler = btn.up('scheduler'); + + Ext.create('Ext.window.Window', { + title : 'Create New Event', + autoShow : true, + modal : true, + items : [{ + xtype: 'eventform', + editable : true, + scheduler : scheduler + }] + }); + } } ], eventRenderer : function (event, resource, data) { - - data.style = 'background-color:' + resource.get('Color'); + data.style = 'border-color:' + resource.get('Color'); event.data['ResourceName'] = resource.get('Name'); - event.data['Project'] = event.get('project'); - event.data['Location'] = event.get('location'); - event.data['Alias'] = event.get('Alias'); var userRecord = Ext.getStore('users').findRecord('UserId', event.get('UserId')); event.data['UserDisplayName'] = userRecord != null ? userRecord.get('DisplayName') : event.get('UserId'); return event.data; diff --git a/extscheduler/resources/web/extscheduler/App/view/Viewport.js b/extscheduler/resources/web/extscheduler/App/view/Viewport.js index 573d33765..b107d6183 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Viewport.js +++ b/extscheduler/resources/web/extscheduler/App/view/Viewport.js @@ -18,18 +18,12 @@ Ext.define('App.view.Viewport', { region : 'north' }, { - xtype : 'infopanelAmended', + xtype : 'infopanel', region : 'east' }, { - xtype : 'schedulerAmended', + xtype : 'scheduler', region : 'center' } - - - - - - ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js index 0d9c1f4da..413a7ba27 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js @@ -10,7 +10,7 @@ Ext.define('App.view.ViewportAmended', { layout : 'border', items : [ { - xtype : 'navigationbar', + xtype : 'navigationbarAmended', region : 'north' }, { diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportController.js b/extscheduler/resources/web/extscheduler/App/view/ViewportController.js index 1cb8d43a1..eea352203 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportController.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportController.js @@ -13,7 +13,7 @@ Ext.define('App.view.ViewportController', { onEventSelect : function (selectionModel, eventRecord) { var refs = this.getReferences(), - infopanelVM = refs.infopanelamended.getViewModel(), + infopanelVM = refs.infopanel.getViewModel(), scheduler = selectionModel.view.ownerGrid; infopanelVM.set({ @@ -27,7 +27,7 @@ Ext.define('App.view.ViewportController', { onEventDeselect : function () { var refs = this.getReferences(), - infopanelVM = refs.infopanelamended.getViewModel(); + infopanelVM = refs.infopanel.getViewModel(); infopanelVM.set({ 'eventRecord' : null, @@ -46,7 +46,7 @@ Ext.define('App.view.ViewportController', { onResourceFilterChange : function (combo, selectedResourceIds) { // Both schedulers share store, so we can use event store from any of them - var eventStore = this.getReferences().schedulerAmended.eventStore; + var eventStore = this.getReferences().scheduler.eventStore; //true to avoid double full view repaints eventStore.clearFilter(true); diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js index a9c2361ba..a97b77558 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js @@ -46,7 +46,7 @@ Ext.define('App.view.ViewportControllerAmended', { onResourceFilterChange : function (combo, selectedResourceIds) { // Both schedulers share store, so we can use event store from any of them - var eventStore = this.getReferences().scheduler.eventStore; + var eventStore = this.getReferences().schedulerAmended.eventStore; //true to avoid double full view repaints eventStore.clearFilter(true); From 29f1a18669af7bd86c6a29cb83927123cdc6ea30 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:01:00 -0700 Subject: [PATCH 17/45] Modified extscheduler program to include dependency files. --- .../resources/views/NecropsyLauncher.html | 2 +- .../views/NecropsyWeeklyScheduler.html | 32 +++- .../views/NecropsyWeeklyScheduler.view.xml | 3 +- .../views/NecropsyWeeklyScheduler.webart.xml | 3 + .../resources/views/NecropsyWeeklyTest.html | 165 ------------------ .../views/NecropsyWeeklyTest.view.xml | 6 - .../resources/views/weeklyNecropsyTest.html | 15 +- .../views/weeklyNecropsyTest.view.xml | 10 +- extscheduler/resources/views/weeklyTest.html | 16 +- .../resources/views/weeklyTest.view.xml | 9 +- .../web/extscheduler/App/view/EventForm.js | 141 +++++---------- .../extscheduler/App/view/HeaderAmended.js | 21 +++ .../web/extscheduler/App/view/InfoPanel.js | 20 +-- .../extscheduler/App/view/NavigationBar.js | 16 +- .../web/extscheduler/App/view/Scheduler.js | 44 +++-- .../web/extscheduler/App/view/Viewport.js | 10 +- .../extscheduler/App/view/ViewportAmended.js | 4 +- .../App/view/ViewportController.js | 6 +- .../App/view/ViewportControllerAmended.js | 2 +- 19 files changed, 167 insertions(+), 358 deletions(-) create mode 100644 extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml delete mode 100644 extscheduler/resources/views/NecropsyWeeklyTest.html delete mode 100644 extscheduler/resources/views/NecropsyWeeklyTest.view.xml create mode 100644 extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js diff --git a/extscheduler/resources/views/NecropsyLauncher.html b/extscheduler/resources/views/NecropsyLauncher.html index f235c3cf6..8351da6d4 100644 --- a/extscheduler/resources/views/NecropsyLauncher.html +++ b/extscheduler/resources/views/NecropsyLauncher.html @@ -22,7 +22,7 @@ name: 'View Necropsy Scheduler Calendar', - url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { + url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyNecropsyTest', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { returnUrl: window.location.pathname + window.location.search }) diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html index fe37d56e6..b8ebbe7a6 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.html +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -37,7 +37,7 @@

My Events

} else { - var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'weeklyTest', null, { + var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklyTest', null, { returnUrl: window.location.pathname + window.location.search }); Ext4.get('launch-link').update('Launch Scheduler'); @@ -48,27 +48,49 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Resources', - columns: 'Name,color', sort: 'Name' }); var timeFrameFilter = null; var renderEventsQueryWebPart = function() { - + var filters = [LABKEY.Filter.create('Owner', true, LABKEY.user.isAdmin ? LABKEY.Filter.Types.HAS_ANY_VALUE : LABKEY.Filter.Types.EQUALS)]; + if (timeFrameFilter != null) + filters.push(timeFrameFilter); new LABKEY.QueryWebPart({ renderTo: 'events-qwp', frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,location', - filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN)], + filters: filters, sort: 'StartDate,ResourceId,Name' }); }; + Ext4.create('Ext.form.RadioGroup', { + renderTo: 'events-radiogroup', + width: 250, + columns: 3, + items: [ + {boxLabel: 'All', name: 'timeframe', inputValue: 'All'}, + {boxLabel: 'Previous', name: 'timeframe', inputValue: 'Previous'}, + {boxLabel: 'Upcoming', name: 'timeframe', inputValue: 'Upcoming t', checked: true} + ], + listeners: { + change: function(radiogroup, newValue) + { + if (newValue.timeframe == 'Previous') + timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN); + else if (newValue.timeframe == 'Upcoming') + timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL); + else + timeFrameFilter = null; + renderEventsQueryWebPart(); + } + } + }); renderEventsQueryWebPart(); }); diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml index 49ee8a6d2..e60575888 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.view.xml @@ -1,6 +1,7 @@ + - + diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml new file mode 100644 index 000000000..9553e6720 --- /dev/null +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.html b/extscheduler/resources/views/NecropsyWeeklyTest.html deleted file mode 100644 index b9a22425d..000000000 --- a/extscheduler/resources/views/NecropsyWeeklyTest.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - Necropsy Scheduler Week View - - - - - \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml b/extscheduler/resources/views/NecropsyWeeklyTest.view.xml deleted file mode 100644 index 5332b2730..000000000 --- a/extscheduler/resources/views/NecropsyWeeklyTest.view.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html index 4bda3f14a..8b53a8674 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.html +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -9,6 +9,7 @@ + @@ -32,19 +33,19 @@ { Ext.application({ name : 'App', - mainView : 'App.view.Viewport', + mainView : 'App.view.ViewportAmended', paths : { 'App': LABKEY.contextPath + '/extscheduler/App' }, views : [ - 'EventForm', - 'Header', - 'InfoPanel', - 'NavigationBar', + 'EventFormAmended', + 'HeaderAmended', + 'InfoPanelAmended', + 'NavigationBarAmended', 'ResourceCombo', 'Resources', - 'Scheduler', - 'Viewport' + 'SchedulerAmended', + 'ViewportAmended' ] }); }; diff --git a/extscheduler/resources/views/weeklyNecropsyTest.view.xml b/extscheduler/resources/views/weeklyNecropsyTest.view.xml index 37e713490..480f2b6e3 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.view.xml +++ b/extscheduler/resources/views/weeklyNecropsyTest.view.xml @@ -1,6 +1,14 @@ - + + + + + + + + + \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index bf06e1b21..7d98e834d 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -9,9 +9,7 @@ - - - + @@ -33,19 +31,19 @@ { Ext.application({ name : 'App', - mainView : 'App.view.ViewportAmended', + mainView : 'App.view.Viewport', paths : { 'App': LABKEY.contextPath + '/extscheduler/App' }, views : [ - 'EventFormAmended', + 'EventForm', 'Header', - 'InfoPanelAmended', + 'InfoPanel', 'NavigationBar', 'ResourceCombo', 'Resources', - 'SchedulerAmended', - 'ViewportAmended' + 'Scheduler', + 'Viewport' ] }); }; @@ -82,7 +80,7 @@ LABKEY.Query.selectRows({ schemaName: 'extscheduler', queryName: 'Events', - columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,project,location', + columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity', success: function(data){ // need to convert the date fields from a string to JS Date object diff --git a/extscheduler/resources/views/weeklyTest.view.xml b/extscheduler/resources/views/weeklyTest.view.xml index 0dcd9ba34..340ce7333 100644 --- a/extscheduler/resources/views/weeklyTest.view.xml +++ b/extscheduler/resources/views/weeklyTest.view.xml @@ -1,13 +1,6 @@ - - - - - - - - + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/EventForm.js b/extscheduler/resources/web/extscheduler/App/view/EventForm.js index 8a3f1474b..56e0ac4dd 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventForm.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventForm.js @@ -47,26 +47,26 @@ Ext.define('App.view.EventForm', { } }, - // { - // xtype : 'combo', - // fieldLabel : 'User', - // store : 'users', - // queryMode : 'local', - // name : 'UserId', - // displayField : 'FullName', - // valueField : 'UserId', - // editable : false, - // typeAhead : true, - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('UserId') === -1, - // bind : { - // value : '{eventRecord.UserId}', - // readOnly : !this.editable - // } - // }, + { + xtype : 'combo', + fieldLabel : 'User', + store : 'users', + queryMode : 'local', + name : 'UserId', + displayField : 'FullName', + valueField : 'UserId', + editable : false, + typeAhead : true, + allowBlank : !this.editable, + hidden : this.eventFormColumns.indexOf('UserId') === -1, + bind : { + value : '{eventRecord.UserId}', + readOnly : !this.editable + } + }, { xtype : 'textfield', - fieldLabel : 'Animal ID', + fieldLabel : 'Alias', name : 'Alias', reference : 'eventAliasField', //allowBlank : !this.editable, @@ -77,102 +77,45 @@ Ext.define('App.view.EventForm', { readOnly : !this.editable } }, - // { - // xtype : 'numberfield', - // fieldLabel : 'Quantity', - // name : 'Quantity', - // value : 1, - // minValue: 1, - // allowDecimals : false, - // reference : 'eventQuantityField', - // allowBlank : !this.editable, - // hidden : this.eventFormColumns.indexOf('Quantity') === -1, - // bind : { - // value : '{eventRecord.Quantity}', - // readOnly : !this.editable - // } - // }, - { - xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Center Project', - name : 'location', - reference : 'eventProjectField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('project') === -1, - bind : { - value : '{eventRecord.project}', - readOnly : !this.editable - } - }, - { - xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Type of Fasting Requested', - name : 'Fasting', - reference : 'eventFastingField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('fasting') === -1, - bind : { - value : '{eventRecord.fasting}', - readOnly : !this.editable - } - }, { - xtype : 'textfield', - labelAlign: 'left', - width: 120, - height: 20, - fieldLabel : 'Animal Delivery Requested', - name : 'deliveryrequest', - reference : 'eventDeliveryRequestField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('deliveryrequest') === -1, + xtype : 'numberfield', + fieldLabel : 'Quantity', + name : 'Quantity', + value : 1, + minValue: 1, + allowDecimals : false, + reference : 'eventQuantityField', + allowBlank : !this.editable, + hidden : this.eventFormColumns.indexOf('Quantity') === -1, bind : { - value : '{eventRecord.deliveryrequestt}', + value : '{eventRecord.Quantity}', readOnly : !this.editable } }, { - xtype : 'textfield', + xtype : 'textarea', labelAlign: 'top', width: 320, - height: 20, - fieldLabel : 'Necropsy Location', - name : 'location', - reference : 'eventLocationField', + height: 200, + fieldLabel : 'Comments', + name : 'Comments', + reference : 'eventCommentsField', style: 'margin-top: 20px;', allowBlank : true, - hidden : this.eventFormColumns.indexOf('location') === -1, + hidden : this.eventFormColumns.indexOf('Comments') === -1, bind : { - value : '{eventRecord.location}', + value : '{eventRecord.Comments}', readOnly : !this.editable } - }, - { - xtype: 'textarea', + /* xtype: 'textarea', labelAlign: 'top', - width: 320, - height: 50, - fieldLabel: 'CommentsTT', - name: 'Comments', - reference: 'eventCommentsField', + width: 500, + height: 200, + fieldLabel: 'Question/Comment', + name: 'comment', style: 'margin-top: 20px;', - allowBlank: true, - hidden: this.eventFormColumns.indexOf('Comments') === -1, - bind: { - value: '{eventRecord.Comments}', - readOnly: !this.editable - } - }, - + allowBlank: false + */ }, { xtype : 'fieldcontainer', layout : 'hbox', diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js new file mode 100644 index 000000000..7d299f1ef --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -0,0 +1,21 @@ +Ext.define('App.view.HeaderAmended', { + extend : 'Ext.panel.Header', + alias : 'widget.appheaderAmended', + cls : 'app-header', + height : 40, + padding : '5 10 5 5', + tpl : 'Schedule for ; {month}{year}', + // tpl : 'Schedule for {month}{year}', + bind : { + //each bind should have corresponding setter + date: '{endDate}' + }, + setDate : function (date) { + this.setData( + { + month : Ext.Date.format(date, 'F'), + year : Ext.Date.format(date, 'Y') + } + ); + } +}); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js index 4da8356f5..5654b007d 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanel.js @@ -18,16 +18,16 @@ Ext.define('App.view.InfoPanel', { xtype : 'eventform', title : 'Event details', editable : false + }, + { + xtype : 'panel', + title : 'Resources', + cls : 'resources', + bodyPadding : '0 15', + flex : 1, + layout : 'fit', + margin : '10 0 0 0', + items : [{ xtype : 'resources' }] } - // { - // xtype : 'panel', - // title : 'Resources', - // cls : 'resources', - // bodyPadding : '0 15', - // flex : 1, - // layout : 'fit', - // margin : '10 0 0 0', - // items : [{ xtype : 'resources' }] - // } ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js index cbfe1cbea..4e1fd6081 100644 --- a/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBar.js @@ -8,14 +8,14 @@ Ext.define('App.view.NavigationBar', { title : '', items : [ { - // xtype : 'button', - // text : 'Return to ' + window.location.host, - // handler : function() { - // if (LABKEY.ActionURL.getParameter('returnUrl')) - // window.location = LABKEY.ActionURL.getParameter('returnUrl'); - // else - // window.location = LABKEY.ActionURL.buildURL('project', 'begin'); - // } + xtype : 'button', + text : 'Return to ' + window.location.host, + handler : function() { + if (LABKEY.ActionURL.getParameter('returnUrl')) + window.location = LABKEY.ActionURL.getParameter('returnUrl'); + else + window.location = LABKEY.ActionURL.buildURL('project', 'begin'); + } } ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/Scheduler.js b/extscheduler/resources/web/extscheduler/App/view/Scheduler.js index 2f6f53cdf..3cf7c3587 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Scheduler.js +++ b/extscheduler/resources/web/extscheduler/App/view/Scheduler.js @@ -15,7 +15,7 @@ Ext.define('App.view.Scheduler', { calendarViewPreset : 'week', mode : 'calendar', eventResizeHandles : 'none', - eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{Location:htmlEncode}', + eventBodyTemplate :'{Name:htmlEncode}
{ResourceName:htmlEncode}
{UserDisplayName:htmlEncode}', snapToIncrement : true, allowOverlap : true, highlightCurrentTime : true, @@ -61,34 +61,30 @@ Ext.define('App.view.Scheduler', { }) }, '->', { - // text : 'Create New Event', - // iconCls: 'x-fa fa-plus-circle', - // hidden: !LABKEY.user.canInsert, - // scope: this, - // handler: function (btn) { - // var scheduler = btn.up('scheduler'); - // - // Ext.create('Ext.window.Window', { - // title : 'Create New Event', - // autoShow : true, - // modal : true, - // items : [{ - // xtype: 'eventform', - // editable : true, - // scheduler : scheduler - // }] - // }); - // } + text : 'Create New Event', + iconCls: 'x-fa fa-plus-circle', + hidden: !LABKEY.user.canInsert, + scope: this, + handler: function (btn) { + var scheduler = btn.up('scheduler'); + + Ext.create('Ext.window.Window', { + title : 'Create New Event', + autoShow : true, + modal : true, + items : [{ + xtype: 'eventform', + editable : true, + scheduler : scheduler + }] + }); + } } ], eventRenderer : function (event, resource, data) { - - data.style = 'background-color:' + resource.get('Color'); + data.style = 'border-color:' + resource.get('Color'); event.data['ResourceName'] = resource.get('Name'); - event.data['Project'] = event.get('project'); - event.data['Location'] = event.get('location'); - event.data['Alias'] = event.get('Alias'); var userRecord = Ext.getStore('users').findRecord('UserId', event.get('UserId')); event.data['UserDisplayName'] = userRecord != null ? userRecord.get('DisplayName') : event.get('UserId'); return event.data; diff --git a/extscheduler/resources/web/extscheduler/App/view/Viewport.js b/extscheduler/resources/web/extscheduler/App/view/Viewport.js index 573d33765..b107d6183 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Viewport.js +++ b/extscheduler/resources/web/extscheduler/App/view/Viewport.js @@ -18,18 +18,12 @@ Ext.define('App.view.Viewport', { region : 'north' }, { - xtype : 'infopanelAmended', + xtype : 'infopanel', region : 'east' }, { - xtype : 'schedulerAmended', + xtype : 'scheduler', region : 'center' } - - - - - - ] }); \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js index 0d9c1f4da..b7e5406d5 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportAmended.js @@ -10,11 +10,11 @@ Ext.define('App.view.ViewportAmended', { layout : 'border', items : [ { - xtype : 'navigationbar', + xtype : 'navigationbarAmended', region : 'north' }, { - xtype : 'appheader', + xtype : 'appheaderAmended', region : 'north' }, { diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportController.js b/extscheduler/resources/web/extscheduler/App/view/ViewportController.js index 1cb8d43a1..eea352203 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportController.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportController.js @@ -13,7 +13,7 @@ Ext.define('App.view.ViewportController', { onEventSelect : function (selectionModel, eventRecord) { var refs = this.getReferences(), - infopanelVM = refs.infopanelamended.getViewModel(), + infopanelVM = refs.infopanel.getViewModel(), scheduler = selectionModel.view.ownerGrid; infopanelVM.set({ @@ -27,7 +27,7 @@ Ext.define('App.view.ViewportController', { onEventDeselect : function () { var refs = this.getReferences(), - infopanelVM = refs.infopanelamended.getViewModel(); + infopanelVM = refs.infopanel.getViewModel(); infopanelVM.set({ 'eventRecord' : null, @@ -46,7 +46,7 @@ Ext.define('App.view.ViewportController', { onResourceFilterChange : function (combo, selectedResourceIds) { // Both schedulers share store, so we can use event store from any of them - var eventStore = this.getReferences().schedulerAmended.eventStore; + var eventStore = this.getReferences().scheduler.eventStore; //true to avoid double full view repaints eventStore.clearFilter(true); diff --git a/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js index a9c2361ba..a97b77558 100644 --- a/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/ViewportControllerAmended.js @@ -46,7 +46,7 @@ Ext.define('App.view.ViewportControllerAmended', { onResourceFilterChange : function (combo, selectedResourceIds) { // Both schedulers share store, so we can use event store from any of them - var eventStore = this.getReferences().scheduler.eventStore; + var eventStore = this.getReferences().schedulerAmended.eventStore; //true to avoid double full view repaints eventStore.clearFilter(true); From 6e40dfb0c8dc2ff2b4994f5d489b042ca2915b37 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 27 Apr 2023 18:06:40 -0700 Subject: [PATCH 18/45] Modified extscheduler program to include dependency files. --- .../resources/web/extscheduler/App/view/HeaderAmended.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js index 7d299f1ef..6305121fd 100644 --- a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -4,7 +4,7 @@ Ext.define('App.view.HeaderAmended', { cls : 'app-header', height : 40, padding : '5 10 5 5', - tpl : 'Schedule for ; {month}{year}', + tpl : 'Schedule for : {month}{year}', // tpl : 'Schedule for {month}{year}', bind : { //each bind should have corresponding setter From f85e3990821a3aca76c6de599f940ce2895ee704 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 10 May 2023 22:29:11 -0700 Subject: [PATCH 19/45] Created new version Pathology Tissues Template import program. --- .../resources/views/NecropsyLauncher.html | 2 +- .../views/NecropsyWeeklyScheduler.html | 34 ++++--------------- .../extscheduler/App/view/HeaderAmended.js | 5 ++- 3 files changed, 11 insertions(+), 30 deletions(-) diff --git a/extscheduler/resources/views/NecropsyLauncher.html b/extscheduler/resources/views/NecropsyLauncher.html index 8351da6d4..1a6109064 100644 --- a/extscheduler/resources/views/NecropsyLauncher.html +++ b/extscheduler/resources/views/NecropsyLauncher.html @@ -28,7 +28,7 @@ }) },{ name: 'View Scheduler Resource and Events Reports', - url: LABKEY.ActionURL.buildURL('extscheduler', 'weeklyScheduler', null, { + url: LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklyScheduler', null, { // var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklySC', null, { // returnUrl: window.location.pathname + window.location.search }) diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html index b8ebbe7a6..600cef113 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.html +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -37,10 +37,10 @@

My Events

} else { - var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'NecropsyWeeklyTest', null, { + var schedulerAppLink = LABKEY.ActionURL.buildURL('extscheduler', 'WeeklyNecropsyTest', null, { returnUrl: window.location.pathname + window.location.search }); - Ext4.get('launch-link').update('Launch Scheduler'); + // Ext4.get('launch-link').update('Launch Scheduler'); } new LABKEY.QueryWebPart({ @@ -48,49 +48,27 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Resources', + columns: 'Name,color', sort: 'Name' }); var timeFrameFilter = null; var renderEventsQueryWebPart = function() { - var filters = [LABKEY.Filter.create('Owner', true, LABKEY.user.isAdmin ? LABKEY.Filter.Types.HAS_ANY_VALUE : LABKEY.Filter.Types.EQUALS)]; - if (timeFrameFilter != null) - filters.push(timeFrameFilter); + new LABKEY.QueryWebPart({ renderTo: 'events-qwp', frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - filters: filters, + columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,location', + filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], sort: 'StartDate,ResourceId,Name' }); }; - Ext4.create('Ext.form.RadioGroup', { - renderTo: 'events-radiogroup', - width: 250, - columns: 3, - items: [ - {boxLabel: 'All', name: 'timeframe', inputValue: 'All'}, - {boxLabel: 'Previous', name: 'timeframe', inputValue: 'Previous'}, - {boxLabel: 'Upcoming', name: 'timeframe', inputValue: 'Upcoming t', checked: true} - ], - listeners: { - change: function(radiogroup, newValue) - { - if (newValue.timeframe == 'Previous') - timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN); - else if (newValue.timeframe == 'Upcoming') - timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL); - else - timeFrameFilter = null; - renderEventsQueryWebPart(); - } - } - }); renderEventsQueryWebPart(); }); diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js index 6305121fd..2e15f205a 100644 --- a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -3,8 +3,11 @@ Ext.define('App.view.HeaderAmended', { alias : 'widget.appheaderAmended', cls : 'app-header', height : 40, + layout: { + pack: 'center' + }, padding : '5 10 5 5', - tpl : 'Schedule for : {month}{year}', + tpl : 'Schedule for : {month}{year}', // tpl : 'Schedule for {month}{year}', bind : { //each bind should have corresponding setter From 6c52ae2a3bfec11dff85ade6745f4aacc7af8ac7 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 26 May 2023 21:07:25 -0700 Subject: [PATCH 20/45] Modified scheduler program. --- extscheduler/resources/views/weeklyNecropsyTest.view.xml | 9 +-------- extscheduler/resources/views/weeklyTest.html | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/extscheduler/resources/views/weeklyNecropsyTest.view.xml b/extscheduler/resources/views/weeklyNecropsyTest.view.xml index 480f2b6e3..72702ddb4 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.view.xml +++ b/extscheduler/resources/views/weeklyNecropsyTest.view.xml @@ -2,13 +2,6 @@ - - - - - - - - + \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index 7d98e834d..0e1c213f5 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -1,4 +1,4 @@ - +g From f0f05051760f1af36aa17c7d271a108976087abf Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:59:14 -0700 Subject: [PATCH 21/45] Modified Necropsy scheduler --- extscheduler/resources/views/NecropsyWeeklyScheduler.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html index 600cef113..7ea22d9a4 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.html +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -62,7 +62,7 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,location', + columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,fasting,delivery,location', filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], sort: 'StartDate,ResourceId,Name' }); From 1746b9c1d2e78eb51bbe5a6aa73019faec074d84 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Mon, 12 Jun 2023 16:18:53 -0700 Subject: [PATCH 22/45] Modified Necropsy scheduler --- extscheduler/resources/views/weeklyNecropsyTest.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html index 8b53a8674..6bca0c96c 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.html +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -82,7 +82,7 @@ LABKEY.Query.selectRows({ schemaName: 'extscheduler', queryName: 'Events', - columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,project,location', + columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,project,fasting,delivery,location', success: function(data){ // need to convert the date fields from a string to JS Date object From 004fa6f37a456b0adc09888ef661136ed0540ab0 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:03:03 -0700 Subject: [PATCH 23/45] Modified Necropsy scheduler --- extscheduler/resources/module.xml | 2 +- .../sqlserver/extscheduler-21.002-21.003.sql | 16 +++++++++ .../resources/schemas/extscheduler.xml | 17 ++++++++-- .../views/NecropsyWeeklyScheduler.html | 2 +- .../views/NecropsyWeeklyScheduler.webart.xml | 3 -- .../views/NecropsyWeeklyScheduler.webpart.xml | 1 - .../resources/views/weeklyNecropsyTest.html | 2 +- .../extscheduler/App/view/EventFormAmended.js | 33 +++++++++---------- .../extscheduler/App/view/SchedulerAmended.js | 7 ++-- .../extscheduler/ExtSchedulerModule.java | 2 +- 10 files changed, 55 insertions(+), 30 deletions(-) create mode 100644 extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql delete mode 100644 extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml diff --git a/extscheduler/resources/module.xml b/extscheduler/resources/module.xml index ba2e743f0..8313e9f71 100644 --- a/extscheduler/resources/module.xml +++ b/extscheduler/resources/module.xml @@ -23,7 +23,7 @@ A comma separated list of column names to display for the EventForm.js file. Column Names(Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate) true true - Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate,project,location,fasting,deliveryrequest + Name,ResourceId,UserId,Alias,Quantity,Comments,StartDate,EndDate,project,fasting,delivery,remainingtissues,animalid ADMIN diff --git a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql new file mode 100644 index 000000000..70c285fed --- /dev/null +++ b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql @@ -0,0 +1,16 @@ +-- Created: 6-13-2023 R. Blasa + +ALTER TABLE extscheduler.Events ADD fasting VARCHAR(500); +GO + +ALTER TABLE extscheduler.Events ADD delivery VARCHAR(500); +GO + +ALTER TABLE extscheduler.Events ADD project INT; +GO + +ALTER TABLE extscheduler.Events ADD remainingtissues VARCHAR(500); +GO + +ALTER TABLE extscheduler.Events ADD animalid VARCHAR(50); +GO \ No newline at end of file diff --git a/extscheduler/resources/schemas/extscheduler.xml b/extscheduler/resources/schemas/extscheduler.xml index 67b1b9e4a..de00d5026 100644 --- a/extscheduler/resources/schemas/extscheduler.xml +++ b/extscheduler/resources/schemas/extscheduler.xml @@ -54,8 +54,21 @@ - - + + true + + + true + + + true + + + true + + + true + User diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.html b/extscheduler/resources/views/NecropsyWeeklyScheduler.html index 7ea22d9a4..e5db6ac3c 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.html +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.html @@ -62,7 +62,7 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,fasting,delivery,location', + columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,fasting,delivery,animalid,remainingtissues', filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], sort: 'StartDate,ResourceId,Name' }); diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml deleted file mode 100644 index 9553e6720..000000000 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.webart.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml b/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml index 13d89e219..4a619a188 100644 --- a/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml +++ b/extscheduler/resources/views/NecropsyWeeklyScheduler.webpart.xml @@ -1,6 +1,5 @@ - diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html index 6bca0c96c..d643e5bfd 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.html +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -82,7 +82,7 @@ LABKEY.Query.selectRows({ schemaName: 'extscheduler', queryName: 'Events', - columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,Quantity,project,fasting,delivery,location', + columns: 'Id,ResourceId,Name,StartDate,EndDate,UserId,Alias,Owner,Comments,project,fasting,delivery,animalid,remainingtissues', success: function(data){ // need to convert the date fields from a string to JS Date object diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index 60420dea3..f1f6d0fb0 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -33,7 +33,6 @@ Ext.define('App.view.EventFormAmended', { bind : { value : '{eventRecord.ResourceId}', readOnly : !this.editable - } }, @@ -41,12 +40,12 @@ Ext.define('App.view.EventFormAmended', { xtype : 'textfield', fieldLabel : 'Animal ID', name : 'Alias', - reference : 'eventAliasField', + reference : 'eventAnimalIDField', //allowBlank : !this.editable, allowBlank: true, - hidden : this.eventFormColumns.indexOf('Alias') === -1, + hidden : this.eventFormColumns.indexOf('animalid') === -1, bind : { - value : '{eventRecord.Alias}', + value : '{eventRecord.animalid}', readOnly : !this.editable } }, @@ -73,8 +72,8 @@ Ext.define('App.view.EventFormAmended', { width: 120, height: 20, fieldLabel : 'Type of Fasting Requested', - name : 'Fasting', - reference : 'eventFastimgField', + name : 'fasting', + reference : 'eventFastingField', style: 'margin-top: 20px;', allowBlank : true, hidden : this.eventFormColumns.indexOf('fasting') === -1, @@ -89,29 +88,29 @@ Ext.define('App.view.EventFormAmended', { width: 120, height: 20, fieldLabel : 'Animal Delivery Requested', - name : 'deliveryrequest', - reference : 'eventDeliveryRequestField', + name : 'delivery', + reference : 'eventDeliveryField', style: 'margin-top: 20px;', allowBlank : true, - hidden : this.eventFormColumns.indexOf('deliveryrequest') === -1, + hidden : this.eventFormColumns.indexOf('delivery') === -1, bind : { - value : '{eventRecord.deliveryrequestt}', + value : '{eventRecord.delivery}', readOnly : !this.editable } }, { xtype : 'textfield', labelAlign: 'top', - width: 320, + width: 50, height: 20, - fieldLabel : 'Necropsy Location', - name : 'location', - reference : 'eventLocationField', + fieldLabel : 'Remaining Tissues Available for Distribution', + name : 'remainingtissues', + reference : 'eventRemainingTissuesField', style: 'margin-top: 20px;', allowBlank : true, - hidden : this.eventFormColumns.indexOf('location') === -1, + hidden : this.eventFormColumns.indexOf('remainingtissues') === -1, bind : { - value : '{eventRecord.location}', + value : '{eventRecord.remainingtissues}', readOnly : !this.editable } }, @@ -120,7 +119,7 @@ Ext.define('App.view.EventFormAmended', { labelAlign: 'top', width: 320, height: 50, - fieldLabel: 'CommentsXX', + fieldLabel: 'Comments', name: 'Comments', reference: 'eventCommentsField', style: 'margin-top: 20px;', diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js index af45073b6..011897a9b 100644 --- a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -15,7 +15,7 @@ Ext.define('App.view.SchedulerAmended', { calendarViewPreset : 'week', mode : 'calendar', eventResizeHandles : 'none', - eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{Location:htmlEncode}', + eventBodyTemplate :'{ResourceName:htmlEncode}
{Alias:htmlEncode}
{Project:htmlEncode}
{fasting:htmlEncode}
{delivery:htmlEncode}', snapToIncrement : true, allowOverlap : true, highlightCurrentTime : true, @@ -69,8 +69,9 @@ Ext.define('App.view.SchedulerAmended', { data.style = 'background-color:' + resource.get('Color'); event.data['ResourceName'] = resource.get('Name'); event.data['Project'] = event.get('project'); - event.data['Location'] = event.get('location'); - event.data['Alias'] = event.get('Alias'); + event.data['fasting'] = event.get('fasting'); + event.data['delivery'] = event.get('delivery'); + // event.data['Alias'] = event.get('Alias'); var userRecord = Ext.getStore('users').findRecord('UserId', event.get('UserId')); event.data['UserDisplayName'] = userRecord != null ? userRecord.get('DisplayName') : event.get('UserId'); return event.data; diff --git a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java index 6c003146d..2022a31ab 100644 --- a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java +++ b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java @@ -35,7 +35,7 @@ public String getName() @Override public @Nullable Double getSchemaVersion() { - return 21.002; + return 21.003; } @Override From efb7af535a16382fee2d7c2ebd539f9002c95458 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:06:33 -0700 Subject: [PATCH 24/45] Modified Necropsy scheduler --- .../resources/web/extscheduler/App/view/InfoPanelAmended.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js index 6e9676be2..021c03bc8 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -16,7 +16,7 @@ Ext.define('App.view.InfoPanelAmended', { items : [ { xtype : 'eventformAmended', - title : 'Necropsy Calendar Schedule', + title : 'Necropsy Calendar Scheduler', editable : false } From 9d10062ee60dddba931494907fb1632f38ac367d Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:11:21 -0700 Subject: [PATCH 25/45] Modified Necropsy scheduler --- .../schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql index 70c285fed..6f597fb63 100644 --- a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql +++ b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql @@ -9,7 +9,7 @@ GO ALTER TABLE extscheduler.Events ADD project INT; GO -ALTER TABLE extscheduler.Events ADD remainingtissues VARCHAR(500); +ALTER TABLE extscheduler.Events ADD remainingtissues VARCHAR(50); GO ALTER TABLE extscheduler.Events ADD animalid VARCHAR(50); From fd89ecffa137742a66c5d2ca1894e674b2febddc Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Wed, 14 Jun 2023 20:13:35 -0700 Subject: [PATCH 26/45] Modified Necropsy scheduler --- .../extscheduler/ExtSchedulerModule.java | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java index 2022a31ab..ce20622b0 100644 --- a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java +++ b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java @@ -3,19 +3,11 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import org.labkey.api.data.ContainerManager; import org.labkey.api.ldk.ExtendedSimpleModule; import org.labkey.api.module.Module; -import org.labkey.api.module.ModuleContext; import org.labkey.api.query.DefaultSchema; -import org.labkey.api.query.DetailsURL; import org.labkey.api.query.QuerySchema; -import org.labkey.api.resource.Resource; -import org.labkey.api.security.permissions.AdminPermission; -import org.labkey.api.settings.AdminConsole; -import org.labkey.api.view.template.ClientDependency; import org.labkey.extscheduler.query.ExtSchedulerQuerySchema; -//import org.labkey.api.ehr.EHRService; import java.util.Collection; import java.util.Collections; @@ -69,15 +61,4 @@ public QuerySchema createSchema(final DefaultSchema schema, Module module) } }); } - - @Override - protected void doStartupAfterSpringConfig(ModuleContext moduleContext) - { - //Added 4-19-2023 R.Blasa -// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/EventFormAmended.js"), this); -// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/ViewportAmended.js"), this); -// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/InfoPanelAmended.js"), this); -// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/SchedulerAmended.js"), this); -// EHRService.get().registerClientDependency(ClientDependency.supplierFromPath("extscheduler/App/view/ViewportControllerAmended.js"), this); - } } From 90b6f18faf02d7c5b1323de4819dd71f7a39eebb Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:41:40 -0700 Subject: [PATCH 27/45] Modified Pathology scheduler --- .../resources/views/weeklyNecropsyTest.html | 26 ++++++++++++++++++- .../extscheduler/App/view/EventFormAmended.js | 2 +- .../web/extscheduler/App/view/ProjectCombo.js | 10 +++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html index d643e5bfd..4e5acb9b7 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.html +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -42,6 +42,7 @@ 'HeaderAmended', 'InfoPanelAmended', 'NavigationBarAmended', + 'ProjectCombo', 'ResourceCombo', 'Resources', 'SchedulerAmended', @@ -53,7 +54,11 @@ var queryStoreData = function() { - var resourceStore = null, eventStore = null, userStore = null; + + var resourceStore = null, eventStore = null, userStore = null, projectStore = null; + + + var container = '/ONPRC/EHR'; // query to get the resource store data LABKEY.Query.selectRows({ @@ -78,6 +83,25 @@ } }); + LABKEY.Query.selectRows({ + containerPath: container, + schemaName: 'ehr', + queryName: 'project', + columns: 'project, displayName, enddateCoalesced', + filterArray: [LABKEY.Filter.create('enddateCoalesced', '-0d', LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], + success: function(data) { + projectStore = Ext.create('Sch.data.ProjectStore', { + model : 'Sch.model.Project', + storeId : 'projectst', // referenced by this store id in Scheduler.js, etc. + data : data.rows + }); + if (resourceStore != null && eventStore != null && projectStore != null) { + initScheduler(); + } + + } + }); + // query to get the event store data LABKEY.Query.selectRows({ schemaName: 'extscheduler', diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index f1f6d0fb0..14577fa98 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -51,7 +51,7 @@ Ext.define('App.view.EventFormAmended', { }, { - xtype : 'textfield', + xtype : 'projectcombo', labelAlign: 'left', width: 120, height: 20, diff --git a/extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js b/extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js new file mode 100644 index 000000000..7161a3df5 --- /dev/null +++ b/extscheduler/resources/web/extscheduler/App/view/ProjectCombo.js @@ -0,0 +1,10 @@ + +Ext.define('App.view.ProjectCombo', { + extend : 'Ext.form.field.ComboBox', + alias : 'widget.projectcombo', + store : 'projectst', + queryMode : 'local', + valueField : 'project', + displayField : 'displayName', + editable : false +}); \ No newline at end of file From bfade6f1d4fa634438caef13a449126816f7cfae Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:52:44 -0700 Subject: [PATCH 28/45] Modified Pathology scheduler --- extscheduler/resources/views/schedulertest.html | 1 - 1 file changed, 1 deletion(-) diff --git a/extscheduler/resources/views/schedulertest.html b/extscheduler/resources/views/schedulertest.html index e8bd161bd..04a44fdec 100644 --- a/extscheduler/resources/views/schedulertest.html +++ b/extscheduler/resources/views/schedulertest.html @@ -5,7 +5,6 @@ Simple Ext Demo - From 828afdcb813ce661aebd4924b8f2872f0b9f3efe Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:54:43 -0700 Subject: [PATCH 29/45] Modified Pathology scheduler --- .../resources/views/weeklyScheduler.html | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/extscheduler/resources/views/weeklyScheduler.html b/extscheduler/resources/views/weeklyScheduler.html index fffd2b662..c65675853 100644 --- a/extscheduler/resources/views/weeklyScheduler.html +++ b/extscheduler/resources/views/weeklyScheduler.html @@ -48,27 +48,49 @@

My Events

frame: 'none', schemaName: 'extscheduler', queryName: 'Resources', - columns: 'Name,color', sort: 'Name' }); var timeFrameFilter = null; var renderEventsQueryWebPart = function() { - + var filters = [LABKEY.Filter.create('Owner', true, LABKEY.user.isAdmin ? LABKEY.Filter.Types.HAS_ANY_VALUE : LABKEY.Filter.Types.EQUALS)]; + if (timeFrameFilter != null) + filters.push(timeFrameFilter); new LABKEY.QueryWebPart({ renderTo: 'events-qwp', frame: 'none', schemaName: 'extscheduler', queryName: 'Events', - columns: 'resouceId,Name,StartDate,EndDate,Alias,Comments,project,location', - filterArray: [LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], + filters: filters, sort: 'StartDate,ResourceId,Name' }); }; + Ext4.create('Ext.form.RadioGroup', { + renderTo: 'events-radiogroup', + width: 250, + columns: 3, + items: [ + {boxLabel: 'All', name: 'timeframe', inputValue: 'All', checked: true}, + {boxLabel: 'Previous', name: 'timeframe', inputValue: 'Previous'}, + {boxLabel: 'Upcoming', name: 'timeframe', inputValue: 'Upcoming'} + ], + listeners: { + change: function(radiogroup, newValue) + { + if (newValue.timeframe == 'Previous') + timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_LESS_THAN); + else if (newValue.timeframe == 'Upcoming') + timeFrameFilter = LABKEY.Filter.create('StartDate', new Date(), LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL); + else + timeFrameFilter = null; + renderEventsQueryWebPart(); + } + } + }); renderEventsQueryWebPart(); }); From 2783a7dba92d8a0fad5a36dd9d03787b6b8ca199 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 27 Jun 2023 12:58:03 -0700 Subject: [PATCH 30/45] Modified Pathology scheduler --- extscheduler/resources/views/weeklyTest.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/views/weeklyTest.html b/extscheduler/resources/views/weeklyTest.html index 0e1c213f5..7d98e834d 100644 --- a/extscheduler/resources/views/weeklyTest.html +++ b/extscheduler/resources/views/weeklyTest.html @@ -1,4 +1,4 @@ -g + From 867baf8a259ab5f39d166705371d5a0973a2fd62 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 27 Jun 2023 13:26:03 -0700 Subject: [PATCH 31/45] Modified Pathology scheduler --- extscheduler/resources/schemas/extscheduler.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/extscheduler/resources/schemas/extscheduler.xml b/extscheduler/resources/schemas/extscheduler.xml index de00d5026..17f1ba6b6 100644 --- a/extscheduler/resources/schemas/extscheduler.xml +++ b/extscheduler/resources/schemas/extscheduler.xml @@ -55,7 +55,14 @@ + Center Project true + + /ONPRC/EHR + project + ehr + project + true From 2c9acbfb3d0ef4649cb929ba804a37d35a1db7a3 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:42:12 -0800 Subject: [PATCH 32/45] Modified Path Tissue input form to validate blank input fields. --- .../test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java index 0d19ff737..bc4ce490f 100644 --- a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java +++ b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java @@ -1858,7 +1858,7 @@ public void testNecropsyRequestFlow() throws IOException, CommandException String animalId = "12345"; LocalDateTime tomorrow = LocalDateTime.now().plusDays(1); LocalDateTime dayAfterTomorrow = LocalDateTime.now().plusDays(2); - String projectId = "640991"; + String projectId = "625"; DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd"); InsertRowsCommand protocolCommand = new InsertRowsCommand("onprc_billing", "chargeableItems"); From 0c15190cc467769a3517ec07d6791c418dbc2cf6 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:58:23 -0800 Subject: [PATCH 33/45] Modified Path Tissue input form to validate blank input fields. --- .../test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java index bc4ce490f..0d19ff737 100644 --- a/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java +++ b/onprc_ehr/test/src/org/labkey/test/tests/onprc_ehr/ONPRC_EHRTest.java @@ -1858,7 +1858,7 @@ public void testNecropsyRequestFlow() throws IOException, CommandException String animalId = "12345"; LocalDateTime tomorrow = LocalDateTime.now().plusDays(1); LocalDateTime dayAfterTomorrow = LocalDateTime.now().plusDays(2); - String projectId = "625"; + String projectId = "640991"; DateTimeFormatter formatter2 = DateTimeFormatter.ofPattern("yyyy-MM-dd"); InsertRowsCommand protocolCommand = new InsertRowsCommand("onprc_billing", "chargeableItems"); From a6ba3e98a190ccc46bd67cd39eb818bfd996c8fc Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:24:48 -0800 Subject: [PATCH 34/45] Modified Necropsy scheduler. --- .../resources/views/weeklyNecropsyTest.html | 25 +----------- .../extscheduler/App/view/EventFormAmended.js | 40 +++++++++---------- .../extscheduler/App/view/HeaderAmended.js | 18 ++++----- .../extscheduler/App/view/InfoPanelAmended.js | 5 +-- .../App/view/InfoPanelModelAmended.js | 2 +- .../extscheduler/App/view/SchedulerAmended.js | 4 +- 6 files changed, 35 insertions(+), 59 deletions(-) diff --git a/extscheduler/resources/views/weeklyNecropsyTest.html b/extscheduler/resources/views/weeklyNecropsyTest.html index 4e5acb9b7..0604cdab3 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.html +++ b/extscheduler/resources/views/weeklyNecropsyTest.html @@ -54,11 +54,7 @@ var queryStoreData = function() { - - var resourceStore = null, eventStore = null, userStore = null, projectStore = null; - - - var container = '/ONPRC/EHR'; + var resourceStore = null, eventStore = null, userStore = null; // query to get the resource store data LABKEY.Query.selectRows({ @@ -83,25 +79,6 @@ } }); - LABKEY.Query.selectRows({ - containerPath: container, - schemaName: 'ehr', - queryName: 'project', - columns: 'project, displayName, enddateCoalesced', - filterArray: [LABKEY.Filter.create('enddateCoalesced', '-0d', LABKEY.Filter.Types.DATE_GREATER_THAN_OR_EQUAL)], - success: function(data) { - projectStore = Ext.create('Sch.data.ProjectStore', { - model : 'Sch.model.Project', - storeId : 'projectst', // referenced by this store id in Scheduler.js, etc. - data : data.rows - }); - if (resourceStore != null && eventStore != null && projectStore != null) { - initScheduler(); - } - - } - }); - // query to get the event store data LABKEY.Query.selectRows({ schemaName: 'extscheduler', diff --git a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js index 14577fa98..d60041774 100644 --- a/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/EventFormAmended.js @@ -40,18 +40,18 @@ Ext.define('App.view.EventFormAmended', { xtype : 'textfield', fieldLabel : 'Animal ID', name : 'Alias', - reference : 'eventAnimalIDField', + reference : 'eventAliasField', //allowBlank : !this.editable, allowBlank: true, - hidden : this.eventFormColumns.indexOf('animalid') === -1, + hidden : this.eventFormColumns.indexOf('Alias') === -1, bind : { - value : '{eventRecord.animalid}', + value : '{eventRecord.Alias}', readOnly : !this.editable } }, { - xtype : 'projectcombo', + xtype : 'textfield', labelAlign: 'left', width: 120, height: 20, @@ -98,22 +98,22 @@ Ext.define('App.view.EventFormAmended', { readOnly : !this.editable } }, - { - xtype : 'textfield', - labelAlign: 'top', - width: 50, - height: 20, - fieldLabel : 'Remaining Tissues Available for Distribution', - name : 'remainingtissues', - reference : 'eventRemainingTissuesField', - style: 'margin-top: 20px;', - allowBlank : true, - hidden : this.eventFormColumns.indexOf('remainingtissues') === -1, - bind : { - value : '{eventRecord.remainingtissues}', - readOnly : !this.editable - } - }, + // { + // xtype : 'textfield', + // labelAlign: 'top', + // width: 320, + // height: 20, + // fieldLabel : 'Necropsy Location', + // name : 'location', + // reference : 'eventLocationField', + // style: 'margin-top: 20px;', + // allowBlank : true, + // hidden : this.eventFormColumns.indexOf('location') === -1, + // bind : { + // value : '{eventRecord.location}', + // readOnly : !this.editable + // } + // }, { xtype: 'textarea', labelAlign: 'top', diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js index 2e15f205a..3475ea175 100644 --- a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -13,12 +13,12 @@ Ext.define('App.view.HeaderAmended', { //each bind should have corresponding setter date: '{endDate}' }, - setDate : function (date) { - this.setData( - { - month : Ext.Date.format(date, 'F'), - year : Ext.Date.format(date, 'Y') - } - ); - } -}); \ No newline at end of file + items : [ + { + xtype : 'eventformAmended', + title : 'Necropsy Calendar Schedule', + editable : false + } + + ] +}); diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js index 021c03bc8..d86196a5a 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelAmended.js @@ -1,4 +1,3 @@ - Ext.define('App.view.InfoPanelAmended', { extend : 'Ext.Container', alias : 'widget.infopanelAmended', @@ -16,9 +15,9 @@ Ext.define('App.view.InfoPanelAmended', { items : [ { xtype : 'eventformAmended', - title : 'Necropsy Calendar Scheduler', + title : 'Necropsy Calendar Schedule', editable : false } ] -}); \ No newline at end of file +}); diff --git a/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js index f7587f061..91c8680db 100644 --- a/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/InfoPanelModelAmended.js @@ -106,4 +106,4 @@ Ext.define('App.view.InfoPanelModelAmended', { return get('defaultMinTime'); } } -}); \ No newline at end of file +}); diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js index 011897a9b..62049393b 100644 --- a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -66,7 +66,7 @@ Ext.define('App.view.SchedulerAmended', { ], eventRenderer : function (event, resource, data) { - data.style = 'background-color:' + resource.get('Color'); + data.style = 'border-color:' + resource.get('Color'); event.data['ResourceName'] = resource.get('Name'); event.data['Project'] = event.get('project'); event.data['fasting'] = event.get('fasting'); @@ -80,4 +80,4 @@ Ext.define('App.view.SchedulerAmended', { onEventCreated : function (newEventRecord) { this.getEventSelectionModel().select(newEventRecord); } -}); \ No newline at end of file +}); From 6157d5f4dcb44051ff0f02f4ae28b21b67242588 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 30 Nov 2023 13:39:02 -0800 Subject: [PATCH 35/45] Modified Necropsy scheduler. --- .../web/extscheduler/App/view/HeaderAmended.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js index 3475ea175..6418b2864 100644 --- a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -13,12 +13,12 @@ Ext.define('App.view.HeaderAmended', { //each bind should have corresponding setter date: '{endDate}' }, - items : [ - { - xtype : 'eventformAmended', - title : 'Necropsy Calendar Schedule', - editable : false - } - - ] + setDate : function (date) { + this.setData( + { + month : Ext.Date.format(date, 'F'), + year : Ext.Date.format(date, 'Y') + } + ); + } }); From abbf1398e54e64ce620abb1722092c5a63169152 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 30 Nov 2023 23:23:21 -0800 Subject: [PATCH 36/45] Modified Necropsy scheduler. --- .../views/weeklyNecropsyTest.view.xml | 2 +- .../web/extscheduler/App/view/Header.js | 2 +- .../extscheduler/App/view/HeaderAmended.js | 4 +- .../extscheduler/App/view/SchedulerAmended.js | 3 +- .../extscheduler/css/weeklyviewAmended.css | 121 ++++++++++++++++++ 5 files changed, 127 insertions(+), 5 deletions(-) create mode 100644 extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css diff --git a/extscheduler/resources/views/weeklyNecropsyTest.view.xml b/extscheduler/resources/views/weeklyNecropsyTest.view.xml index 72702ddb4..aaab33201 100644 --- a/extscheduler/resources/views/weeklyNecropsyTest.view.xml +++ b/extscheduler/resources/views/weeklyNecropsyTest.view.xml @@ -1,7 +1,7 @@ - + \ No newline at end of file diff --git a/extscheduler/resources/web/extscheduler/App/view/Header.js b/extscheduler/resources/web/extscheduler/App/view/Header.js index f0031d2d7..1d6b18a1f 100644 --- a/extscheduler/resources/web/extscheduler/App/view/Header.js +++ b/extscheduler/resources/web/extscheduler/App/view/Header.js @@ -4,7 +4,7 @@ Ext.define('App.view.Header', { cls : 'app-header', height : 40, padding : '5 10 5 5', - tpl : 'Schedule for {month}{year}', + tpl : 'Schedule for: {month}{year}', bind : { //each bind should have corresponding setter date: '{endDate}' diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js index 6418b2864..55f6e2c8b 100644 --- a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -7,8 +7,8 @@ Ext.define('App.view.HeaderAmended', { pack: 'center' }, padding : '5 10 5 5', - tpl : 'Schedule for : {month}{year}', - // tpl : 'Schedule for {month}{year}', + // tpl : 'Schedule for : {month}{year}', + tpl : 'Schedule for {month}{year}', bind : { //each bind should have corresponding setter date: '{endDate}' diff --git a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js index 62049393b..ecebe4744 100644 --- a/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/SchedulerAmended.js @@ -66,7 +66,8 @@ Ext.define('App.view.SchedulerAmended', { ], eventRenderer : function (event, resource, data) { - data.style = 'border-color:' + resource.get('Color'); + data.style = 'background-image:linear-gradient(45deg, #fdfefe, #8c001a)'; + // data.style = 'background-color:' + resource.get('Color'); event.data['ResourceName'] = resource.get('Name'); event.data['Project'] = event.get('project'); event.data['fasting'] = event.get('fasting'); diff --git a/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css new file mode 100644 index 000000000..0a5accfa9 --- /dev/null +++ b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css @@ -0,0 +1,121 @@ +.app-header { + background : transparent; + color : #0072BB; + font-size : 1.5em; + line-height : 1.4; + padding-left : 80px !important; +} +.header-month { + font-weight : bold; + color:blue; + font-size: 24px; + margin-right : 20px; +} + +.header-year { + font-weight : bold; + font-size: 24px; + color:blue; +} + + + + +.infopanel { + border-top : 1px solid #d0d0d0;, +} + +.infopanel, +.infopanel .x-panel-body, +.infopanel .x-panel-header-default { + background : transparent; +} + +.resources .x-panel-header-default { + padding-top : 0; +} + +.resources .x-form-cb-label { + cursor: pointer; +} + +.infopanel .x-title-text { + color : #999; +} + + + +.navigationbar { + background : #0072BB; +} + +.navigationbar .x-btn { + background : transparent !important; + border : 0 none !important; +} + +.navigationbar .x-title-text { + color : #fff; + font-size : 1.4em; + line-height : 1.5; + padding-left : 5px; +} + + +.resources .x-form-cb-label { + color : #404040 !important; + line-height : 25px; +} + +.resources .x-form-checkbox { + color : inherit; + font-family : FontAwesome !important; + font-size : 25px; + height : 25px; + width : 25px; + cursor : pointer; +} + +.resources .x-form-checkbox-focus { + color: inherit !important; +} + +.resources .x-form-checkbox:before { + content : "\f096"; +} + +.resources .x-form-cb-checked .x-form-checkbox:before { + content : "\f0c8"; +} + +.resources .x-form-item-body-default.x-form-checkboxgroup-body { + padding-left : 0; + padding-right : 0; +} + + +/*.sch-event {*/ +/* background-color : #fff !important;*/ +/* color : #777 !important;*/ +/* border-left : 7px solid #fff;*/ +/*}*/ + +/*.sch-event.sch-event-selected,*/ +/*.sch-event.sch-event-hover {*/ +/* color : #222 !important;*/ +/* background-color : #fff !important;*/ +/* border-left : 7px solid #fff;*/ +/* box-shadow : 1px 1px 10px rgba(0, 0, 0, 0.1);*/ +/*}*/ + +/*.sch-event-inner {*/ +/* padding : 2px 4px;*/ +/* font-size : 1.1em;*/ +/*}*/ + + + + +body.x-body { + background : #f5f5f5; +} \ No newline at end of file From 9f71460d93b2f2856c20b5d43cec08c2dd320d19 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Thu, 30 Nov 2023 23:59:29 -0800 Subject: [PATCH 37/45] Modified Necropsy scheduler. --- .../extscheduler/App/view/HeaderAmended.js | 2 +- .../extscheduler/css/weeklyviewAmended.css | 79 ++++--------------- 2 files changed, 15 insertions(+), 66 deletions(-) diff --git a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js index 55f6e2c8b..3a1f03617 100644 --- a/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/HeaderAmended.js @@ -1,7 +1,7 @@ Ext.define('App.view.HeaderAmended', { extend : 'Ext.panel.Header', alias : 'widget.appheaderAmended', - cls : 'app-header', + cls : 'app-headeramended', height : 40, layout: { pack: 'center' diff --git a/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css index 0a5accfa9..ebcd42cd3 100644 --- a/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css +++ b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css @@ -1,6 +1,7 @@ -.app-header { +.app-headeramended { background : transparent; - color : #0072BB; + /*color : #0072BB;#8c001a*/ + color : #8c001a; font-size : 1.5em; line-height : 1.4; padding-left : 80px !important; @@ -19,15 +20,13 @@ } +/*.infopanelamended {*/ +/* border-top : 1px solid #d0d0d0;,*/ +/*}*/ - -.infopanel { - border-top : 1px solid #d0d0d0;, -} - -.infopanel, -.infopanel .x-panel-body, -.infopanel .x-panel-header-default { +.infopanelamended, +.infopanelamended .x-panel-body, +.infopanelamended .x-panel-header-default { background : transparent; } @@ -39,22 +38,23 @@ cursor: pointer; } -.infopanel .x-title-text { +.infopanelamended .x-title-text { color : #999; + /*color : #8c001a;*/ } -.navigationbar { +.navigationbarAmended { background : #0072BB; } -.navigationbar .x-btn { +.navigationbarAmended .x-btn { background : transparent !important; border : 0 none !important; } -.navigationbar .x-title-text { +.navigationbarAmended .x-title-text { color : #fff; font-size : 1.4em; line-height : 1.5; @@ -62,57 +62,6 @@ } -.resources .x-form-cb-label { - color : #404040 !important; - line-height : 25px; -} - -.resources .x-form-checkbox { - color : inherit; - font-family : FontAwesome !important; - font-size : 25px; - height : 25px; - width : 25px; - cursor : pointer; -} - -.resources .x-form-checkbox-focus { - color: inherit !important; -} - -.resources .x-form-checkbox:before { - content : "\f096"; -} - -.resources .x-form-cb-checked .x-form-checkbox:before { - content : "\f0c8"; -} - -.resources .x-form-item-body-default.x-form-checkboxgroup-body { - padding-left : 0; - padding-right : 0; -} - - -/*.sch-event {*/ -/* background-color : #fff !important;*/ -/* color : #777 !important;*/ -/* border-left : 7px solid #fff;*/ -/*}*/ - -/*.sch-event.sch-event-selected,*/ -/*.sch-event.sch-event-hover {*/ -/* color : #222 !important;*/ -/* background-color : #fff !important;*/ -/* border-left : 7px solid #fff;*/ -/* box-shadow : 1px 1px 10px rgba(0, 0, 0, 0.1);*/ -/*}*/ - -/*.sch-event-inner {*/ -/* padding : 2px 4px;*/ -/* font-size : 1.1em;*/ -/*}*/ - From 150f4a1e3a5e94eb85e274a7c14b983a6d8232b6 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 1 Dec 2023 00:16:30 -0800 Subject: [PATCH 38/45] Modified Necropsy scheduler. --- .../resources/web/extscheduler/App/view/NavigationBarAmended.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js index 5bc5bed8d..fb5988e62 100644 --- a/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js +++ b/extscheduler/resources/web/extscheduler/App/view/NavigationBarAmended.js @@ -1,7 +1,7 @@ Ext.define('App.view.NavigationBarAmended', { extend : 'Ext.panel.Header', alias : 'widget.navigationbarAmended', - cls : 'navigationbar', + cls : 'navigationbarAmended', // padding : '0 10 0 5', height : 0, border : false, From 2c8d408b26c086dad3ae4b67a09b3ac4cf9124cc Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 1 Dec 2023 11:51:59 -0800 Subject: [PATCH 39/45] Modified Necropsy scheduler. --- .../web/extscheduler/css/weeklyviewAmended.css | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css index ebcd42cd3..d853e2290 100644 --- a/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css +++ b/extscheduler/resources/web/extscheduler/css/weeklyviewAmended.css @@ -1,7 +1,6 @@ .app-headeramended { background : transparent; - /*color : #0072BB;#8c001a*/ - color : #8c001a; + color : #0072BB; font-size : 1.5em; line-height : 1.4; padding-left : 80px !important; @@ -20,9 +19,9 @@ } -/*.infopanelamended {*/ -/* border-top : 1px solid #d0d0d0;,*/ -/*}*/ +.infopanelamended { + border-top : 1px solid #d0d0d0;, +} .infopanelamended, .infopanelamended .x-panel-body, @@ -45,11 +44,11 @@ -.navigationbarAmended { +.navigationbaramended { background : #0072BB; } -.navigationbarAmended .x-btn { +.navigationbaramended .x-btn { background : transparent !important; border : 0 none !important; } From 765e2165d3a6990d9a9a3e5bc2246f9131377b70 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 1 Dec 2023 12:01:01 -0800 Subject: [PATCH 40/45] Modified Necropsy scheduler. --- .../sqlserver/extscheduler-23.002-23.003.sql | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql diff --git a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql new file mode 100644 index 000000000..6f597fb63 --- /dev/null +++ b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-23.002-23.003.sql @@ -0,0 +1,16 @@ +-- Created: 6-13-2023 R. Blasa + +ALTER TABLE extscheduler.Events ADD fasting VARCHAR(500); +GO + +ALTER TABLE extscheduler.Events ADD delivery VARCHAR(500); +GO + +ALTER TABLE extscheduler.Events ADD project INT; +GO + +ALTER TABLE extscheduler.Events ADD remainingtissues VARCHAR(50); +GO + +ALTER TABLE extscheduler.Events ADD animalid VARCHAR(50); +GO \ No newline at end of file From e4bb945afde4b77e3550c17e7789b23df85cb799 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Fri, 1 Dec 2023 13:00:33 -0800 Subject: [PATCH 41/45] Modified Necropsy scheduler. --- .../sqlserver/extscheduler-21.002-21.003.sql | 16 ---------------- .../labkey/extscheduler/ExtSchedulerModule.java | 2 +- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql diff --git a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql b/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql deleted file mode 100644 index 6f597fb63..000000000 --- a/extscheduler/resources/schemas/dbscripts/sqlserver/extscheduler-21.002-21.003.sql +++ /dev/null @@ -1,16 +0,0 @@ --- Created: 6-13-2023 R. Blasa - -ALTER TABLE extscheduler.Events ADD fasting VARCHAR(500); -GO - -ALTER TABLE extscheduler.Events ADD delivery VARCHAR(500); -GO - -ALTER TABLE extscheduler.Events ADD project INT; -GO - -ALTER TABLE extscheduler.Events ADD remainingtissues VARCHAR(50); -GO - -ALTER TABLE extscheduler.Events ADD animalid VARCHAR(50); -GO \ No newline at end of file diff --git a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java index e35ac332f..50c776956 100644 --- a/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java +++ b/extscheduler/src/org/labkey/extscheduler/ExtSchedulerModule.java @@ -27,7 +27,7 @@ public String getName() @Override public @Nullable Double getSchemaVersion() { - return 21.002; + return 23.003; } @Override From 35765099626cf8f4bd43321ad02383d95a87cc40 Mon Sep 17 00:00:00 2001 From: Ohsudev <76500320+Ohsudev@users.noreply.github.com> Date: Sat, 18 Jan 2025 23:06:15 -0800 Subject: [PATCH 42/45] Modified Pathology scheduler to match previous 23.11 code. --- extscheduler/resources/views/schedulertest.html | 2 +- extscheduler/resources/views/weeklyScheduler.html | 2 +- extscheduler/resources/views/weeklyTest.html | 2 +- .../resources/web/extscheduler/App/view/InfoPanelAmended.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/extscheduler/resources/views/schedulertest.html b/extscheduler/resources/views/schedulertest.html index 64b3623fd..04a44fdec 100644 --- a/extscheduler/resources/views/schedulertest.html +++ b/extscheduler/resources/views/schedulertest.html @@ -31,7 +31,7 @@
- \ No newline at end of file diff --git a/extscheduler/resources/views/weeklyScheduler.html b/extscheduler/resources/views/weeklyScheduler.html index c65675853..7ce084c6e 100644 --- a/extscheduler/resources/views/weeklyScheduler.html +++ b/extscheduler/resources/views/weeklyScheduler.html @@ -22,7 +22,7 @@

My Events

} -