Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Created January 27, 2023 20:39
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 hasokeric/d4a937f7c7c4fc9c2a762b055f8e44ef to your computer and use it in GitHub Desktop.
Save hasokeric/d4a937f7c7c4fc9c2a762b055f8e44ef to your computer and use it in GitHub Desktop.
Epicor type safety with OpenAPI
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