-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
311 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
163 changes: 37 additions & 126 deletions
163
src/app/advertiser/campaign-list/campaign-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,152 +1,63 @@ | ||
<section | ||
class="col" | ||
> | ||
<table class=""> | ||
<section class="posters-list__scrollable-table"> | ||
<table class="posters-list__table"> | ||
<app-table-navigation | ||
[navigationName]="'campaignListNavigation'" | ||
class="dwmth-box | ||
row | ||
dwmth-copy" | ||
class="posters-list__table-header" | ||
(sortTable)="sortTable($event)" | ||
></app-table-navigation> | ||
|
||
|
||
<tbody *ngIf="campaigns; else loading"> | ||
<app-campaign-list-item | ||
*ngFor="let campaign of campaigns; let i = index" | ||
[campaign]="campaign" | ||
></app-campaign-list-item> | ||
<app-campaign-list-item *ngFor="let campaign of campaigns; let i = index" | ||
[campaign]="campaign"></app-campaign-list-item> | ||
|
||
<tr *ngIf="campaigns.length > 0" | ||
class="dwmth-box | ||
dwmth-posters-list__item | ||
row | ||
justify-between | ||
align-center | ||
dwmth-copy | ||
dwmth-copy--semi"> | ||
|
||
<td | ||
class=" | ||
dwmth-posters-list__status-totals-column | ||
row | ||
align-center" | ||
></td> | ||
<td | ||
class=" | ||
col-xs-2 | ||
row | ||
align-center" | ||
> | ||
<span | ||
class=" | ||
dwmth-copy | ||
dwmth-copy--bold" | ||
> | ||
Total - All Campaigns | ||
</span> | ||
class="posters-list__totals-row"> | ||
<td class="posters-list__status-totals-column"></td> | ||
<td class="col-xs-2 posters-list__totals-title"> | ||
Total - All Campaigns | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
></td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
[title]="campaignsTotals.cost | adsharesTokenValue:currencySymbol" | ||
<td class="col-xs-1 posters-list__empty-box"></td> | ||
<td class="col-xs-1" | ||
[title]="campaignsTotals.cost | adsharesTokenValue:currencySymbol" | ||
> | ||
{{ campaignsTotals.cost | adsharesTokenValue:currencySymbol:2}} | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
> | ||
<td class="col-xs-1"> | ||
{{ campaignsTotals.clicks }} | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
> | ||
<td class="col-xs-1"> | ||
{{ campaignsTotals.impressions }} | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
> | ||
<span>{{ campaignsTotals.ctr | percent:'1.2-2' }}</span> | ||
<td class="col-xs-1"> | ||
{{ campaignsTotals.ctr | percent:'1.2-2' }} | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
[title]="campaignsTotals.averageCpm | adsharesTokenValue:currencySymbol" | ||
> | ||
<td class="col-xs-1" | ||
[title]="campaignsTotals.averageCpm | adsharesTokenValue:currencySymbol"> | ||
{{ campaignsTotals.averageCpm | adsharesTokenValue:currencySymbol:2 }} | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
[title]="campaignsTotals.averageCpc | adsharesTokenValue:currencySymbol" | ||
> | ||
<td class="col-xs-1" | ||
[title]="campaignsTotals.averageCpc | adsharesTokenValue:currencySymbol"> | ||
{{ campaignsTotals.averageCpc | adsharesTokenValue:currencySymbol:2 }} | ||
</td> | ||
<td | ||
class=" | ||
col-xs-1 | ||
row | ||
align-center" | ||
></td> | ||
<td class="col-xs-1"></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</section> | ||
|
||
<ng-template #loading> | ||
<div class="loading-wrapper"> | ||
<mat-spinner [diameter]="30" [strokeWidth]="4"></mat-spinner> | ||
</div> | ||
</ng-template> | ||
|
||
<div | ||
class=" | ||
dwmth-box | ||
dwmth-box--no-margin | ||
hidden-md" | ||
> | ||
<div | ||
class=" | ||
row | ||
justify-center" | ||
> | ||
<button | ||
class=" | ||
dwmth-btn | ||
dwmth-btn--white | ||
dwmth-btn--no-border | ||
dwmth-blue" | ||
(click)="navigateToCreateCampaign()" | ||
data-test="advertiser-create-new-campaign" | ||
> | ||
<img | ||
class=" | ||
dwmth-icon | ||
dwmth-icon--prepend" | ||
src="assets/images/plus-circle--blue.svg" | ||
> | ||
Add new campaign | ||
</button> | ||
</div> | ||
<ng-template #loading> | ||
<div class="loading-wrapper"> | ||
<mat-spinner [diameter]="30" [strokeWidth]="4"></mat-spinner> | ||
</div> | ||
</section> | ||
</ng-template> | ||
|
||
<div class="posters-list__add-new-poster-row"> | ||
<button class="posters-list__add-btn" | ||
(click)="navigateToCreateCampaign()" | ||
data-test="advertiser-create-new-campaign"> | ||
<img class="posters-list__add-btn-icon" | ||
src="assets/images/plus-circle--blue.svg"> | ||
Add new campaign | ||
</button> | ||
</div> | ||
|
65 changes: 56 additions & 9 deletions
65
src/app/advertiser/campaign-list/campaign-list.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,66 @@ | ||
@import '../../../styles.scss'; | ||
|
||
.dwmth-posters-list { | ||
.posters-list { | ||
&__sort { | ||
margin-left: 5px; | ||
} | ||
&__items { | ||
tr { | ||
height: 53px; | ||
} | ||
|
||
& > .dwmth-box:first-of-type { | ||
padding: 10px; | ||
} | ||
&__table { | ||
min-width: 1100px; | ||
} | ||
|
||
&__status-totals-column { | ||
@include status-cell; | ||
} | ||
|
||
&__scrollable-table { | ||
overflow: hidden; | ||
overflow-x: auto; | ||
} | ||
|
||
&__table-header { | ||
@include container($padding-vertical: 0); | ||
display: flex; | ||
} | ||
|
||
&__totals-row { | ||
@include copy($font-weight: semi); | ||
@include container( | ||
$padding-vertical: 10px, | ||
$margin-top: 4px, | ||
$margin-bottom: 2px | ||
); | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
& td { | ||
box-sizing: border-box; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
align-items: center; | ||
} | ||
} | ||
|
||
&__totals-title { | ||
@include copy($font-weight: bold); | ||
} | ||
|
||
&__add-new-poster-row { | ||
@include container($padding-vertical: 10px); | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
&__add-btn { | ||
@include btn( | ||
$color: pal(blue), | ||
$background-color: pal(white), | ||
$border-color: transparent, | ||
$padding-vertical: 0 | ||
) | ||
} | ||
|
||
&__add-btn-icon { | ||
margin-right: 8px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ | |
.chart-filter__select--wider{ | ||
min-width: 150px; | ||
} | ||
.user-filters { | ||
max-width: 400px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.