Skip to content

Commit

Permalink
Release v0.6.7 (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
PawZar authored Apr 26, 2019
1 parent 6349371 commit 2070c3f
Show file tree
Hide file tree
Showing 18 changed files with 311 additions and 241 deletions.
17 changes: 11 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.6.7] - 2019-04-26
### Added
- Classification banner filtering by landingUrl

## [0.6.6] - 2019-04-25
### Added
- Values in custom currencies
Expand Down Expand Up @@ -74,12 +78,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Advertiser features (Campaigns & Ads)
- Publisher features (Sites & AdUnits)

[Unreleased]: https://github.com/adshares/adserver/compare/v0.6.6...develop
[0.6.6]: https://github.com/adshares/adserver/compare/v0.6.4...v0.6.6
[0.6.4]: https://github.com/adshares/adserver/compare/v0.6.1...v0.6.4
[0.6.1]: https://github.com/adshares/adserver/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/adshares/adserver/compare/v0.5.4...v0.6.0
[0.5.4]: https://github.com/adshares/adserver/compare/v0.5.3...v0.5.4
[Unreleased]: https://github.com/adshares/adpanel/compare/v0.6.7...develop
[0.6.7]: https://github.com/adshares/adpanel/compare/v0.6.6...v0.6.7
[0.6.6]: https://github.com/adshares/adpanel/compare/v0.6.4...v0.6.6
[0.6.4]: https://github.com/adshares/adpanel/compare/v0.6.1...v0.6.4
[0.6.1]: https://github.com/adshares/adpanel/compare/v0.6.0...v0.6.1
[0.6.0]: https://github.com/adshares/adpanel/compare/v0.5.4...v0.6.0
[0.5.4]: https://github.com/adshares/adpanel/compare/v0.5.3...v0.5.4
[0.5.3]: https://github.com/adshares/adpanel/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/adshares/adpanel/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/adshares/adpanel/compare/v0.5.0...v0.5.1
Expand Down
163 changes: 37 additions & 126 deletions src/app/advertiser/campaign-list/campaign-list.component.html
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 src/app/advertiser/campaign-list/campaign-list.component.scss
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;
}
}
8 changes: 5 additions & 3 deletions src/app/advertiser/dashboard/dashboard.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div *ngIf="!!campaigns.length">
<div class="dwmth-box">
<div class="row">
<div class="col-xs-4">
<div class="col-xs-3">
<a
(click)="downloadReport()"
>
Expand All @@ -52,13 +52,13 @@
</button>
</a>
</div>
<div class="col-xs-4">
<div class="col-xs-6">
<app-chart-filter-by-type
(updateId)="appChartRef.updateChartDataAssetId($event)"
(updateSeries)="appChartRef.updateChartDataSeries($event)"
></app-chart-filter-by-type>
</div>
<div class="col-xs-4">
<div class="col-xs-3">
<app-chart-filter
*ngIf="!!campaigns.length"
(filter)="appChartRef.updateChartData($event); loadCampaigns($event.from, $event.to)"
Expand All @@ -67,13 +67,15 @@
</div>
<div
class="
dashboard__chart-wrapper
row
align-center
justify-center
chart-wrapper"
>
<app-chart
class="
dashboard__chart
chart
row
align-center
Expand Down
12 changes: 12 additions & 0 deletions src/app/advertiser/dashboard/dashboard.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,15 @@
width: 100%;
}
}

.dashboard {
&__chart-wrapper {
overflow: hidden;
overflow-x: auto;
}

&__chart {
min-width: 650px;
width: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
.chart-filter__select--wider{
min-width: 150px;
}
.user-filters {
max-width: 400px;
}
6 changes: 3 additions & 3 deletions src/app/common/pipes/adshares-token.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ function removeDecimalPart(value: number | string) {

export class AdsharesTokenPipe implements PipeTransform {
transform(value: number | string, prependCurrencySymbol: string, precision: number = 11): string {
const formatInCustomCurrency = prependCurrencySymbol ? prependCurrencySymbol : '';
const formatInCryptoCurrency = !prependCurrencySymbol ? environment.cryptoSymbol : '';
const formatWithCurrencySymbol = prependCurrencySymbol ? prependCurrencySymbol : '';
const formatWithCurrencyCode= !prependCurrencySymbol ? environment.currencyCode : '';

return `${formatInCustomCurrency} ${formatMoney(removeDecimalPart(value), precision)} ${formatInCryptoCurrency}`;
return `${formatWithCurrencySymbol} ${formatMoney(removeDecimalPart(value), precision)} ${formatWithCurrencyCode}`;
}
}

Expand Down
1 change: 1 addition & 0 deletions src/app/models/classifier.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface BannerClassificationStatus {
interface BannerClassificationFilters {
status?: BannerClassificationStatus;
sizes?: Array<string>;
landingUrl?: string;
}

export {
Expand Down
Loading

0 comments on commit 2070c3f

Please sign in to comment.