Skip to content

Complaints #47

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

preetamozarde3
Copy link

The following changes have been made in this branch:

  • A complaint/suggestions module has been added to the app.
  • A complaint/suggestions tab has been added in the navigation bar, on the clicking of which the user is taken to the complaints home page.
  • On this page, the user can:
    • View all the complaints posted in the app.
    • Up vote a complaint if they are in support of it.
    • Subscribe to a particular complaint.
    • Navigate to the complaint details page to view the details of a particular complaint by clicking on the complaint card.
    • Navigate to the file complaints page to post a new complaint by clicking on the 'Vent your issues' button at the top of the page.
  • The file complaints page allows the user to file a new complaint. They can add the following information along with the description to give a more complete account of their issue:
    • Images, suggestions, location details and tags
  • The complaint details page has the following features:
    • The users can view the description, suggestions and location details added by the creator.
    • The users can view the images and tags (if any) associated with the complaint.
    • The users can comment, up vote or subscribe to the complaint if the wish.
  • All the components along with the associated HTML and CSS files for the aforementioned three pages have been added to a new folder named venter.
  • Apart from this, additions have been made to the nav menu, data service, interfaces, API and assets.

@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
@DevCom-IITB DevCom-IITB deleted a comment Feb 6, 2019
Copy link
Collaborator

@pulsejet pulsejet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@preetamozarde3 I haven't been through everything, but have highlighted a few issues here. You might want to use an IDE like VS Code that has linting built in to fix lint issues.

"@angular-devkit/build-angular": "^0.13.0",
"@angular/cli": "^7.0.2",
"@angular/compiler-cli": "^7.0.0",
"@angular/language-service": "^7.0.0",
Copy link
Collaborator

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 and package-lock.json

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';
Copy link
Collaborator

Choose a reason for hiding this comment

The 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 material-angular.module.ts. Any extra @angular/material module imports should be placed there.

@@ -100,6 +119,21 @@ import { CardComponent } from './card/card.component';
HttpClientModule,
FormsModule,
BrowserAnimationsModule,
AgmCoreModule.forRoot({
apiKey: 'AIzaSyCKNBwrs1UdT2s1jwqOypSzas9Z4s6h4B0'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Never commit API keys
  2. I thought we were not going to use google maps here?

@@ -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' } },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Place these between login and feedback with a whitespace above and below


GetComplaint(uuid: string): Observable<IComplaint> {
return this.FireGET<IComplaint>(API.Complaint, {uuid: uuid});
}
Copy link
Collaborator

Choose a reason for hiding this comment

The 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.

<br>

<a button class="upVote-button" (click)="upVoteComplaint(detailedComplaint.upvoted)">
UPVOTE
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to a mat button

import { API } from '../../../api';
import * as moment from 'moment';


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra whitespace

this.statusColor = 'red';
} else if (this.detailedComplaint.status === 'Resolved') {
this.statusColor = 'green';
} else if (this.detailedComplaint.status === 'In progress') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above; you could refactor this to a different file altogether

if (this.complaintId) {
this.dataService.FireGET<IComplaint>(API.Complaint, { complaintId: this.complaintId }).subscribe(result => {
this.detailedComplaint = result;
console.log(this.detailedComplaint);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No logging

</g>
<g>
</g>
<g>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these empty tags

@pulsejet pulsejet mentioned this pull request Feb 8, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants