Created
January 27, 2023 20:39
-
-
Save hasokeric/d4a937f7c7c4fc9c2a762b055f8e44ef to your computer and use it in GitHub Desktop.
Epicor type safety with OpenAPI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ViewEncapsulation } from '@angular/core'; | |
import { | |
ApiModule, | |
CustomMethodsService, | |
ChangeJobAsmblPartNumInput, | |
ErpTablesetsJobAsmblRow, | |
ChangeEquipIDInput, | |
ErpTablesetsJobEntryTableset, | |
ErpTablesetsJobHeadRow, | |
} from 'app/modules/openapi'; | |
@Component({ | |
selector: 'example', | |
templateUrl: './example.component.html', | |
encapsulation: ViewEncapsulation.None, | |
}) | |
export class ExampleComponent { | |
jobAsmblRow: ErpTablesetsJobAsmblRow; | |
products: ErpTablesetsJobAsmblRow[] = [{ jobNum: 'ABCDEF', assemblySeq: 10, jobComplete: true }]; | |
/** | |
* Constructor | |
*/ | |
constructor(private jobEntrySvc: CustomMethodsService) { | |
const ce: ChangeEquipIDInput = { | |
equipID: '1234', | |
ds: { | |
jobHead: [{ jobNum: '1234', jobClosed: false, partNumIUM: 'EA', partNum: '1234' }], | |
}, | |
}; | |
this.jobEntrySvc.changeEquipID('EPIC06', '1234', ce); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment