Skip to content
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

[Outreachy Task Submission]: Add Delete Icon [Survey] #980

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ <h1>{{ 'survey.tasks' | translate }}</h1>
>
{{ 'app.cancel' | translate }}
</mzima-client-button>

<mzima-client-button
(buttonClick)="save()"
[disabled]="form.invalid || form.disabled || errorTaskField || submitted"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
(change)="selectSurveys($event, survey)"
></mat-checkbox>
{{ survey.name }}
<!-- Added Font Awesome Delete Icon -->
<i class="fas fa-trash con" (click)="deleteSurvey()"></i>
</li>
</ul>
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,8 @@
}
}
}
// Styling to Align the icon to the end
.con {
float: right;
margin-left: 250px;
}
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,14 @@ export class SurveysComponent implements OnInit {
public generateDataQa(name: string): string {
return name.replace(/ /g, '-').toLowerCase();
}

// Added Method to delete the Survey
survey: string[] = ['Survey 1', 'Survey 2', 'Survey 3'];

deleteItem(item: string) {
const index = this.survey.indexOf(item);
if (index !== -1) {
this.survey.splice(index, 1);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// import { SearchResponse } from './../../../../../../../libs/sdk/src/lib/models/search-response.interface';
import { Component, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
Expand Down
2 changes: 1 addition & 1 deletion apps/web-mzima-client/src/env.json
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this change, it's not useful to others

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"production": true,
"backend_url": "https://mzima-dev-api.staging.ush.zone/",
"backend_url": "https://ceciliaoche.api.ushahidi.io/",
"api_v3": "api/v3/",
"api_v5": "api/v5/",
"mapbox_api_key": "pk.eyJ1IjoidXNoYWhpZGkiLCJhIjoiY2lxaXUzeHBvMDdndmZ0bmVmOWoyMzN6NiJ9.CX56ZmZJv0aUsxvH5huJBw",
Expand Down
30 changes: 17 additions & 13 deletions apps/web-mzima-client/src/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>PlatformClient</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="monetization" content="" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
</head>
<body class="mat-typography">
<app-root></app-root>
</body>
<head>
<meta charset="utf-8" />
<title>PlatformClient</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="monetization" content="" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
/>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
</head>
<body class="mat-typography">
<app-root></app-root>
</body>
</html>
Loading