Add twitter account field for portal - development only

This commit is contained in:
Alex Martzios 2021-10-21 12:39:27 +03:00
parent 5c7430ae7c
commit 6f26aa0f89
3 changed files with 6 additions and 0 deletions

View File

@ -103,6 +103,9 @@
type="text" placeholder="Write piwik id of portal" type="text" placeholder="Write piwik id of portal"
label="Piwik id"> label="Piwik id">
</div> </div>
<!-- <div *ngIf="properties.environment == 'development'" dashboard-input [formInput]="portalForm.get('twitterAccount')" type="text"
placeholder="Write twitter account of portal" label="Twitter Account">
</div> -->
<input type="hidden" formControlName="_id"> <input type="hidden" formControlName="_id">
</form> </form>

View File

@ -167,6 +167,7 @@ export class PortalsComponent implements OnInit {
name: this._fb.control(portal.name, Validators.required), name: this._fb.control(portal.name, Validators.required),
pid: this._fb.control(portal.pid, Validators.required), pid: this._fb.control(portal.pid, Validators.required),
piwik: this._fb.control(portal.piwik), piwik: this._fb.control(portal.piwik),
twitterAccount: this._fb.control(portal.twitterAccount),
type: this._fb.control(portal.type, Validators.required), type: this._fb.control(portal.type, Validators.required),
}); });
this.portalForm.get('type').disable(); this.portalForm.get('type').disable();
@ -182,6 +183,7 @@ export class PortalsComponent implements OnInit {
name: this._fb.control('', Validators.required), name: this._fb.control('', Validators.required),
pid: this._fb.control('', Validators.required), pid: this._fb.control('', Validators.required),
piwik: this._fb.control(''), piwik: this._fb.control(''),
twitterAccount: this._fb.control(''),
type: this._fb.control('', Validators.required), type: this._fb.control('', Validators.required),
}); });
this.portalModalOpen('Create Portal', 'Create'); this.portalModalOpen('Create Portal', 'Create');

View File

@ -7,6 +7,7 @@ export class Portal {
name: string; name: string;
type: string; type: string;
piwik:number; piwik:number;
twitterAccount: string;
entities: string[] | Entity[]; entities: string[] | Entity[];
pages: string[] | Page[]; pages: string[] | Page[];