diff --git a/src/app/admin/product/product.ts b/src/app/admin/product/product.ts index 73f546f5..42679076 100644 --- a/src/app/admin/product/product.ts +++ b/src/app/admin/product/product.ts @@ -8,30 +8,31 @@ export class Product { description!: string; conditionId!: string; price!: number; - countryId!: string | null; - stateId!: string | null; - cityId!: string | null; - neighbourhoodId!: string | null; - zip_code!: string | null; + previousPrice?: number; + countryId?: string; + stateId?: string; + cityId?: string; + neighbourhoodId?: string; + zip_code?: string; createdAt!: Date; - approvedAt!: Date | null; - updatedAt!: Date | null; + approvedAt?: Date; + updatedAt?: Date; isActive!: boolean; isPromoted!: boolean; - viewCount!: number | null; + viewCount?: number; //user?: User; //category?: Category; //sub_category?: SubCategory; //brand?: Brand; //condition?: Condition; - //country?: Country | null; - //state?: State | null; - //city?: City | null; - //neighbourhood?: Neighbourhood | null; + //country?: Country; + //state?: State; + //city?: City; + //neighbourhood?: Neighbourhood; //favorites?: Array; //comments?: Array; - //img_urls?: Array; - //report?: Report | null; + img_urls?: Array; + //report?: Report; //shares?: Array; //_count?: ProductCount; } diff --git a/src/app/public/home/home.component.html b/src/app/public/home/home.component.html index 6de799bc..7b15b8c6 100644 --- a/src/app/public/home/home.component.html +++ b/src/app/public/home/home.component.html @@ -27,7 +27,7 @@
- +
diff --git a/src/app/public/home/home.component.ts b/src/app/public/home/home.component.ts index ddbe9eec..0a50ebdc 100644 --- a/src/app/public/home/home.component.ts +++ b/src/app/public/home/home.component.ts @@ -24,7 +24,7 @@ export class HomeComponent implements OnDestroy { private destroy$: Subject = new Subject(); banners: Banner[]; categories: Category[]; - products: any[]; + products: Product[]; paidAds: any[]; constructor() {} @@ -78,7 +78,62 @@ export class HomeComponent implements OnDestroy { ] - this.products = [1,1,1,1,1,1] + this.products = [{ + id: "1", + userId: "1", + categoryId: "1", + sub_categoryId: "1", + brandId: "1", + name: "Maquina de lavar roupa 14kg sper blaster", + description: "", + conditionId: "1", + price: 3458.10, + previousPrice: 4458.10, + createdAt: new Date(), + isActive: true, + isPromoted: true, + viewCount: 0, + img_urls: [ + "https://img.olx.com.br/images/89/890461810585731.webp" + ] + }, + { + id: "1", + userId: "1", + categoryId: "1", + sub_categoryId: "1", + brandId: "1", + name: "Maquina de lavar roupa 14kg sper blaster 2", + description: "", + conditionId: "1", + price: 3458.10, + previousPrice: 4458.10, + createdAt: new Date(), + isActive: true, + isPromoted: false, + viewCount: 0, + img_urls: [ + "https://img.olx.com.br/images/89/890461810585731.webp" + ] + }, + { + id: "1", + userId: "1", + categoryId: "1", + sub_categoryId: "1", + brandId: "1", + name: "Maquina de lavar roupa 14kg sper blaster 3", + description: "", + conditionId: "1", + price: 3458.10, + createdAt: new Date(), + isActive: true, + isPromoted: true, + viewCount: 0, + img_urls: [ + "https://img.olx.com.br/images/89/890461810585731.webp" + ] + }] this.paidAds = [1,1,1] } diff --git a/src/app/public/home/product/product.component.html b/src/app/public/home/product/product.component.html index fcf9ce56..2b3240a0 100644 --- a/src/app/public/home/product/product.component.html +++ b/src/app/public/home/product/product.component.html @@ -1,18 +1,30 @@ - +
  • - - +
- Destaque + Destaque
-
Bioledz 38400 - 800 watts
-

R$ 3.475,99

+
{{ product.name }}
+

+ {{ product.price | currency : "BRL" }} + {{ product.previousPrice | currency : "BRL" }} +

-
    -
  • An item
  • +
      +
    • +

      + + São Paulo +

      +

      + {{ + product.createdAt | date : "dd/MM/yyyy HH:mm" + }} +

      +
    - \ No newline at end of file + diff --git a/src/app/public/home/product/product.component.scss b/src/app/public/home/product/product.component.scss index 70dd3e94..4f694a1f 100644 --- a/src/app/public/home/product/product.component.scss +++ b/src/app/public/home/product/product.component.scss @@ -2,6 +2,10 @@ @import 'bootstrap/scss/mixins/breakpoints'; @import '@nebular/theme/styles/global/breakpoints'; +.product { + cursor: pointer; +} + .card-img-top { font-size: 1.125rem; -webkit-user-select: none; @@ -72,4 +76,5 @@ display: block; text-overflow: ellipsis; padding: 4px 8px; -} \ No newline at end of file +} +