Skip to content

Commit

Permalink
Merge pull request #720 from adshares/develop
Browse files Browse the repository at this point in the history
v1.4.0
  • Loading branch information
m-pilarczyk authored Nov 22, 2019
2 parents ab0efd0 + e501c2d commit 848cbf9
Show file tree
Hide file tree
Showing 86 changed files with 2,475 additions and 427 deletions.
12 changes: 11 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.4.0] - 2019-11-22
### Added
- Conversions definition
- Target URL placeholders
- Pops ad units configuration
- Site domain requirement
### Changed
- Hid Requires section from site filtering

## [1.2.5] - 2019-10-01
### Changed
- Upgrade @angular/cli to version 1.7.0
Expand Down Expand Up @@ -133,7 +142,8 @@ 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/adpanel/compare/v1.2.5...develop
[Unreleased]: https://github.com/adshares/adpanel/compare/v1.4.0...develop
[1.4.0]: https://github.com/adshares/adpanel/compare/v1.2.5...v1.4.0
[1.2.5]: https://github.com/adshares/adpanel/compare/v1.2.4...v1.2.5
[1.2.4]: https://github.com/adshares/adpanel/compare/v1.2.1...v1.2.4
[1.2.1]: https://github.com/adshares/adpanel/compare/v0.11.0...v1.2.1
Expand Down
2 changes: 1 addition & 1 deletion src/app/admin/dashboard/dashboard.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class DashboardComponent extends HandleSubscription implements OnInit {
link: '/admin/dashboard/privacy',
values: [
{name: 'Privacy', icon: 'assets/images/preferences.svg'},
{name: 'Terms and condition', icon: 'assets/images/preferences.svg'},
{name: 'Terms and conditions', icon: 'assets/images/preferences.svg'},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/app/admin/finances/finances-settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Walle
<h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Cold wallet settings</h1>
<mat-checkbox [checked]="settings.coldWalletIsActive"
(change)="updateSettings($event.checked, 'coldWalletIsActive')">
Enable Cold Wallet
Enable cold wallet
</mat-checkbox>
</section>
<p *ngIf="settings.coldWalletIsActive"
Expand Down
8 changes: 4 additions & 4 deletions src/app/admin/general-settings/license/license.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ <h1 class="dwmth-heading dwmth-heading--primary"> License </h1>
<div *ngIf="license !== null; else info">
<div class="license__inputs-wrapper">
<app-input type="text"
[label]="'Type'"
label="Type"
[readonly]="true"
[value]="license.type"
></app-input>
<app-input type="text"
[label]="'Owner'"
label="Owner"
[readonly]="true"
[value]="license.owner"
></app-input>
</div>

<div class="license__inputs-wrapper">
<app-input type="text"
[label]="'Date Start'"
label="Start date"
[readonly]="true"
[value]="license.dateStart"
></app-input>
<app-input type="text"
[label]="'Date End'"
label="End date"
[readonly]="true"
[value]="license.dateEnd"
></app-input>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<form [formGroup]="privacy"
class="dwmth-box--large dwmth-box privacy-and-terms__forms-box">
<h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Privacy Settings</h1>
<h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Privacy</h1>
<p
class="
dwmth-copy
Expand Down Expand Up @@ -30,7 +30,7 @@ <h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Priva

<form [formGroup]="terms"
class="dwmth-box--large dwmth-box privacy-and-terms__forms-box">
<h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Terms Settings</h1>
<h1 class="dwmth-heading dwmth-heading--primary finances-settings__header">Terms and conditions</h1>
<p
class="
dwmth-copy
Expand Down
4 changes: 2 additions & 2 deletions src/app/admin/user-reports/user-reports.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h1 class="user-reports__title">
<mat-icon>
save_alt
</mat-icon>
Download Advertisers Report
Download advertisers' report
</a>
<a
class="user-reports__btn"
Expand All @@ -79,7 +79,7 @@ <h1 class="user-reports__title">
<mat-icon>
save_alt
</mat-icon>
Download Publishers Report
Download publishers' report
</a>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions src/app/advertiser/advertiser-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { RouterModule, Routes } from '@angular/router';
import { AdvertiserComponent } from './advertiser.component';
import { EditCampaignComponent } from './edit-campaign/edit-campaign.component';
import { EditCampaignBasicInformationComponent } from './edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component';
import { EditCampaignConversionComponent } from './edit-campaign/edit-campaign-conversion/edit-campaign-conversion.component';
import { EditCampaignAdditionalTargetingComponent } from './edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component';
import { EditCampaignCreateAdsComponent } from './edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component';
import { EditCampaignSummaryComponent } from './edit-campaign/edit-campaign-summary/edit-campaign-summary.component';
Expand Down Expand Up @@ -64,6 +65,10 @@ const advertiserRoutes: Routes = [
path: 'basic-information',
component: EditCampaignBasicInformationComponent,
},
{
path: 'conversion',
component: EditCampaignConversionComponent,
},
{
path: 'additional-targeting',
component: EditCampaignAdditionalTargetingComponent,
Expand Down
30 changes: 17 additions & 13 deletions src/app/advertiser/advertiser.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,23 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatMomentDateModule } from '@angular/material-moment-adapter';
import { MatInputModule } from '@angular/material';
import { MatCheckboxModule, MatInputModule } from '@angular/material';
import { MatSelectModule } from '@angular/material/select';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatMenuModule } from '@angular/material/menu';
import { MatTabsModule } from '@angular/material/tabs';
import { FileUploadModule } from 'ng2-file-upload';
import { OwlDateTimeModule, OwlNativeDateTimeModule, OWL_DATE_TIME_FORMATS } from 'ng-pick-datetime';
import { OWL_DATE_TIME_FORMATS, OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';
import { OwlMomentDateTimeModule } from 'ng-pick-datetime-moment';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { AppCommonModule } from 'common/common.module';
import { AdvertiserComponent } from './advertiser.component';
import { AdvertiserRoutingModule } from './advertiser-routing.module';
import { EditCampaignComponent } from './edit-campaign/edit-campaign.component';
import { CampaignListComponent } from './campaign-list/campaign-list.component';
import { CampaignListItemComponent } from './campaign-list/campaign-list-item/campaign-list-item.component';
import { EditCampaignBasicInformationComponent } from './edit-campaign/edit-campaign-basic-info/edit-campaign-basic-information.component';
import { EditCampaignConversionComponent } from './edit-campaign/edit-campaign-conversion/edit-campaign-conversion.component';
import { EditCampaignAdditionalTargetingComponent } from './edit-campaign/edit-campaign-additional-targeting/edit-campaign-additional-targeting.component';
import { EditCampaignCreateAdsComponent } from './edit-campaign/edit-campaign-create-ads/edit-campaign-create-ads.component';
import { EditCampaignSummaryComponent } from './edit-campaign/edit-campaign-summary/edit-campaign-summary.component';
Expand All @@ -28,32 +31,32 @@ import { CampaignDetailsComponent } from './campaign-details/campaign-details.co
import { AdListComponent } from './campaign-details/ad-list/ad-list.component';
import { AdListItemComponent } from './campaign-details/ad-list/ad-list-item/ad-list-item.component';

import { CampaignBudgetPerDayPipe } from "common/pipes/campaign-budget-per-day.pipe";
import { CampaignBudgetPerDayPipe } from 'common/pipes/campaign-budget-per-day.pipe';
import { AdvertiserGuard } from './advertiser-guard.service';
import { CampaignResolver } from './resolvers/campaign.resolver';
import { TargetingCriteriaResolver } from './resolvers/targeting-criteria.resolver';
import {
DATE_AND_TIME_PICKER_FORMATS
} from "common/utilities/consts";

import { DATE_AND_TIME_PICKER_FORMATS } from 'common/utilities/consts';


const matModules = [
MatCheckboxModule,
MatExpansionModule,
MatFormFieldModule,
MatMomentDateModule,
MatDatepickerModule,
MatInputModule,
MatMenuModule,
MatSelectModule
MatSelectModule,
MatTabsModule,
];

const editCampaignComponents = [
EditCampaignComponent,
EditCampaignBasicInformationComponent,
EditCampaignConversionComponent,
EditCampaignAdditionalTargetingComponent,
EditCampaignCreateAdsComponent,
EditCampaignSummaryComponent
EditCampaignSummaryComponent,
];

const advertiserComponents = [
Expand All @@ -63,7 +66,7 @@ const advertiserComponents = [
DashboardComponent,
CampaignDetailsComponent,
AdListComponent,
AdListItemComponent
AdListItemComponent,
];

@NgModule({
Expand All @@ -72,25 +75,26 @@ const advertiserComponents = [
HttpModule,
AppCommonModule,
AdvertiserRoutingModule,
FontAwesomeModule,
FormsModule,
ReactiveFormsModule,
FileUploadModule,
OwlDateTimeModule,
OwlNativeDateTimeModule,
OwlMomentDateTimeModule,
...matModules
...matModules,
],
providers: [
AdvertiserGuard,
CampaignResolver,
TargetingCriteriaResolver,
{provide: OWL_DATE_TIME_FORMATS, useValue: DATE_AND_TIME_PICKER_FORMATS}
{provide: OWL_DATE_TIME_FORMATS, useValue: DATE_AND_TIME_PICKER_FORMATS},
],

declarations: [
CampaignBudgetPerDayPipe,
...advertiserComponents,
...editCampaignComponents
...editCampaignComponents,
]
})
export class AdvertiserModule {
Expand Down
3 changes: 1 addition & 2 deletions src/app/advertiser/advertiser.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Store } from "@ngrx/store";
import { environment } from 'environments/environment';
import { Campaign, CampaignTotalsResponse } from 'models/campaign.model';
import { Campaign, CampaignConversion, CampaignTotalsResponse } from 'models/campaign.model';
import { TargetingOption } from 'models/targeting-option.model';
import { parseTargetingForBackend } from 'common/components/targeting/targeting.helpers';
import { NavigationStart, Router } from "@angular/router";
Expand Down Expand Up @@ -59,7 +59,6 @@ export class AdvertiserService {
const targetingObject = parseTargetingForBackend(campaign.targetingArray);
Object.assign(campaign, {targeting: targetingObject});
}

return this.http.patch<Campaign>(`${environment.apiUrl}/campaigns/${campaign.id}`, {campaign});
}

Expand Down
Loading

0 comments on commit 848cbf9

Please sign in to comment.