-
Notifications
You must be signed in to change notification settings - Fork 38
Complaints #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complaints #47
Changes from all commits
bc78eef
d0ab16a
9ce0d43
805109f
a8e5d0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,22 @@ import { RedirComponent } from './redir/redir.component'; | |
import { UpdateRoleComponent } from './update-role/update-role.component'; | ||
import { CardComponent } from './card/card.component'; | ||
|
||
import { ComplaintsHomeComponent } from './venter/complaints-home/complaints-home.component'; | ||
import { MatTabsModule } from '@angular/material/tabs'; | ||
import { MatCardModule } from '@angular/material/card'; | ||
import { MatGridListModule } from '@angular/material/grid-list'; | ||
import { MatListModule } from '@angular/material/list'; | ||
import { MatFormFieldModule } from '@angular/material/form-field'; | ||
import { FileComplaintComponent } from './venter/file-complaint/file-complaint.component'; | ||
import { MatInputModule } from '@angular/material'; | ||
import { AgmCoreModule } from '@agm/core'; | ||
import { MatAutocompleteModule } from '@angular/material/autocomplete'; | ||
import { MatChipsModule } from '@angular/material/chips'; | ||
import { MatButtonModule } from '@angular/material/button'; | ||
import { MatDialogModule } from '@angular/material'; | ||
import { DetailedComplaintComponent } from './venter/detailed-complaint/detailed-complaint.component'; | ||
import { MatDividerModule } from '@angular/material/divider'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All these imports don't belong here. Most of them are already imported in |
||
|
||
@NgModule({ | ||
declarations: [ | ||
AppComponent, | ||
|
@@ -91,7 +107,10 @@ import { CardComponent } from './card/card.component'; | |
NotifyCardComponent, | ||
RedirComponent, | ||
UpdateRoleComponent, | ||
CardComponent | ||
CardComponent, | ||
ComplaintsHomeComponent, | ||
FileComplaintComponent, | ||
DetailedComplaintComponent, | ||
], | ||
imports: [ | ||
BrowserModule, | ||
|
@@ -100,6 +119,21 @@ import { CardComponent } from './card/card.component'; | |
HttpClientModule, | ||
FormsModule, | ||
BrowserAnimationsModule, | ||
AgmCoreModule.forRoot({ | ||
apiKey: 'AIzaSyCKNBwrs1UdT2s1jwqOypSzas9Z4s6h4B0' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
}), | ||
|
||
MatTabsModule, | ||
MatCardModule, | ||
MatGridListModule, | ||
MatListModule, | ||
MatFormFieldModule, | ||
MatInputModule, | ||
MatAutocompleteModule, | ||
MatChipsModule, | ||
MatButtonModule, | ||
MatDialogModule, | ||
MatDividerModule, | ||
|
||
ImgFallbackModule, | ||
MarkdownModule.forRoot(), | ||
|
@@ -121,6 +155,10 @@ import { CardComponent } from './card/card.component'; | |
{ path: 'settings', component: SettingsComponent, data: { state: 'base' } }, | ||
{ path: 'about', component: AboutComponent, data: { state: 'overlay' } }, | ||
|
||
{ path: 'venter/complaints-home', component: ComplaintsHomeComponent, data: { state: 'base' } }, | ||
{ path: 'venter/file-complaint', component: FileComplaintComponent, data: { state: 'base' } }, | ||
{ path: 'venter/detailed-complaint/:id', component: DetailedComplaintComponent, data: { state: 'base' } }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Place these between |
||
|
||
{ path: 'add-event', component: AddEventComponent, data: { state: 'overlay' }, canActivate: [LoginActivate] }, | ||
{ path: 'edit-event/:id', component: AddEventComponent, data: { state: 'overlay' }, canActivate: [LoginActivate] }, | ||
{ path: 'edit-body/:id', component: UpdateBodyComponent, data: { state: 'overlay' }, canActivate: [LoginActivate] }, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Observable , Subject, noop } from 'rxjs'; | ||
import { HttpClient, HttpHeaders, HttpRequest, HttpEventType } from '@angular/common/http'; | ||
import { IEnumContainer, IUserProfile, ILocation, IEvent, IBody, INewsEntry, INotification } from './interfaces'; | ||
import { IEnumContainer, IUserProfile, ILocation, IEvent, IBody, INewsEntry, INotification, IComplaint } from './interfaces'; | ||
import { Router } from '@angular/router'; | ||
import { environment } from '../environments/environment'; | ||
import * as uriTemplates from 'uri-templates'; | ||
|
@@ -437,4 +437,8 @@ export class DataService { | |
getBodyUrl(body: IBody): string { | ||
return window.location.origin + '/org/' + body.str_id; | ||
} | ||
|
||
GetComplaint(uuid: string): Observable<IComplaint> { | ||
return this.FireGET<IComplaint>(API.Complaint, {uuid: uuid}); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this really necessary? I can hardly imaging this function being called in more than two places. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
.container { | ||
margin-right: 18%; | ||
margin-left: 18%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combine as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, it's usually a really bad idea to specify such big margins in percent; instead make the width and height correct and specify margins in an absolute unit. |
||
} | ||
|
||
.toolbar { | ||
padding-top: 100px; | ||
padding-bottom: 100px; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combine as |
||
background-color: blue; | ||
align-content: center; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are we using flexbox here? I don't think |
||
text-align: center; | ||
} | ||
|
||
.complaint-text { | ||
color: white; | ||
font-weight: bolder; | ||
} | ||
|
||
.complaint-button { | ||
color: black; | ||
background-color: yellow; | ||
padding: 10px 50px; | ||
align-content: center; | ||
font-weight: bold; | ||
text-decoration: none; | ||
} | ||
|
||
.complaint-tabs { | ||
font-weight: bold; | ||
padding-bottom: 10px; | ||
padding-top: 10px; | ||
margin: auto; | ||
text-decoration: none; | ||
} | ||
|
||
.complaint-card { | ||
padding: 2.5%; | ||
text-decoration: none; | ||
} | ||
|
||
.complaint-divider { | ||
padding: 1%; | ||
color: royalblue; | ||
} | ||
|
||
.complaint-card-content { | ||
font-size: medium; | ||
padding-top: 3%; | ||
} | ||
|
||
.complaint-description { | ||
font-family: Arial, Helvetica, sans-serif; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't specify the font |
||
white-space: pre-wrap; | ||
} | ||
|
||
.card { | ||
margin: auto; | ||
margin-top: 5%; | ||
margin-bottom: 5%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combine |
||
width: 80%; | ||
} | ||
|
||
.footer{ | ||
position: relative; | ||
border-style: solid; | ||
text-align: center; | ||
margin: auto; | ||
border-width: medium; | ||
border-color: royalblue; | ||
border-bottom-left-radius: 5% 100%; | ||
border-bottom-right-radius: 5% 100%; | ||
border-top-left-radius: 5% 100%; | ||
border-top-right-radius: 5% 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? I don't think this is going to fit into the app theme, which restricts borders to strictly circular. |
||
} | ||
|
||
.status { | ||
float: right; | ||
background-color: red; | ||
border-width: medium; | ||
color: white; | ||
padding-left: 2.5%; | ||
padding-right: 2.5%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Combine |
||
border-bottom-left-radius: 25% 100%; | ||
border-bottom-right-radius: 25% 100%; | ||
border-top-left-radius: 25% 100%; | ||
border-top-right-radius: 25% 100%; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
font-weight: bold; | ||
text-transform: uppercase; | ||
} | ||
|
||
.status-color { | ||
background-color: lawngreen; | ||
} | ||
|
||
@media (max-width: 970px) { | ||
.container { | ||
margin: 0%; | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't change anything in
package.json
andpackage-lock.json