2023 walkthrough changes

This commit is contained in:
2023-11-28 14:30:02 -05:00
parent 0b236e142f
commit a4321d0a23
40 changed files with 314 additions and 231 deletions
@@ -1,10 +1,10 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
var get,
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
indexOf = [].indexOf;
import Ember from 'ember';
get = Ember.get;
({get} = Ember);
export default Ember.Component.extend({
tagName: 'span',
@@ -32,6 +32,7 @@ export default Ember.Component.extend({
set_scope_organization: function(organization) {
var organization_id;
if (organization != null) {
//organization.reload().then =>
organization_id = (organization != null ? organization.get('id') : void 0) || '';
this.set('scope_organization', organization);
this.set('filters.workflow_action_definition_organization_id', organization_id);
+11 -13
View File
@@ -1,9 +1,9 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
var get;
import Ember from 'ember';
get = Ember.get;
({get} = Ember);
export default Ember.Component.extend({
tagName: 'span',
@@ -22,17 +22,15 @@ export default Ember.Component.extend({
},
set_scope_project: function(project) {
if (project != null) {
return project.reload().then((function(_this) {
return function() {
var project_id;
project_id = (project != null ? project.get('id') : void 0) || '';
_this.set('scope_project', project);
_this.set('filters.workflow_action_definition_title_cont', '');
_this.set('filters.project_id', project_id);
_this.$('.select-project .dropdown.button').addClass('orange');
return _this.send('apply_filters');
};
})(this));
return project.reload().then(() => {
var project_id;
project_id = (project != null ? project.get('id') : void 0) || '';
this.set('scope_project', project);
this.set('filters.workflow_action_definition_title_cont', '');
this.set('filters.project_id', project_id);
this.$('.select-project .dropdown.button').addClass('orange');
return this.send('apply_filters');
});
} else {
this.setProperties({
scope_project: null,
+14 -10
View File
@@ -1,11 +1,11 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
import DS from 'ember-data';
export default Ember.Component.extend({
record: null,
project_specific: false,
record: null, // parameter
project_specific: false, // parameter
session: Ember.inject.service('session'),
classNames: ['project-aggregate-statistics', 'project-aggregate-organization-statistics'],
statistics: Ember.computed('statistics_data.isFulfilled', 'project_specific', function() {
@@ -44,6 +44,11 @@ export default Ember.Component.extend({
}
}
}
//if project_object.project and project_object.project.id isnt project.id
// target.push project_object
// project_object = {project: project}
// continue
//project_object.project = project
return target;
}),
statistics_data: Ember.computed(function() {
@@ -53,7 +58,7 @@ export default Ember.Component.extend({
}
model_name = 'panda/organization';
base_url = this.store.adapterFor(model_name).buildURL(model_name);
url = base_url + "/" + record_id + "/statistics1";
url = `${base_url}/${record_id}/statistics1`;
session = this.get('session');
store = this.store;
request = {
@@ -61,15 +66,14 @@ export default Ember.Component.extend({
contentType: "application/json",
dataType: "json"
};
//success: (response) ->
// resolve(response)
if (Ember.get(session, 'isAuthenticated')) {
session.authorize('authorizer:devise', function(key, authorization) {
var obj;
request.crossDomain = true;
return request.headers = (
obj = {},
obj["" + key] = authorization,
obj
);
return request.headers = {
[`${key}`]: authorization
};
});
}
return DS.PromiseObject.create({
+3 -3
View File
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
import config from 'ember-get-config';
@@ -7,9 +7,9 @@ export default Ember.Component.extend({
tagName: 'img',
init: function() {
var src;
src = config.environment === 'development' || config.environment === 'test' ? config.rootURL + "ember-panda/assets/" + (this.get('path')) : config.rootURL + "assets/" + (this.get('path'));
src = config.environment === 'development' || config.environment === 'test' ? `${config.rootURL}ember-panda/assets/${this.get('path')}` : `${config.rootURL}assets/${this.get('path')}`;
this.set('full_src', src);
return this._super.apply(this, arguments);
return this._super(...arguments);
},
attributeBindings: ['full_src:src']
});
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
export default Ember.Component.extend({
@@ -19,11 +19,9 @@ export default Ember.Component.extend({
return this.modal('project/edit-project-scenario', {
model: project_scenario,
closeOnOverlay: false,
destroy_callback: (function(_this) {
return function() {
return _this.set('active_project_scenario', null);
};
})(this)
destroy_callback: () => {
return this.set('active_project_scenario', null);
}
});
}
}
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
export default Ember.Component.extend({
@@ -8,6 +8,7 @@ export default Ember.Component.extend({
project_instance_action: null,
value_type: Ember.computed.alias('project_instance_action.workflow_action_definition.value_type'),
save: function() {},
// https://stackoverflow.com/questions/26967855/handling-click-and-doubleclick-on-same-view-in-emberjs
doubleClick: function() {
var eventIO;
eventIO = this.get('eventIO');
@@ -16,12 +17,17 @@ export default Ember.Component.extend({
this.set('eventIO', null);
}
if (this.get('value_type') === 'boolean') {
//@toggleProperty 'project_instance_action.boolean_value'
//@get('project_instance_action').save()
// always modal, otherwise implement authorizations overhere
return this.modal('project/edit-instance-action', {
model: this.get('project_instance_action'),
save: this.save,
close: this.save
});
} else {
// fallback to single click behaviour
return this.modal('project/edit-instance-action', {
model: this.get('project_instance_action'),
save: this.save,
@@ -52,3 +58,7 @@ export default Ember.Component.extend({
}
}
});
//edit_record: ->
// @modal 'project/edit-instance-action', model: @get('project_instance_action')
// false
+3 -3
View File
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
var Component;
import Ember from 'ember';
@@ -14,8 +14,8 @@ Component = Ember.Component.extend({
if (!(state = this.get('state'))) {
return '-';
}
return t("attributes.state." + state, {
"default": state
return t(`attributes.state.${state}`, {
default: state
});
}),
having_action: Ember.computed.bool('action'),
+2 -2
View File
@@ -1,10 +1,10 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['ui-multi-select-container'],
labelProperty: 'name',
placeholder: 'Select',
placeholder: 'Select', // can be a text or translation string: organization.select_users.placeholder => # 'Select ${models.plural.user} (%{count})'
options: [],
selected: [],
placeholder_text: Ember.computed('placeholder', function() {
+15 -10
View File
@@ -1,11 +1,11 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
import DS from 'ember-data';
export default Ember.Component.extend({
user: null,
project_specific: false,
user: null, // parameter
project_specific: false, // parameter
session: Ember.inject.service('session'),
classNames: ['project-aggregate-statistics', 'project-aggregate-user-statistics'],
statistics: Ember.computed('statistics_data.isFulfilled', 'project_specific', function() {
@@ -15,6 +15,7 @@ export default Ember.Component.extend({
return {};
}
target = {};
//states = ['pending', 'planned', 'active', 'overdue', 'inquiry', 'rejected', 'completed']
states = this.get('globals.project_instance_action.states');
project_specific = this.get('project_specific');
if (!project_specific) {
@@ -44,6 +45,11 @@ export default Ember.Component.extend({
}
}
}
//if project_object.project and project_object.project.id isnt project.id
// target.push project_object
// project_object = {project: project}
// continue
//project_object.project = project
return target;
}),
statistics_data: Ember.computed(function() {
@@ -53,7 +59,7 @@ export default Ember.Component.extend({
}
model_name = 'user';
base_url = this.store.adapterFor(model_name).buildURL(model_name);
url = base_url + "/" + user_id + "/statistics1";
url = `${base_url}/${user_id}/statistics1`;
session = this.get('session');
store = this.store;
request = {
@@ -61,15 +67,14 @@ export default Ember.Component.extend({
contentType: "application/json",
dataType: "json"
};
//success: (response) ->
// resolve(response)
if (Ember.get(session, 'isAuthenticated')) {
session.authorize('authorizer:devise', function(key, authorization) {
var obj;
request.crossDomain = true;
return request.headers = (
obj = {},
obj["" + key] = authorization,
obj
);
return request.headers = {
[`${key}`]: authorization
};
});
}
return DS.PromiseObject.create({
+18 -1
View File
@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.12.5
// Generated by CoffeeScript 2.7.0
import Ember from 'ember';
export default Ember.Component.extend({
@@ -30,3 +30,20 @@ export default Ember.Component.extend({
}
})
});
// &.date
// @extend .fa-calendar
// &.number
// @extend .fa-hashtag
// &.select
// @extend .fa-list-ul
// &.string
// @extend .fa-terminal
// &.text
// @extend .fa-sticky-note-o
// &.window_from
// @extend .fa-clock-o
// &.window_to
// @extend .fa-clock-o
// &.timestamp
// @extend .fa-clock-o