From 5e5d7df59e68b18d239360ae4ac4c60c9aa18eb7 Mon Sep 17 00:00:00 2001 From: kj1352 Date: Tue, 10 Dec 2019 12:54:12 +0530 Subject: [PATCH] Dashboard completed --- .../custom-selector.component.html | 4 +- src/app/dashboard/dashboard.component.html | 48 +++++++------ src/app/dashboard/dashboard.component.scss | 70 +++++++++++++++---- .../widgets-holder.component.scss | 6 +- .../widgets-holder.component.ts | 2 +- src/styles.scss | 14 ++++ 6 files changed, 103 insertions(+), 41 deletions(-) diff --git a/src/app/custom-selector/custom-selector.component.html b/src/app/custom-selector/custom-selector.component.html index 379fd54..216973c 100644 --- a/src/app/custom-selector/custom-selector.component.html +++ b/src/app/custom-selector/custom-selector.component.html @@ -1,9 +1,9 @@
-
+
{{ header }}: {{ selectedOption.name }}
-
diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index bdbe082..997164a 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -8,13 +8,15 @@
  • -
    -
    Pending
    -

    Waiting for confirmation

    -
    - -
    -
    2
    Nos +
    +
    +
    Pending
    +

    Waiting for confirmation

    +
    + +
    +
    2
    Nos +
    @@ -23,13 +25,15 @@
  • -
    -
    Confirmed
    -

    To be Packed

    -
    - -
    -
    5
    Nos +
    +
    +
    Confirmed
    +

    To be Packed

    +
    + +
    +
    5
    Nos +
    @@ -38,13 +42,15 @@
  • -
    -
    Ready to Pick
    -

    Waiting for the Customer

    -
    - -
    -
    10
    Nos +
    +
    +
    Ready to Pick
    +

    Waiting for the Customer

    +
    + +
    +
    10
    Nos +
    diff --git a/src/app/dashboard/dashboard.component.scss b/src/app/dashboard/dashboard.component.scss index 4bca543..9a91860 100644 --- a/src/app/dashboard/dashboard.component.scss +++ b/src/app/dashboard/dashboard.component.scss @@ -8,6 +8,10 @@ .order-stats { width: 70%; + @media screen and (max-width: 1023px) { + width: 100%; + } + ul { list-style: none; } @@ -22,6 +26,42 @@ justify-content: space-between; align-items: center; + @media screen and (max-width: 1023px) { + align-items: flex-end; + } + + .column-holder { + display: flex; + flex-grow: 1; + + @media screen and (max-width: 1023px) { + flex-direction: column; + } + + .column { + &:nth-child(1) { + width: 60%; + + @media screen and (max-width: 1023px) { + width: 100%; + } + } + + &:nth-child(2) { + width: 100px; + color: var(--grey); + font-size: 14px; + + .count { + font-size: 36px; + font-weight: 700; + color: var(--dark-grey); + display: inline-block; + } + } + } + } + .column { letter-spacing: 0.5px; @@ -29,33 +69,29 @@ font-weight: 500; color: var(--dark-grey); font-size: 16px; + + @media screen and (max-width: 1023px) { + font-size: 14px; + } } p { font-size: 14px; color: var(--grey); margin-top: 10px; - } - - &:nth-child(1) { - width: 40%; - } - - &:nth-child(2) { - width: 100px; - color: var(--grey); - font-size: 14px; - .count { - font-size: 36px; - font-weight: 700; - color: var(--dark-grey); - display: inline-block; + @media screen and (max-width: 1023px) { + font-size: 12px; + margin-top: 5px; } } button { width: 100px; + + @media screen and (max-width: 1023px) { + width: 80px; + } } } } @@ -69,6 +105,10 @@ height: calc(100vh - 70px); overflow: auto; + @media screen and (max-width: 1023px) { + display: none; + } + &:hover { &::-webkit-scrollbar { display: block; diff --git a/src/app/widgets-holder/widgets-holder.component.scss b/src/app/widgets-holder/widgets-holder.component.scss index d893d3a..e89ca81 100644 --- a/src/app/widgets-holder/widgets-holder.component.scss +++ b/src/app/widgets-holder/widgets-holder.component.scss @@ -79,7 +79,7 @@ @media screen and (max-width: 1023px) { width: 100%; - height: 70px; + height: 60px; box-shadow: 0px 0px 5px var(--grey); position: fixed; bottom: 0; @@ -173,7 +173,7 @@ @media screen and (max-width: 1023px) { display: block; margin-right: 0; - font-size: 22px; + font-size: 24px; } } @@ -237,5 +237,7 @@ @media screen and (max-width: 1023px) { width: 100%; + height: calc(100vh - 60px); + overflow: auto; } } diff --git a/src/app/widgets-holder/widgets-holder.component.ts b/src/app/widgets-holder/widgets-holder.component.ts index e1cb159..30c0949 100644 --- a/src/app/widgets-holder/widgets-holder.component.ts +++ b/src/app/widgets-holder/widgets-holder.component.ts @@ -6,7 +6,7 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./widgets-holder.component.scss'] }) export class WidgetsHolderComponent implements OnInit { - selected_nav: string = 'dashboard'; + selected_nav: string = 'orders'; constructor() { } diff --git a/src/styles.scss b/src/styles.scss index 3691921..8b81518 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -38,6 +38,12 @@ button { font-size: 16px; padding: 0 15px; letter-spacing: 0.5px; + + @media screen and (max-width: 1023px) { + font-size: 14px; + height: 35px; + padding: 0 10px; + } } .round-button { @@ -58,11 +64,19 @@ button { display: flex; justify-content: space-between; + @media screen and (max-width: 1023px) { + flex-direction: column; + } + header { font-size: 20px; color: var(--dark-grey); font-weight: 500; letter-spacing: 0.5px; + + @media screen and (max-width: 1023px) { + margin-bottom: 30px; + } } }