Commit a7689411 authored by Florent POITTEVIN's avatar Florent POITTEVIN Committed by Alicia.DeDiosFuente
Browse files

chore: sonar remove dead variables

parent c8b46eb5
......@@ -74,7 +74,7 @@ export class AdminNotificationDetailEditRoutable extends SharedAbstractDetailEdi
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -396,7 +396,7 @@ export class DepositFileContainer extends SharedAbstractDetailEditRoutable<Depos
}
private _showPreview(dataFile: DepositDataFile): void {
const previewDialogRef = this._dialog.open(SharedPreviewDialog, {
this._dialog.open(SharedPreviewDialog, {
width: "max-content",
maxWidth: "90vw",
height: "min-content",
......
......@@ -508,7 +508,7 @@ export class DepositDetailEditRoutable extends SharedAbstractDetailEditRoutable<
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -17,13 +17,12 @@ export class DepositHelper {
}
static determineMode(store: Store, routerExt: RouterExtService): DepositMode {
const url = store.selectSnapshot(state => state.router.state.url);
store.selectSnapshot(state => state.router.state.url);
if (routerExt.getPreviousUrl().includes(RoutesEnum.preservationPlanningDeposit)) {
return DepositMode.PRESERVATION_PLANNING_DEPOSIT;
} else {
return DepositMode.DEPOSIT;
}
}
}
......
......@@ -916,7 +916,7 @@ export class DepositState extends ResourceLogoState<DepositStateModel, Deposit>
@Action(DepositAction.ComputeModeTab)
computeModeTab(ctx: StateContext<DepositStateModel>, action: DepositAction.ComputeModeTab): void {
let mode = ModeDepositTabEnum.UNDEFINED;
let mode: ModeDepositTabEnum;
const url = this.store.selectSnapshot((s: LocalStateModel) => s.router.state.url);
const currentDisplay = url.substring(url.lastIndexOf(urlSeparator) + 1, url.length);
......
......@@ -173,7 +173,7 @@ export class OrderAllOrderDetailEditRoutable extends SharedAbstractDetailEditCom
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -208,7 +208,7 @@ export class OrderMyOrderDetailEditRoutable extends SharedAbstractDetailEditComm
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -123,7 +123,7 @@ export class PreservationPlanningDipDetailEditRoutable extends SharedAbstractDet
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -184,7 +184,7 @@ export class PreservationPlanningJobExecutionDetailRoutable extends SharedAbstra
.pipe(
tap((state: LocalStateModel) => {
const reportLines = state.preservationPlanning.preservationPlanning_job.preservationPlanning_job_execution.preservationPlanning_job_execution_report.lineReport;
const dialogRef = this._dialog.open(PreservationPlanningJobReportDetailDialog, {
this._dialog.open(PreservationPlanningJobReportDetailDialog, {
data: {
linesReport: reportLines,
preservationJobId: this._preservationJobId,
......
......@@ -78,8 +78,6 @@ export class PreservationPlanningMonitoringHomeRoutable extends SharedAbstractPr
trackByFn(index: number, item: PreservationPlanningMonitorService | PreservationPlanningMonitor): string {
if (isNullOrUndefined(item.name)) {
item = item as PreservationPlanningMonitor;
return StringUtil.stringEmpty;
}
item = item as PreservationPlanningMonitorService;
......
......@@ -169,7 +169,7 @@ export class PreservationPlanningSipDetailEditRoutable extends SharedAbstractDet
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -168,7 +168,7 @@ export class PreservationSpaceNotificationDetailEditRoutable extends SharedAbstr
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -201,7 +201,7 @@ export class PreservationSpaceOrganizationalUnitArchiveAclListRoutable extends S
datas.name = model[this.KEY_PARAM_NAME]?.toString();
datas.resId = model.resId;
const dialogRef = this._dialog.open(SharedDeleteDialog, {
this._dialog.open(SharedDeleteDialog, {
width: "400px",
data: datas,
});
......@@ -234,11 +234,8 @@ export class PreservationSpaceOrganizationalUnitArchiveAclListRoutable extends S
}
onQueryParametersEvent(queryParameters: QueryParameters): void {
let queryParametersOrgUnit;
if (isNullOrUndefined(queryParameters)) {
queryParameters = new QueryParameters();
} else {
queryParametersOrgUnit = QueryParametersUtil.clone(queryParameters);
}
const searchItem = QueryParametersUtil.getSearchItems(queryParameters);
MappingObjectUtil.set(searchItem, "organizationalUnit.resId", this._orgUnitId);
......
......@@ -277,7 +277,7 @@ export class SharedFileAndAipInformationContainer<TResource extends BaseResource
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: this.data.parentId,
......
......@@ -180,7 +180,6 @@ export class SharedPreservationDurationPresentational extends SharedAbstractPres
private setValidator(value: Enums.RetentionPolicy.RetentionPolicyEnum): void {
const retentionFormControl = this.form.get(this.formDefinition.retention);
const retentionUnitsFormControl = this.form.get(this.formDefinition.retentionUnits);
if (value === Enums.RetentionPolicy.RetentionPolicyEnum.days) {
retentionFormControl.setValidators([Validators.min(1), Validators.max(this.DAYS_BY_YEAR)]);
} else if (value === Enums.RetentionPolicy.RetentionPolicyEnum.years) {
......
......@@ -178,7 +178,7 @@ export abstract class SharedAbstractDetailEditRoutable<TResourceModel extends Ba
datas.name = model[this.KEY_PARAM_NAME]?.toString();
datas.resId = model.resId;
});
const dialogRef = this._dialog.open(SharedDeleteDialog, {
this._dialog.open(SharedDeleteDialog, {
width: "400px",
data: datas,
});
......
......@@ -156,7 +156,7 @@ export abstract class SharedAbstractListRoutable<TResourceModel extends BaseReso
datas.name = model[this.KEY_PARAM_NAME]?.toString();
datas.resId = model.resId;
const dialogRef = this._dialog.open(SharedDeleteDialog, {
this._dialog.open(SharedDeleteDialog, {
width: "400px",
data: datas,
});
......
......@@ -411,7 +411,7 @@ export class SharedAipDetailEditRoutable extends SharedAbstractDetailEditCommonR
}
showHistory(): void {
const dialogRef = this._dialog.open(SharedHistoryDialog, {
this._dialog.open(SharedHistoryDialog, {
width: environment.modalWidth,
data: {
parentId: null,
......
......@@ -67,7 +67,6 @@ export class MolFileVisualizerService extends AbstractFileVisualizer {
const envElement = JSON.stringify(environment.visualizationChemicalMoleculeMode);
const twothreeDimension = JSON.stringify(ChemicalMoleculeVisualizationEnum.threeAndTwoDimensional);
const threeDimension = JSON.stringify(ChemicalMoleculeVisualizationEnum.threeDimensionalOnly);
const disabed = JSON.stringify(ChemicalMoleculeVisualizationEnum.disabled);
const html = `
<button id="2d" mat-button color="primary" style="
box-sizing: border-box;
......
......@@ -38,7 +38,6 @@ export class SoundFileVisualizerService extends AbstractFileVisualizer {
}
isVisualizationOnGoing(fileInfo: FileInput, domElement: Element): boolean {
const test = isTruthyObject(this.wave);
return isTruthyObject(this.wave);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment