[DEV] remove the unneeded in the upload list

This commit is contained in:
Edouard DUPIN 2022-03-12 22:41:50 +01:00
parent 6cc5195a19
commit 4c6dd426ba
2 changed files with 18 additions and 0 deletions

View File

@ -142,6 +142,14 @@
^^^This title already exist !!!
</span>
</td>
<td class="tool-colomn" >
<button class="button color-button-cancel color-shadow-black"
(click)="removeElmentFromList(data, $event.target.value)"
type="submit"
alt="Delete">
<i class="material-icons">delete</i>
</button>
</td>
</tr>
</tbody>
</table>

View File

@ -215,6 +215,16 @@ export class UploadScene implements OnInit {
data.title = _value;
this.updateNeedSend();
}
removeElmentFromList (data: FileParsedElement, _value: any): void {
for (let iii=0; iii< this.parsedElement.length; iii++) {
if (this.parsedElement[iii] === data) {
this.parsedElement.splice(iii, 1);
break;
}
}
this.parsedFailedElement.push(new FileFailParsedElement(data.file, "Removed by user."));
this.updateNeedSend();
}
onUniverse (_value: any): void {
this.global_universe = _value;