mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Updated feed page
This commit is contained in:
@@ -1,9 +1,183 @@
|
|||||||
<ion-header>
|
<ion-header translucent="true">
|
||||||
|
<!-- <ion-buttons *ngIf="!showSearchbar" slot="start">
|
||||||
|
<ion-menu-button></ion-menu-button>
|
||||||
|
</ion-buttons> -->
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar>
|
||||||
<ion-title>feed</ion-title>
|
<app-custom-header></app-custom-header>
|
||||||
|
<ion-segment *ngIf="ios" [(ngModel)]="segment">
|
||||||
|
<ion-segment-button value="combinada">
|
||||||
|
Combinada
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="oficial">
|
||||||
|
Oficial
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="pessoal">
|
||||||
|
Pessoal
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
|
</ion-toolbar>
|
||||||
|
<!-- TABS -->
|
||||||
|
<ion-toolbar *ngIf="!ios">
|
||||||
|
<ion-segment [(ngModel)]="segment">
|
||||||
|
<ion-segment-button value="combinada">
|
||||||
|
Combinada
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="oficial">
|
||||||
|
Oficial
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="pessoal">
|
||||||
|
Pessoal
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
<!-- List of Text Items -->
|
||||||
|
<div [ngSwitch]="segment">
|
||||||
|
<ion-list *ngSwitchCase="'combinada'">
|
||||||
|
<ion-item-group>
|
||||||
|
<ion-item-divider>
|
||||||
|
<ion-label>8:00 am</ion-label>
|
||||||
|
</ion-item-divider>
|
||||||
|
<ion-item-sliding>
|
||||||
|
<ion-item lines="none">
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="div-up">
|
||||||
|
<div class="div-icon">
|
||||||
|
<ion-icon slot="start" name="chatbox"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-content">
|
||||||
|
<h3>Reunião de Conselho de Ministros</h3>
|
||||||
|
<p>08:30 - 10:30</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton">
|
||||||
|
<div class="div-botton-left">
|
||||||
|
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-middle">
|
||||||
|
<p class="item-list-small">Luanda, Palácio presidencial</p>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-right">
|
||||||
|
<ion-icon class="ion-icon-attach" slot="end" name="attach-outline"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item-divider>
|
||||||
|
<ion-label>9:00 am</ion-label>
|
||||||
|
</ion-item-divider>
|
||||||
|
<ion-item lines="none">
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="div-up">
|
||||||
|
<div class="div-icon">
|
||||||
|
<ion-icon slot="start" name="chatbox"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-content">
|
||||||
|
<h3>Conference call Particular</h3>
|
||||||
|
<p>11:00 - 12:30</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton">
|
||||||
|
<div class="div-botton-left">
|
||||||
|
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-middle">
|
||||||
|
<p class="item-list-small">Luanda, Palácio presidencial</p>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-right">
|
||||||
|
<ion-icon class="ion-icon-attach" slot="end" name="attach"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-item>
|
||||||
|
</ion-item-sliding>
|
||||||
|
</ion-item-group>
|
||||||
|
</ion-list>
|
||||||
|
<!-- OFICIAL -->
|
||||||
|
<ion-list *ngSwitchCase="'oficial'">
|
||||||
|
<ion-item-group>
|
||||||
|
<ion-item-sliding>
|
||||||
|
<ion-item-divider>
|
||||||
|
<ion-label>8:00 am</ion-label>
|
||||||
|
</ion-item-divider>
|
||||||
|
<ion-item lines="none">
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="div-up">
|
||||||
|
<div class="div-icon">
|
||||||
|
<ion-icon slot="start" name="chatbox"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-content">
|
||||||
|
<h3>Reunião de Conselho de Ministros</h3>
|
||||||
|
<p>08:30 - 10:30</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton">
|
||||||
|
<div class="div-botton-left">
|
||||||
|
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-middle">
|
||||||
|
<p class="item-list-small">Luanda, Palácio presidencial</p>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-right">
|
||||||
|
<ion-icon class="ion-icon-attach" slot="end" name="document-attach"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-item>
|
||||||
|
<!--
|
||||||
|
<ion-item lines="none">
|
||||||
|
<ion-icon slot="start" name="chatbox"></ion-icon>
|
||||||
|
<ion-label>
|
||||||
|
<h3>Conference call Particular</h3>
|
||||||
|
<p>11:00 - 12:30</p>
|
||||||
|
</ion-label>
|
||||||
|
</ion-item>
|
||||||
|
<ion-item class="ion-item-class" lines="none">
|
||||||
|
<ion-icon class="ion-icon-size" slot="start" name="location"></ion-icon>
|
||||||
|
<ion-label class="label-text">
|
||||||
|
<p class="item-list-small">Luanda, Palácio presidencial</p>
|
||||||
|
</ion-label>
|
||||||
|
<ion-icon class="ion-icon-size" slot="end" name="attach-outline"></ion-icon>
|
||||||
|
</ion-item>
|
||||||
|
-->
|
||||||
|
</ion-item-sliding>
|
||||||
|
</ion-item-group>
|
||||||
|
</ion-list>
|
||||||
|
<ion-list *ngSwitchCase="'pessoal'">
|
||||||
|
<ion-item-group>
|
||||||
|
<ion-item-sliding>
|
||||||
|
<ion-item-divider>
|
||||||
|
<ion-label>9:00 am</ion-label>
|
||||||
|
</ion-item-divider>
|
||||||
|
<ion-item lines="none">
|
||||||
|
<div class="div-item">
|
||||||
|
<div class="div-up">
|
||||||
|
<div class="div-icon">
|
||||||
|
<ion-icon slot="start" name="chatbox"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-content">
|
||||||
|
<h3>Conference call Particular</h3>
|
||||||
|
<p>11:00 - 12:30</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton">
|
||||||
|
<div class="div-botton-left">
|
||||||
|
<ion-icon class="ion-icon-location" slot="start" name="location"></ion-icon>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-middle">
|
||||||
|
<p class="item-list-small">Luanda, Palácio presidencial</p>
|
||||||
|
</div>
|
||||||
|
<div class="div-botton-right">
|
||||||
|
<ion-icon class="ion-icon-attach" slot="end" name="document-attach"></ion-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ion-item>
|
||||||
|
</ion-item-sliding>
|
||||||
|
</ion-item-group>
|
||||||
|
</ion-list>
|
||||||
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|||||||
@@ -0,0 +1,91 @@
|
|||||||
|
/* CONTENT */
|
||||||
|
.item-list-small{
|
||||||
|
font-size: 11px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.ion-item-class{
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
.label-text{
|
||||||
|
width: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//DIV
|
||||||
|
.div-item{
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
border-bottom: 1px solid #ccc;
|
||||||
|
margin: 10px 0 5px 0;
|
||||||
|
}
|
||||||
|
.div-up{
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
.div-up h3{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 15px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.div-icon{
|
||||||
|
width: 10%;
|
||||||
|
font-size: 20px;
|
||||||
|
float: left;
|
||||||
|
color: #808080;
|
||||||
|
}
|
||||||
|
.div-icon ion-icon{
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
.div-content{
|
||||||
|
width: 85%;
|
||||||
|
float: left;
|
||||||
|
border-left: 2px solid orange;
|
||||||
|
padding: 0 0 0 5px;
|
||||||
|
}
|
||||||
|
.div-content p{
|
||||||
|
font-size: 10.5pt;
|
||||||
|
color: rgb(94, 92, 92);
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.div-botton{
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
margin: 5px 0 5px 0;
|
||||||
|
}
|
||||||
|
.div-botton-left{
|
||||||
|
width: 10%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
|
.ion-icon-location{
|
||||||
|
text-align: center;
|
||||||
|
display: block;
|
||||||
|
color: #000;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
.div-botton-middle{
|
||||||
|
width: 75%;
|
||||||
|
float: left;
|
||||||
|
margin-top: 0.5px;
|
||||||
|
}
|
||||||
|
.div-botton-middle p{
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.div-botton-right{
|
||||||
|
width: 10%;
|
||||||
|
float: left;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.ion-icon-attach{
|
||||||
|
color: #666666;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
@@ -7,9 +7,13 @@ import { Component, OnInit } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class FeedPage implements OnInit {
|
export class FeedPage implements OnInit {
|
||||||
|
|
||||||
|
segment:string;
|
||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
//Inicializar segment
|
||||||
|
this.segment = "combinada";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<ion-input type="text" name="domainName" [(ngModel)]="postData.domainName"></ion-input>
|
<ion-input type="text" name="domainName" [(ngModel)]="postData.domainName"></ion-input>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
|
|
||||||
<ion-button expand="block" shape="round" color="primary" (click)="loginAction()">Entrar</ion-button>
|
<ion-button expand="block" shape="round" color="primary" (click)="simpleLogin()">Entrar</ion-button>
|
||||||
|
|
||||||
<ion-item lines="none">
|
<ion-item lines="none">
|
||||||
<a routerLink="/signup">Criar conta</a>
|
<a routerLink="/signup">Criar conta</a>
|
||||||
|
|||||||
@@ -36,25 +36,34 @@ export class LoginPage implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
loginAction(){
|
loginRequest(){
|
||||||
//Go to our home in home/feed.
|
/* axios.get('https://gpr-dev-08.gabinetedigital.local/api/v2.0/me/calendarview?startDateTime=2014-10-01T01:00:00&endDateTime=2020-10-31T23:00:00')
|
||||||
/* this.router.navigate(['/home/feed']); */
|
.then(response => {
|
||||||
/* console.log(this.postData); */
|
console.log(response.data.url);
|
||||||
|
console.log(response.data.explanation);
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.log(error);
|
||||||
|
}); */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
loginAction(){/*
|
||||||
if(this.validateInput()){
|
if(this.validateInput()){
|
||||||
//Try to login
|
//Try to login
|
||||||
this.authService.login(this.postData).subscribe((res: any)=> {
|
this.authService.login(this.postData).subscribe((res: any)=> {
|
||||||
/* userData must be in the API results as paratemers otherwise change to the param that is in the API */
|
//userData must be in the API results as paratemers otherwise change to the param that is in the API
|
||||||
if(res.userData){
|
if(res.userData){
|
||||||
/* Then we store this information at the staorage service */
|
//Then we store this information at the staorage service
|
||||||
this.storageService.store(AuthConnstants.AUTH, res.userData);
|
this.storageService.store(AuthConnstants.AUTH, res.userData);
|
||||||
/* Then go to home view */
|
//Then go to home view
|
||||||
this.router.navigate(['home']);
|
this.router.navigate(['home']);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log("Os dados inseridos são inválidos");
|
console.log("Os dados inseridos são inválidos");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* Write a connection error */
|
///Write a connection error
|
||||||
(error: any)=>{
|
(error: any)=>{
|
||||||
console.log("Erro de conexão com a API.");
|
console.log("Erro de conexão com a API.");
|
||||||
}
|
}
|
||||||
@@ -63,7 +72,19 @@ export class LoginPage implements OnInit {
|
|||||||
else{
|
else{
|
||||||
//Display an error message
|
//Display an error message
|
||||||
console.log("Preencha todos campos");
|
console.log("Preencha todos campos");
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
simpleLogin(){
|
||||||
|
//Go to our home in home/feed.
|
||||||
|
if(this.validateInput()){
|
||||||
|
this.router.navigate(['/home/feed']);
|
||||||
|
console.log(this.postData);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
console.log("Preencha todos campos");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export class AuthService {
|
|||||||
private router: Router
|
private router: Router
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
login(postData: any): Observable<any> {
|
/* login(postData: any): Observable<any> {
|
||||||
return this.httpService.post('login', postData);
|
return this.httpService.post('login', postData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,5 +29,5 @@ export class AuthService {
|
|||||||
this.router.navigate([''])
|
this.router.navigate([''])
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
import { HttpClient, HttpHeaders } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { environment } from '../../environments/environment';
|
import { environment } from '../../environments/environment';
|
||||||
|
import { reject } from 'q';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -8,11 +9,37 @@ providedIn: 'root'
|
|||||||
export class HttpService {
|
export class HttpService {
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient) {}
|
||||||
|
|
||||||
post(serviceName: string, data: any) {
|
/* post(serviceName: string, data: any) {
|
||||||
const headers = new HttpHeaders();
|
const headers = new HttpHeaders();
|
||||||
const options = { headers: headers, withCredintials: false };
|
const options = { headers: headers, withCredintials: false };
|
||||||
const url = environment.apiURL + serviceName;
|
const url = environment.apiURL + serviceName;
|
||||||
|
|
||||||
return this.http.post(url, JSON.stringify(data), options);
|
return this.http.post(url, JSON.stringify(data), options);
|
||||||
|
} */
|
||||||
|
|
||||||
|
private API_URL = 'https://gpr-dev-08.gabinetedigital.local/api/v2.0/me/calendarview';
|
||||||
|
|
||||||
|
/* loginRequest(username:string, password: string, domain: string){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
var data = {
|
||||||
|
emusernameail: username,
|
||||||
|
password: password,
|
||||||
|
domain: domain
|
||||||
|
};
|
||||||
|
this.http.post(this.API_URL, data)
|
||||||
|
.subscribe(result: any)=> {
|
||||||
|
resolve(result.json());
|
||||||
|
},
|
||||||
|
(error)=>{
|
||||||
|
reject(error.json());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
} */
|
||||||
|
/* request(API_URL, { json: true },{username:"tiago.kayaya"}, {password:"tabteste@006"}, {domain:"gabinetedigital.local"} ,(err, res, body) => {
|
||||||
|
if (err) { return console.log(err); }
|
||||||
|
console.log(body.url);
|
||||||
|
console.log(body.explanation);
|
||||||
|
}); */
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user