Skip to content

Instantly share code, notes, and snippets.

@BrianMRO
Created September 13, 2023 00:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrianMRO/f96f05fb7e07f10bbb851211e9adb31a to your computer and use it in GitHub Desktop.
Save BrianMRO/f96f05fb7e07f10bbb851211e9adb31a to your computer and use it in GitHub Desktop.
CMMS Equipment Screen typescript file
import {
ScreenBaseViewModel,
ActionState,
createInstance,
createCollection,
graphInfo,
localizable
} from 'client-controls';
import {
WOEquipment,
WOEquipmentBOM,
WOEquipmentFM,
WOOrder,
WOSchedule
} from './views';
@localizable
class TabHeaders {
static General = "General";
static BOM = "BOM";
static Schedules = "Schedules";
static WOHistory = "Work Order History";
static FailureModes = "Failure Modes";
}
@graphInfo({ graphType: 'CMMS.WOEquipmentMaint', primaryView: 'Equipment' })
export class WO204000 extends ScreenBaseViewModel {
TabHeaders = TabHeaders;
Equipment = createInstance(WOEquipment);
CurrentEquipment = createInstance(WOEquipment);
FailureModes = createCollection(WOEquipmentFM, {
initNewRow: true,
syncPosition: true
});
Schedules = createCollection(WOSchedule, {
initNewRow: true,
syncPosition: true
});
WorkOrders = createCollection(WOOrder, {
initNewRow: true,
syncPosition: true
});
BOM = createCollection(WOEquipmentBOM, {
initNewRow: true,
syncPosition: true
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment