small fixes
This commit is contained in:
parent
cd4e2aa77b
commit
78093ce2ff
@ -53,7 +53,8 @@ export class AppComponent implements OnInit{
|
||||
}
|
||||
|
||||
bugReportContent() {
|
||||
return `mailto:lukas.veit@de.bosch.com?subject=Bug report&body=Thanks for sending the report! Your bug will be (hopefully) fixed soon.
|
||||
return `mailto:${this.d.contact.mail}?subject=Bug report&body=Thanks for sending the report! Your bug will be
|
||||
(hopefully) fixed soon.
|
||||
%0D%0A%0D%0A--- REPORT DATA ---
|
||||
%0D%0A%0D%0ATime: ${new Date().toString()}%0D%0A
|
||||
URL: ${this.window.location}%0D%0A%0D%0AWhat did you do?%0D%0A${encodeURIComponent(this.bugReport.do)}
|
||||
|
@ -97,6 +97,8 @@ export class MaterialComponent implements OnInit, AfterContentChecked {
|
||||
|
||||
materialSave() {
|
||||
this.api.put('/material/' + this.material._id, this.material.sendFormat(), () => {
|
||||
delete this.d.arr.materials;
|
||||
this.d.load('materials');
|
||||
this.router.navigate(['/materials']);
|
||||
});
|
||||
}
|
||||
|
@ -122,14 +122,13 @@ export class RbArrayInputComponent implements ControlValueAccessor, OnInit, Afte
|
||||
this.values = [this.values[0]];
|
||||
res = this.values;
|
||||
}
|
||||
// if (!res.length) {
|
||||
// res = [''];
|
||||
// }
|
||||
if (!res.length) {
|
||||
res = [''];
|
||||
}
|
||||
this.onChange(res); // trigger ngModel with filled elements
|
||||
}
|
||||
|
||||
writeValue(obj: any) { // add empty value on init
|
||||
console.log(obj);
|
||||
if (obj) {
|
||||
if (this.pushTemplate !== null) {
|
||||
if (this.pushPath) {
|
||||
|
@ -339,6 +339,7 @@ export class SamplesComponent implements OnInit {
|
||||
|
||||
updateFilterFields(field) {
|
||||
const filter = this.filters.filters.find(e => e.field === field);
|
||||
console.log(filter);
|
||||
filter.active = !(filter.values.length === 1 && filter.values[0] === '');
|
||||
}
|
||||
|
||||
|
@ -93,24 +93,23 @@ export class TemplatesComponent implements OnInit {
|
||||
}
|
||||
});
|
||||
if (valid) {
|
||||
console.log('valid', template);
|
||||
const sendData = {name: template.name, parameters: template.parameters.map(e => omit(e, ['rangeString']))};
|
||||
if (first_id === 'null') {
|
||||
this.api.post<TemplateModel>(`/template/${this.collection}/new`, sendData, data => {
|
||||
if (data.version > template.version) { // there were actual changes and a new version was created
|
||||
this.templates.push(data);
|
||||
}
|
||||
this.templateFormat();
|
||||
this.d.idReload(this.collection + 'Templates');
|
||||
this.api.post<TemplateModel>(`/template/${this.collection}/new`, sendData, () => {
|
||||
delete this.d.arr[this.collection + 'Templates'];
|
||||
this.d.load(this.collection + 'Templates', () => {
|
||||
this.templates = this.d.arr[this.collection + 'Templates'];
|
||||
this.templateFormat();
|
||||
});
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.api.put<TemplateModel>(`/template/${this.collection}/${template.first_id}`, sendData, data => {
|
||||
if (data.version > template.version) { // there were actual changes and a new version was created
|
||||
this.templates.push(data);
|
||||
}
|
||||
this.templateFormat();
|
||||
this.d.idReload(this.collection + 'Templates');
|
||||
this.api.put<TemplateModel>(`/template/${this.collection}/${template.first_id}`, sendData, () => {
|
||||
delete this.d.arr[this.collection + 'Templates'];
|
||||
this.d.load(this.collection + 'Templates', () => {
|
||||
this.templates = this.d.arr[this.collection + 'Templates'];
|
||||
this.templateFormat();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
<rb-icon-button icon="add" mode="primary" (click)="addNewUser()">New user</rb-icon-button>
|
||||
<rb-icon-button icon="add" mode="primary" (click)="addNewUser()" class="space-below">New user</rb-icon-button>
|
||||
|
||||
<form *ngIf="newUser" #userForm="ngForm">
|
||||
<form *ngIf="newUser" #userForm="ngForm" class="space-below">
|
||||
<rb-form-input name="name" label="user name" appValidate="username" required [(ngModel)]="newUser.name"
|
||||
#nameInput="ngModel">
|
||||
<ng-template rbFormValidationMessage="failure">{{nameInput.errors.failure}}</ng-template>
|
||||
|
@ -10,3 +10,7 @@ td:last-child rb-icon-button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
rb-form-select {
|
||||
min-width: 150px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user