Skip to content

Commit

Permalink
Disabling the docx part for documents.
Browse files Browse the repository at this point in the history
  • Loading branch information
renemadsen committed Jan 15, 2025
1 parent a17a19d commit 00bce88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public async Task<Stream> GenerateWorkOrderCaseReport(TaskManagementFiltersModel
}
}

public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(List<OldReportEformModel> reportModel)
public Task<OperationDataResult<Stream>> GenerateExcelDashboard(List<OldReportEformModel> reportModel)
{
try
{
Expand Down Expand Up @@ -259,19 +259,19 @@ public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(List<OldRe
}

Stream result = File.Open(resultDocument, FileMode.Open);
return new OperationDataResult<Stream>(true, result);
return Task.FromResult(new OperationDataResult<Stream>(true, result));
}
catch (Exception e)
{
SentrySdk.CaptureException(e);
logger.LogError(e.Message);
logger.LogTrace(e.StackTrace);
return new OperationDataResult<Stream>(false,
localizationService.GetString("ErrorWhileCreatingWordFile"));
return Task.FromResult(new OperationDataResult<Stream>(false,
localizationService.GetString("ErrorWhileCreatingWordFile")));
}
}

public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(List<ReportEformModel> reportModel)
public Task<OperationDataResult<Stream>> GenerateExcelDashboard(List<ReportEformModel> reportModel)
{
try
{
Expand Down Expand Up @@ -489,15 +489,15 @@ public async Task<OperationDataResult<Stream>> GenerateExcelDashboard(List<Repor
ValidateExcel(filePath);

Stream result = File.Open(filePath, FileMode.Open);
return new OperationDataResult<Stream>(true, result);
return Task.FromResult(new OperationDataResult<Stream>(true, result));
}
catch (Exception e)
{
SentrySdk.CaptureException(e);
logger.LogError(e.Message);
logger.LogTrace(e.StackTrace);
return new OperationDataResult<Stream>(false,
localizationService.GetString("ErrorWhileCreatingExcelFile"));
return Task.FromResult(new OperationDataResult<Stream>(false,
localizationService.GetString("ErrorWhileCreatingExcelFile")));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3 mat-dialog-title>{{'Create document' | translate}}</h3>
<mat-card>
<mat-card-title>{{ getLanguageByLanguageId(translation.id).text }}</mat-card-title>
<mat-card-content class="d-flex flex-column">
<mat-form-field>
<!--<mat-form-field>
<mat-label>{{'Name DOCX' | translate}}</mat-label>
<input
matInput
Expand Down Expand Up @@ -102,7 +102,7 @@ <h3 mat-dialog-title>{{'Create document' | translate}}</h3>
</button>
</ng-container>
</div>
</div>
</div>-->
<mat-form-field>
<mat-label>{{'Name PDF' | translate}}</mat-label>
<input
Expand Down Expand Up @@ -172,7 +172,7 @@ <h3 mat-dialog-title>{{'Create document' | translate}}</h3>
</ng-container>
</div>

<mat-card class="mb-3">
<!--<mat-card class="mb-3">
<mat-card-content>
<mat-form-field>
<mat-label>{{'End date' | translate}}</mat-label>
Expand All @@ -189,7 +189,7 @@ <h3 mat-dialog-title>{{'Create document' | translate}}</h3>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
</mat-card-content>
</mat-card>
</mat-card>-->
</div>
</div>
<div mat-dialog-actions class="d-flex flex-row justify-content-end">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h3 mat-dialog-title>{{'Edit document' | translate}}</h3>
<mat-card>
<mat-card-title>{{ getLanguageByLanguageId(translation.id).text }}</mat-card-title>
<mat-card-content>
<mat-form-field>
<!--<mat-form-field>
<mat-label>{{'Name DOCX' | translate}}</mat-label>
<input
matInput
Expand Down Expand Up @@ -91,7 +91,7 @@ <h3 mat-dialog-title>{{'Edit document' | translate}}</h3>
matTooltip="{{ 'Download DOCX' | translate }}"
>
<mat-icon>download</mat-icon>
<!-- <mat-icon svgIcon="file-word"></mat-icon>-->
&lt;!&ndash; <mat-icon svgIcon="file-word"></mat-icon>&ndash;&gt;
</button>
<button
mat-icon-button
Expand All @@ -103,7 +103,7 @@ <h3 mat-dialog-title>{{'Edit document' | translate}}</h3>
</button>
</ng-container>
</div>
</div>
</div>-->
<mat-form-field>
<mat-label>{{'Name PDF' | translate}}</mat-label>
<input
Expand Down Expand Up @@ -173,7 +173,7 @@ <h3 mat-dialog-title>{{'Edit document' | translate}}</h3>
</button>
</ng-container>
</div>
<mat-card class="mb-3">
<!--<mat-card class="mb-3">
<mat-card-content>
<mat-form-field>
<mat-label>{{'End date' | translate}}</mat-label>
Expand All @@ -190,7 +190,7 @@ <h3 mat-dialog-title>{{'Edit document' | translate}}</h3>
<mat-datepicker #picker></mat-datepicker>
</mat-form-field>
</mat-card-content>
</mat-card>
</mat-card>-->
</div>
</div>
<div mat-dialog-actions class="d-flex flex-row justify-content-end">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ export class DocumentsTableComponent implements OnInit, OnDestroy {
header: this.translateService.stream('Document description'),
formatter: (document: DocumentModel) => this.getDocumentTranslationDescription(document)
},
{
field: 'endDate',
header: this.translateService.stream('End date'),
type: 'date',
typeParameter: {format: 'dd.MM.y'},
sortable: true, sortProp: {id: 'EndAt'}
},
// {
// field: 'endDate',
// header: this.translateService.stream('End date'),
// type: 'date',
// typeParameter: {format: 'dd.MM.y'},
// sortable: true, sortProp: {id: 'EndAt'}
// },
// {
// field: 'downloadButton',
// header: this.translateService.stream('Files'),
Expand Down

0 comments on commit 00bce88

Please sign in to comment.