started work on supermarket edit view

This commit is contained in:
vabene1111
2021-05-31 18:40:59 +02:00
parent 040af330cc
commit 6fc0c02674
20 changed files with 715 additions and 51 deletions

View File

@ -0,0 +1,160 @@
<template>
<div id="app">
<div class="row">
<div class="col col-md-12">
<h2>{{ $t('Supermarket') }}</h2>
<multiselect v-model="selected_supermarket" track-by="id" label="name"
:options="supermarkets">
</multiselect>
<b-button class="btn btn-primary btn-block" style="margin-top: 1vh" v-b-modal.modal-supermarket>
{{ $t('Edit') }}
</b-button>
<b-button class="btn btn-success btn-block" @click="selected_supermarket = {new:true, name:''}"
v-b-modal.modal-supermarket>{{ $t('New') }}
</b-button>
</div>
</div>
<hr>
<div class="row">
<div class="col col-md-6">
<h4>{{ $t('Categories') }}
<button class="btn btn-success btn-sm">{{ $t('New') }}</button>
</h4>
<draggable :list="categories" group="supermarket_categories"
:empty-insert-threshold="10">
<div v-for="c in categories" :key="c.id">
<button class="btn btn-block btn-sm btn-primary" style="margin-top: 0.5vh">{{ c.name }}</button>
</div>
</draggable>
</div>
<div class="col col-md-6">
<h4>{{ $t('Selected') }} {{ $t('Categories') }}</h4>
<draggable :list="selected_categories" group="supermarket_categories"
:empty-insert-threshold="10">
<div v-for="c in selected_categories" :key="c.id">
<button class="btn btn-block btn-sm btn-primary" style="margin-top: 0.5vh">{{ c.name }}</button>
</div>
</draggable>
</div>
</div>
<!-- EDIT MODALS -->
<b-modal id="modal-supermarket" v-bind:title="$t('Supermarket')" @ok="supermarketModalOk()">
<label v-if="selected_supermarket !== undefined">
{{ $t('Name') }}
<b-input v-model="selected_supermarket.name"></b-input>
</label>
</b-modal>
<b-modal id="modal-category" v-bind:title="$t('Category')" @ok="categoryModalOk()">
<label v-if="selected_supermarket !== undefined">
{{ $t('Name') }}
<b-input v-model="selected_supermarket.name"></b-input>
</label>
</b-modal>
</div>
</template>
<script>
import Vue from 'vue'
import {BootstrapVue} from 'bootstrap-vue'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import {ResolveUrlMixin, ToastMixin} from "@/utils/utils";
import {ApiApiFactory} from "@/utils/openapi/api.ts";
Vue.use(BootstrapVue)
import draggable from 'vuedraggable'
import axios from 'axios'
import Multiselect from "vue-multiselect";
axios.defaults.xsrfHeaderName = 'X-CSRFToken'
axios.defaults.xsrfCookieName = 'csrftoken'
export default {
name: 'SupermarketView',
mixins: [
ResolveUrlMixin,
ToastMixin,
],
components: {
Multiselect,
draggable
},
data() {
return {
supermarkets: [],
categories: [],
selected_supermarket: {},
selected_categories: [],
}
},
mounted() {
this.$i18n.locale = window.CUSTOM_LOCALE
console.log('LOADED')
this.loadInitial()
},
methods: {
loadInitial: function () {
let apiClient = new ApiApiFactory()
apiClient.listSupermarkets().then(results => {
this.supermarkets = results.data
})
apiClient.listSupermarketCategorys().then(results => {
this.categories = results.data
})
},
supermarketModalOk: function () {
let apiClient = new ApiApiFactory()
if (this.selected_supermarket.new) {
apiClient.createSupermarket({name: this.selected_supermarket.name}).then(results => {
this.selected_supermarket = undefined
this.loadInitial()
})
} else {
apiClient.partialUpdateSupermarket(this.selected_supermarket.id, {name: this.selected_supermarket.name})
}
},
categoryModalOk: function () {
let apiClient = new ApiApiFactory()
if (this.selected_supermarket.new) {
apiClient.createSupermarket({name: this.selected_supermarket.name}).then(results => {
this.selected_supermarket = undefined
this.loadInitial()
})
} else {
apiClient.partialUpdateSupermarket(this.selected_supermarket.id, {name: this.selected_supermarket.name})
}
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,10 @@
import Vue from 'vue'
import App from './SupermarketView.vue'
import i18n from '@/i18n'
Vue.config.productionTip = false
new Vue({
i18n,
render: h => h(App),
}).$mount('#app')

View File

@ -39,6 +39,10 @@
"Add": "Add",
"New": "New",
"Ingredients": "Ingredients",
"Supermarket": "Supermarket",
"Categories": "Categories",
"Category": "Category",
"Selected": "Selected",
"min": "min",
"Servings": "Servings",
"Waiting": "Waiting",

View File

@ -1642,6 +1642,25 @@ export interface Supermarket {
*/
category_to_supermarket?: Array<ShoppingListSupermarketCategoryToSupermarket>;
}
/**
*
* @export
* @interface SupermarketCategory
*/
export interface SupermarketCategory {
/**
*
* @type {number}
* @memberof SupermarketCategory
*/
id?: number;
/**
*
* @type {string}
* @memberof SupermarketCategory
*/
name: string;
}
/**
*
* @export
@ -1848,7 +1867,8 @@ export enum UserPreferenceThemeEnum {
Bootstrap = 'BOOTSTRAP',
Darkly = 'DARKLY',
Flatly = 'FLATLY',
Superhero = 'SUPERHERO'
Superhero = 'SUPERHERO',
Tandoor = 'TANDOOR'
}
/**
* @export
@ -2482,6 +2502,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
options: localVarRequestOptions,
};
},
/**
*
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSupermarketCategory: async (supermarketCategory?: SupermarketCategory, options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/api/supermarket-category/`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(supermarketCategory, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {Sync} [sync]
@ -3166,6 +3219,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
destroySupermarketCategory: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('destroySupermarketCategory', 'id', id)
const localVarPath = `/api/supermarket-category/{id}/`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@ -3859,6 +3945,35 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listSupermarketCategorys: async (options: any = {}): Promise<RequestArgs> => {
const localVarPath = `/api/supermarket-category/`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@ -4700,6 +4815,43 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
partialUpdateSupermarketCategory: async (id: string, supermarketCategory?: SupermarketCategory, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('partialUpdateSupermarketCategory', 'id', id)
const localVarPath = `/api/supermarket-category/{id}/`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(supermarketCategory, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -5400,6 +5552,39 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retrieveSupermarketCategory: async (id: string, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('retrieveSupermarketCategory', 'id', id)
const localVarPath = `/api/supermarket-category/{id}/`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@ -6236,6 +6421,43 @@ export const ApiApiAxiosParamCreator = function (configuration?: Configuration)
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSupermarketCategory: async (id: string, supermarketCategory?: SupermarketCategory, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'id' is not null or undefined
assertParamExists('updateSupermarketCategory', 'id', id)
const localVarPath = `/api/supermarket-category/{id}/`
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(supermarketCategory, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -6564,6 +6786,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createSupermarket(supermarket, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createSupermarketCategory(supermarketCategory?: SupermarketCategory, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupermarketCategory>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.createSupermarketCategory(supermarketCategory, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {Sync} [sync]
@ -6774,6 +7006,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.destroySupermarket(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async destroySupermarketCategory(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.destroySupermarketCategory(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -6980,6 +7222,15 @@ export const ApiApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.listStorages(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listSupermarketCategorys(options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SupermarketCategory>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.listSupermarketCategorys(options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {*} [options] Override http request option.
@ -7230,6 +7481,17 @@ export const ApiApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateSupermarket(id, supermarket, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async partialUpdateSupermarketCategory(id: string, supermarketCategory?: SupermarketCategory, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupermarketCategory>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.partialUpdateSupermarketCategory(id, supermarketCategory, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -7444,6 +7706,16 @@ export const ApiApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveSupermarket(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async retrieveSupermarketCategory(id: string, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupermarketCategory>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.retrieveSupermarketCategory(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -7691,6 +7963,17 @@ export const ApiApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateSupermarket(id, supermarket, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateSupermarketCategory(id: string, supermarketCategory?: SupermarketCategory, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SupermarketCategory>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateSupermarketCategory(id, supermarketCategory, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -7898,6 +8181,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
createSupermarket(supermarket?: Supermarket, options?: any): AxiosPromise<Supermarket> {
return localVarFp.createSupermarket(supermarket, options).then((request) => request(axios, basePath));
},
/**
*
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createSupermarketCategory(supermarketCategory?: SupermarketCategory, options?: any): AxiosPromise<SupermarketCategory> {
return localVarFp.createSupermarketCategory(supermarketCategory, options).then((request) => request(axios, basePath));
},
/**
*
* @param {Sync} [sync]
@ -8087,6 +8379,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
destroySupermarket(id: string, options?: any): AxiosPromise<void> {
return localVarFp.destroySupermarket(id, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
destroySupermarketCategory(id: string, options?: any): AxiosPromise<void> {
return localVarFp.destroySupermarketCategory(id, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -8272,6 +8573,14 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
listStorages(options?: any): AxiosPromise<Array<Storage>> {
return localVarFp.listStorages(options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listSupermarketCategorys(options?: any): AxiosPromise<Array<SupermarketCategory>> {
return localVarFp.listSupermarketCategorys(options).then((request) => request(axios, basePath));
},
/**
*
* @param {*} [options] Override http request option.
@ -8498,6 +8807,16 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
partialUpdateSupermarket(id: string, supermarket?: Supermarket, options?: any): AxiosPromise<Supermarket> {
return localVarFp.partialUpdateSupermarket(id, supermarket, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
partialUpdateSupermarketCategory(id: string, supermarketCategory?: SupermarketCategory, options?: any): AxiosPromise<SupermarketCategory> {
return localVarFp.partialUpdateSupermarketCategory(id, supermarketCategory, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -8691,6 +9010,15 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
retrieveSupermarket(id: string, options?: any): AxiosPromise<Supermarket> {
return localVarFp.retrieveSupermarket(id, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
retrieveSupermarketCategory(id: string, options?: any): AxiosPromise<SupermarketCategory> {
return localVarFp.retrieveSupermarketCategory(id, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -8915,6 +9243,16 @@ export const ApiApiFactory = function (configuration?: Configuration, basePath?:
updateSupermarket(id: string, supermarket?: Supermarket, options?: any): AxiosPromise<Supermarket> {
return localVarFp.updateSupermarket(id, supermarket, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateSupermarketCategory(id: string, supermarketCategory?: SupermarketCategory, options?: any): AxiosPromise<SupermarketCategory> {
return localVarFp.updateSupermarketCategory(id, supermarketCategory, options).then((request) => request(axios, basePath));
},
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -9152,6 +9490,17 @@ export class ApiApi extends BaseAPI {
return ApiApiFp(this.configuration).createSupermarket(supermarket, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ApiApi
*/
public createSupermarketCategory(supermarketCategory?: SupermarketCategory, options?: any) {
return ApiApiFp(this.configuration).createSupermarketCategory(supermarketCategory, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {Sync} [sync]
@ -9383,6 +9732,17 @@ export class ApiApi extends BaseAPI {
return ApiApiFp(this.configuration).destroySupermarket(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ApiApi
*/
public destroySupermarketCategory(id: string, options?: any) {
return ApiApiFp(this.configuration).destroySupermarketCategory(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -9610,6 +9970,16 @@ export class ApiApi extends BaseAPI {
return ApiApiFp(this.configuration).listStorages(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ApiApi
*/
public listSupermarketCategorys(options?: any) {
return ApiApiFp(this.configuration).listSupermarketCategorys(options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {*} [options] Override http request option.
@ -9884,6 +10254,18 @@ export class ApiApi extends BaseAPI {
return ApiApiFp(this.configuration).partialUpdateSupermarket(id, supermarket, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ApiApi
*/
public partialUpdateSupermarketCategory(id: string, supermarketCategory?: SupermarketCategory, options?: any) {
return ApiApiFp(this.configuration).partialUpdateSupermarketCategory(id, supermarketCategory, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -10119,6 +10501,17 @@ export class ApiApi extends BaseAPI {
return ApiApiFp(this.configuration).retrieveSupermarket(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ApiApi
*/
public retrieveSupermarketCategory(id: string, options?: any) {
return ApiApiFp(this.configuration).retrieveSupermarketCategory(id, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this sync.
@ -10389,6 +10782,18 @@ export class ApiApi extends BaseAPI {
return ApiApiFp(this.configuration).updateSupermarket(id, supermarket, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this supermarket category.
* @param {SupermarketCategory} [supermarketCategory]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ApiApi
*/
public updateSupermarketCategory(id: string, supermarketCategory?: SupermarketCategory, options?: any) {
return ApiApiFp(this.configuration).updateSupermarketCategory(id, supermarketCategory, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @param {string} id A unique integer value identifying this sync.