working and no errors on front or back ends
This commit is contained in:
@ -7,13 +7,13 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { {{Component}}Config } from './{{component}}Types.ts';
|
||||
import { {{component}}Service } from './{{component}}Service.ts';
|
||||
import { {{Component}}Config } from './{{component}}Types';
|
||||
import { {{component}}Service } from './{{component}}Service';
|
||||
|
||||
@Component
|
||||
export default class {{Component}}Editor extends Vue {
|
||||
@Prop() private id!: string;
|
||||
private {{component}}!: {{Component}}Config = {
|
||||
private {{component}}: {{Component}}Config = {
|
||||
// SYSTEM-BUILDER-init-props
|
||||
};
|
||||
private loading: boolean = false;
|
||||
|
@ -13,13 +13,13 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { {{component}}Service } from './{{component}}Service.ts';
|
||||
import { {{Component}}Config } from './{{component}}Types.ts';
|
||||
import { {{component}}Service } from './{{component}}Service';
|
||||
import { {{Component}}Config } from './{{component}}Types';
|
||||
|
||||
@Component
|
||||
export default class {{Component}}Editor extends Vue {
|
||||
@Prop() private id!: string;
|
||||
private {{component}}!: {{Component}}Config = {
|
||||
@Prop() private {{component}}_id!: string;
|
||||
private {{component}}: {{Component}}Config = {
|
||||
// SYSTEM-BUILDER-init-props
|
||||
};
|
||||
private loading: boolean = false;
|
||||
@ -40,7 +40,7 @@ export default class {{Component}}Editor extends Vue {
|
||||
private loadDetails() {
|
||||
this.loading = true;
|
||||
this.errorMessage = '';
|
||||
{{component}}Service.get{{Component}}(this.id).then((res: {{Component}}Config) => {
|
||||
{{component}}Service.get{{Component}}(this.{{component}}_id).then((res: {{Component}}Config) => {
|
||||
this.loading = false;
|
||||
this.errorMessage = '';
|
||||
this.{{component}} = res;
|
||||
@ -59,7 +59,7 @@ export default class {{Component}}Editor extends Vue {
|
||||
this.close();
|
||||
}).catch(this.handleError.bind(this));
|
||||
} else {
|
||||
{{component}}Service.update{{Component}}(this.{{component}}).then(() => {
|
||||
{{component}}Service.update{{Component}}(this.{{component}}.{{component}}_id, this.{{component}}).then(() => {
|
||||
// success
|
||||
this.loading = false;
|
||||
this.errorMessage = '';
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Prop, Vue } from 'vue-property-decorator';
|
||||
import { {{component}}Service } from './{{component}}Service.ts';
|
||||
import { {{Component}}Config } from './{{component}}Types.ts';
|
||||
import { {{component}}Service } from './{{component}}Service';
|
||||
import { {{Component}}Config } from './{{component}}Types';
|
||||
|
||||
@Component
|
||||
export default class {{Component}}Editor extends Vue {
|
||||
@ -31,7 +31,7 @@ export default class {{Component}}Editor extends Vue {
|
||||
// SYSTEM-BUILDER-component-functions
|
||||
|
||||
private mounted() {
|
||||
get{{Components}}();
|
||||
this.get{{Components}}();
|
||||
}
|
||||
|
||||
// TODO: add a search function if there is an endpoint with type 'search'
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { del, get, post, put } from '@/services/fetch';
|
||||
import { {{Component}}Config } from './{{component}}Types';
|
||||
|
||||
class {{Component}}Service {
|
||||
// SYSTEM-BUILDER-service-variables
|
||||
|
Reference in New Issue
Block a user