[HIMA-82] QA feedback

Date format changed to m/YYYY in product details.
This commit is contained in:
Milos Jovanov
2019-02-12 08:01:00 +01:00
parent 155a918684
commit 93e949cd2c
3 changed files with 8 additions and 2 deletions

View File

@@ -57,7 +57,7 @@
</div>
<div class="publication-format-pages standart-text">
<div class="publication">
<span>{{product.publicationDate}}</span>
<span>{{formatDate(product.publicationDate)}}</span>
</div>
<div>
<span>|</span>

View File

@@ -91,7 +91,7 @@
.icon {
height: 17px;
margin-top: 2px;
margin-top: 4px;
}
.stock-label span {

View File

@@ -9,6 +9,7 @@ import { ProcessState, ProcessStateModel } from 'src/app/core/store/state/proces
import { Select } from '@ngxs/store';
import { stateNameErrorMessage } from '@ngxs/store/src/decorators/state';
import { Process } from 'src/app/core/models/process.model';
import { formatDate } from '@angular/common';
@Component({
selector: 'app-product-details',
@@ -145,4 +146,9 @@ export class ProductDetailsComponent implements OnInit {
cartActionCompleted(open: boolean) {
// Logic if needed
}
formatDate(date: string): string {
const dateToFormat = new Date(date);
return `${dateToFormat.getMonth()}/${dateToFormat.getFullYear()}`;
}
}