Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
* @module crm/Views/Charts/_ChartMixin
*/
import declare from 'dojo/_base/declare';
import lang from 'dojo/_base/lang';
import connect from 'dojo/_base/connect';
import domGeo from 'dojo/dom-geometry';
import domAttr from 'dojo/dom-attr';
import has from 'dojo/has';
import _PullToRefreshMixin from 'argos/_PullToRefreshMixin';
import Utility from 'argos/Utility';
import getResource from 'argos/I18n';
const resource = getResource('chartMixin');
lang.setObject('Chart.defaults.global', {
// Boolean - Whether to animate the chart
animation: false,
// Number - Number of animation steps
animationSteps: 60,
// String - Animation easing effect
animationEasing: 'easeOutQuart',
// Boolean - If we should show the scale at all
showScale: true,
// Boolean - If we want to override with a hard coded scale
scaleOverride: false,
// ** Required if scaleOverride is true **
import declare from 'dojo/_base/declare';
import lang from 'dojo/_base/lang';
import _Module from './_Module';
const __class = declare('crm.Integrations.BOE.Modules.PayFromModule', [_Module], {
init: function init() {
},
loadViews: function loadViews() {
},
loadCustomizations: function loadCustomizations() {
},
loadToolbars: function loadToolbars() {
},
});
lang.setObject('icboe.Modules.PayFromModule', __class);
export default __class;
}]);
},
formatSearchQuery: function formatSearchQuery(searchQuery) {
const q = this.escapeSearchQuery(searchQuery.toUpperCase());
return `upper(QuoteNumber) like "${q}%" or Account.AccountName like "${q}%" or ErpExtId like "${q}%"`;
},
formatErpStatus: function formatErpStatus(value) {
const text = App.picklistService.getPicklistItemTextByCode('ErpQuoteStatus', value);
if (text) {
return text;
}
return value;
},
});
lang.setObject('icboe.Views.Quotes.List', __class);
export default __class;
id: 'orderline_pricingAvailabilityLocations',
entityType: 'SalesOrderItem',
requestType: 'SalesOrderItemAvailable',
parentEntity: 'SalesOrder',
singleSelectAction: 'complete',
}));
am.registerView(new SlxLocationList());
},
loadCustomizations: function loadCustomizations() {
},
loadToolbars: function loadToolbars() {
},
});
lang.setObject('icboe.Modules.SalesOrderItemModule', __class);
export default __class;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @module crm/Aggregate
*/
import lang from 'dojo/_base/lang';
/**
* @class
* @alias module:crm/Aggregate
* @classdesc Aggregate functions. Currently used in metric widgets.
* @static
*/
const __class = lang.setObject('crm.Aggregate', /** @lends module:crm/Aggregate */{
/**
* Average
* @param {Array} data Array of objects that contain a value property
* @return {Number}
*/
avg: function avg(data) {
const aggr = window.crm.Aggregate;
const average = aggr.sum(data) / aggr.count(data);
return isNaN(average) ? 0 : average;
},
/**
* Count
* @param {Array} data Array of objects that contain a value property
* @return {Number}
*/
count: function count(data) {
type: 'ManyToOne',
parentProperty: 'ErpShipTo',
parentPropertyType: 'object',
relatedEntity: 'ERPShipTo',
}, {
name: 'ReceivableItem',
displayName: receivableItemResource.entityDisplayName,
type: 'OneToMany',
relatedEntity: 'ERPReceivableItem',
relatedProperty: 'ErpReceivable',
relatedPropertyType: 'object',
}]);
return rel;
},
});
lang.setObject('icboe.Models.ErpReceivable.Base', __class);
export default __class;
return tool.id === 'new';
},
type: 'remove',
});
am.registerCustomization('list/tools', 'salesorder_shipment_items_related', {
at: function at(tool) {
return tool.id === 'new';
},
type: 'remove',
});
},
loadToolbars: function loadToolbars() {
},
});
lang.setObject('icboe.Modules.SalesOrderModule', __class);
export default __class;
}
},
getAvailabilityView: function getAvailabilityView() {
const viewId = 'locations_quoteItemAvailabilityList';
let view = App.getView(viewId);
if (view) {
return view;
}
App.registerView(new QuoteItemAvailabilityList({ id: viewId }));
view = App.getView(viewId);
return view;
},
});
lang.setObject('icboe.Views.QuoteLines.List', __class);
export default __class;
type: 'ManyToOne',
relatedEntity: 'Return',
relatedProperty: 'ErpShipTo',
relatedPropertyType: 'object',
}, {
name: 'SyncHistory',
displayName: syncresultResource.entityDisplayName,
type: 'OneToMany',
relatedEntity: 'SyncResult',
relatedProperty: 'EntityId',
where: 'EntityType eq "ERPShipTo"',
}]);
return rel;
},
});
lang.setObject('icboe.Models.ErpShipTo.Base', __class);
export default __class;
registerDefaultViews: function registerDefaultViews() {
const self = this;
const originalGetDefaultViews = Application.prototype.getDefaultViews;
lang.extend(Application, {
getDefaultViews: function getDefaultViews() {
const views = originalGetDefaultViews.apply(this, arguments) || [];
self.modules.forEach((module) => {
module.registerDefaultViews(views);
});
return views;
},
});
},
});
lang.setObject('icboe.ApplicationModule', __class);
export default __class;