Skip to content

Commit

Permalink
added url to mccr tab mc/workorder (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
espenkalle authored Dec 13, 2023
1 parent 43ac890 commit 9727848
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ const McSideSheetComponent = (props: Required<McProps>) => {
mccrResponsible: mccr.responsible,
mccrStatus: mccr.status,
mccrType: mccr.formularType,
mccrUrl: mccr.checklistUrl,
mccrUrlId: mccr.checklistUrlId,
mcpkgNumber: mccr.mechanicalCompletionPackageNo,
mechanicalCompletionPackageUrl: mccr.mechanicalCompletionPackageUrl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,13 @@ export const columns: ColDef<MccrBase>[] = [
{
headerName: 'Type',
valueGetter: (pkg) => pkg.data?.mccrType,
// valueFormatter: (pkg) =>
// pkg.data?.mccrId ? proCoSysUrls.getFormTypeUrl(pkg.data.mccrId) : '',
// cellRenderer: (props: ICellRendererProps<MccrBase, string | null>) => {
// if (!props.valueFormatted) {
// return null;
// } else {
// return <LinkCell url={props.valueFormatted} urlText={props.value ?? ''} />;
// }
// },
cellRenderer: (props: ICellRendererProps<MccrBase, string | null>) => {
if (!props.data?.mccrUrl) {
return <StyledMonospace>{props.value}</StyledMonospace>;
} else {
return <LinkCell url={props.data?.mccrUrl} urlText={props.value ?? ''} />;
}
},
},
{
headerName: 'Status',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type MccrBase = {
mccrResponsible: string | null;
mccrStatus: string | null;
mccrType: string | null;
mccrUrl: string | null;
mccrUrlId: string | null;
mcpkgNumber: string | null;
mechanicalCompletionPackageUrl: string | null;
Expand Down
1 change: 1 addition & 0 deletions libs/workordersidesheet/src/lib/types/workOrderMccr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type WorkOrderMccr = {
commissioningPackageId: string | null;
tagNumber: string | null;
mccrType: string | null;
mccrUrl: string | null;
mccrResponsible: string | null;
mccrStatus: string;
mcpkgNumber: string | null;
Expand Down

0 comments on commit 9727848

Please sign in to comment.