55946: Edit item page cleanup

This commit is contained in:
Kristof De Langhe
2018-10-09 14:30:40 +02:00
parent 05a4918ef0
commit fb0e1d81e4
7 changed files with 8 additions and 38 deletions

View File

@@ -3,7 +3,6 @@ import { CommonModule } from '@angular/common';
import { SharedModule } from '../../shared/shared.module'; import { SharedModule } from '../../shared/shared.module';
import { EditItemPageRoutingModule } from './edit-item-page.routing.module'; import { EditItemPageRoutingModule } from './edit-item-page.routing.module';
import { EditItemPageComponent } from './edit-item-page.component'; import { EditItemPageComponent } from './edit-item-page.component';
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
import { ItemStatusComponent } from './item-status/item-status.component'; import { ItemStatusComponent } from './item-status/item-status.component';
@NgModule({ @NgModule({
@@ -14,8 +13,7 @@ import { ItemStatusComponent } from './item-status/item-status.component';
], ],
declarations: [ declarations: [
EditItemPageComponent, EditItemPageComponent,
ItemStatusComponent, ItemStatusComponent
ItemCollectionMapperComponent
] ]
}) })
export class EditItemPageModule { export class EditItemPageModule {

View File

@@ -2,7 +2,6 @@ import { ItemPageResolver } from '../item-page.resolver';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { EditItemPageComponent } from './edit-item-page.component'; import { EditItemPageComponent } from './edit-item-page.component';
import { ItemCollectionMapperComponent } from './item-collection-mapper/item-collection-mapper.component';
@NgModule({ @NgModule({
imports: [ imports: [
@@ -13,13 +12,6 @@ import { ItemCollectionMapperComponent } from './item-collection-mapper/item-col
resolve: { resolve: {
item: ItemPageResolver item: ItemPageResolver
} }
},
{
path: 'map',
component: ItemCollectionMapperComponent,
resolve: {
item: ItemPageResolver
}
} }
]) ])
], ],

View File

@@ -1,7 +0,0 @@
<div class="container">
<div class="row">
<div class="col-12">
<p>It works!</p>
</div>
</div>
</div>

View File

@@ -1,19 +0,0 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { fadeIn, fadeInOut } from '../../../shared/animations/fade';
@Component({
selector: 'ds-item-collection-mapper',
styleUrls: ['./item-collection-mapper.component.scss'],
templateUrl: './item-collection-mapper.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
animations: [
fadeIn,
fadeInOut
]
})
/**
* Component for mapping collections to an item
*/
export class ItemCollectionMapperComponent {
}

View File

@@ -53,8 +53,14 @@ export class ItemStatusComponent implements OnInit {
}); });
this.statusDataKeys = Object.keys(this.statusData); this.statusDataKeys = Object.keys(this.statusData);
/*
The key is used to build messages
i18n example: 'item.edit.tabs.status.buttons.<key>.label'
The value is supposed to be a href for the button
*/
this.actions = Object.assign({ this.actions = Object.assign({
mappedCollections: this.getCurrentUrl() + '/map' // TODO: Create mapping component on item level
mappedCollections: this.getCurrentUrl() + '/'
}); });
this.actionsKeys = Object.keys(this.actions); this.actionsKeys = Object.keys(this.actions);
} }