sync
This commit is contained in:
@@ -80,7 +80,7 @@ export default class AssetSelector extends OptionBase {
|
||||
super(opt);
|
||||
}
|
||||
|
||||
get title() { return this.r('P_MA_SELECTASSET', 'Select Asset') }
|
||||
get title() { return this.r('FLTL_02645', 'Select Asset') }
|
||||
|
||||
get currentAsset() { return this._var.el.grid.currentItem }
|
||||
|
||||
@@ -126,7 +126,7 @@ export default class AssetSelector extends OptionBase {
|
||||
const tabIndex = Math.max.apply(null, [...document.querySelectorAll('[tabindex]')].map(e => e.tabIndex ?? 0)) + 3;
|
||||
const inputSearch = createElement('input', input => {
|
||||
input.type = 'text';
|
||||
input.placeholder = this.r('P_SELECTASSETS_SEARCH', 'Search');
|
||||
input.placeholder = this.r('FLTL_02606', 'Search');
|
||||
input.tabIndex = tabIndex + 2;
|
||||
input.className = 'ui-input';
|
||||
input.addEventListener('keypress', e => {
|
||||
@@ -137,7 +137,7 @@ export default class AssetSelector extends OptionBase {
|
||||
});
|
||||
const checkHidden = createCheckbox({
|
||||
tabIndex: tabIndex + 3,
|
||||
label: this.r('P_SELECTASSETS_SHOWHIDDEN', 'Show Hidden'),
|
||||
label: this.r('FLTL_02768', 'Show Hidden'),
|
||||
onchange: () => this.refresh()
|
||||
});
|
||||
if (option.ignoreHidden) {
|
||||
@@ -168,14 +168,14 @@ export default class AssetSelector extends OptionBase {
|
||||
});
|
||||
const grid = new Grid(gridContent, this.r);
|
||||
grid.columns = [
|
||||
{ key: 'VIN', caption: this.r('P_SELECTASSETS_VIN', 'VIN'), width: 170 },
|
||||
{ key: 'DisplayName', caption: this.r('P_SELECTASSETS_NAME', 'Name'), width: 190 },
|
||||
{ key: 'MakeName', caption: this.r('P_SELECTASSETS_MAKE', 'Make'), width: 110, allowFilter: true },
|
||||
{ key: 'ModelName', caption: this.r('P_SELECTASSETS_MODEL', 'Model'), width: 110, allowFilter: true },
|
||||
{ key: 'TypeName', caption: this.r('P_SELECTASSETS_TYPE', 'Type'), width: 110, allowFilter: true },
|
||||
{ key: 'AcquisitionType', caption: this.r('P_MA_ACQUISITIONTYPE', 'Acquisition Type'), width: 130, allowFilter: true },
|
||||
{ key: 'AssetGroups', caption: this.r('P_MA_ASSETGROUP', 'Asset Group'), width: 150 },
|
||||
{ key: 'Jobsites', caption: this.r('P_SELECTASSETS_JOBSITE', 'Jobsite'), width: 180, filter: it => it.Jobsites?.map(s => s.Key) }
|
||||
{ key: 'VIN', caption: this.r('FLTL_03260', 'VIN'), width: 170 },
|
||||
{ key: 'DisplayName', caption: this.r('FLTL_01966', 'Name'), width: 190 },
|
||||
{ key: 'MakeName', caption: this.r('FLTL_01832', 'Make'), width: 110, allowFilter: true },
|
||||
{ key: 'ModelName', caption: this.r('FLTL_01933', 'Model'), width: 110, allowFilter: true },
|
||||
{ key: 'TypeName', caption: this.r('FLTL_03112', 'Type'), width: 110, allowFilter: true },
|
||||
{ key: 'AcquisitionType', caption: this.r('FLTL_00072', 'Acquisition Type'), width: 130, allowFilter: true },
|
||||
{ key: 'AssetGroups', caption: this.r('FLTL_00318', 'Asset Group'), width: 150 },
|
||||
{ key: 'Jobsites', caption: this.r('FLTL_01666', 'Jobsite'), width: 180, filter: it => it.Jobsites?.map(s => s.Key) }
|
||||
];
|
||||
grid.onRowDblClicked = index => {
|
||||
const item = grid.source[index];
|
||||
@@ -202,7 +202,7 @@ export default class AssetSelector extends OptionBase {
|
||||
option.assetFullcontrol ? createElement('button', button => {
|
||||
button.className = 'ui-popup-button';
|
||||
button.tabIndex = tabIndex + 1;
|
||||
button.innerText = this.r('P_MA_ADDASSET', 'Add Asset');
|
||||
button.innerText = this.r('FLTL_00091', 'Add Asset');
|
||||
button.addEventListener('click', async () => {
|
||||
if (typeof option.requestAddAsset === 'function') {
|
||||
this.loading(true);
|
||||
@@ -228,11 +228,11 @@ export default class AssetSelector extends OptionBase {
|
||||
)
|
||||
),
|
||||
checkHidden,
|
||||
createElement('span', span => span.innerText = this.r('P_WO_ASSETGROUP', 'Asset Group')),
|
||||
createElement('span', span => span.innerText = this.r('FLTL_00318', 'Asset Group')),
|
||||
dropAssetGroup.create(),
|
||||
createElement('span', span => span.innerText = this.r('P_WO_JOBSITE', 'Jobsite')),
|
||||
createElement('span', span => span.innerText = this.r('FLTL_01666', 'Jobsite')),
|
||||
dropJobsite.create(),
|
||||
createElement('span', span => span.innerText = this.r('P_SELECTASSETS_JOBSITECODE', 'Jobsite Code')),
|
||||
createElement('span', span => span.innerText = this.r('FLTL_01669', 'Jobsite Code')),
|
||||
dropJobsiteCode.create()
|
||||
),
|
||||
gridContent
|
||||
|
||||
Reference in New Issue
Block a user