chore: solve conflict
This commit is contained in:
No files matched your search
+3
-1
@@ -1 +1,3 @@
|
|||||||
API_ORIGIN=
|
NUXT_MAIN_API_ORIGIN=
|
||||||
|
NUXT_BPJS_API_ORIGIN=
|
||||||
|
NUXT_SYNC_API_ORIGIN=
|
||||||
@@ -95,7 +95,7 @@ function onCancelForm() {
|
|||||||
id="strUnit_id"
|
id="strUnit_id"
|
||||||
v-model.number="unit_id"
|
v-model.number="unit_id"
|
||||||
icon-name="i-lucide-chevron-down"
|
icon-name="i-lucide-chevron-down"
|
||||||
placeholder="Pilih kelompok obat"
|
placeholder="Pilih poliklinik tujuan"
|
||||||
v-bind="unitAttrs"
|
v-bind="unitAttrs"
|
||||||
:items="props.units || []"
|
:items="props.units || []"
|
||||||
:disabled="isLoading || isReadonly"
|
:disabled="isLoading || isReadonly"
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
import type { Config } from '~/components/pub/my-ui/data-table'
|
||||||
|
|
||||||
|
|
||||||
|
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
|
||||||
|
|
||||||
|
export const config: Config = {
|
||||||
|
cols: [{}, {}, { width: 50 }],
|
||||||
|
headers: [[{ label: 'Nama' }, { label: 'Jumlah' }, { label: '' }]],
|
||||||
|
keys: ['name', 'count', 'action'],
|
||||||
|
delKeyNames: [
|
||||||
|
{ key: 'name', label: 'Nama' },
|
||||||
|
{ key: 'count', label: 'Jumlah' },
|
||||||
|
],
|
||||||
|
skeletonSize: 10
|
||||||
|
// funcParsed: {
|
||||||
|
// parent: (rec: unknown): unknown => {
|
||||||
|
// const recX = rec as SmallDetailDto
|
||||||
|
// return recX.parent?.name || '-'
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// funcComponent: {
|
||||||
|
// action(rec: object, idx: any) {
|
||||||
|
// const res: RecComponent = {
|
||||||
|
// idx,
|
||||||
|
// rec: rec as object,
|
||||||
|
// component: action,
|
||||||
|
// props: {
|
||||||
|
// size: 'sm',
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// return res
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import DataTable from '~/components/pub/my-ui/data-table/data-table.vue'
|
||||||
|
import { config } from './list-entry.config'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<DataTable v-bind="config" :rows="[]" class="border mb-3 2xl:mb-4" />
|
||||||
|
<div>
|
||||||
|
<Button>
|
||||||
|
Tambah
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
Test
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
import type { Config } from '~/components/pub/my-ui/data-table'
|
||||||
|
import type { DeviceOrder } from '~/models/device-order'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-ud.vue'))
|
||||||
|
|
||||||
|
export const config: Config = {
|
||||||
|
cols: [{ width: 120 }, { }, { }, { width: 50 }],
|
||||||
|
headers: [[{ label: 'Tanggal' }, { label: 'DPJP' }, { label: 'Alat Kesehatan' }, { label: '' }]],
|
||||||
|
keys: ['createdAt', 'encounter.doctor.person.name', 'items', 'action'],
|
||||||
|
delKeyNames: [
|
||||||
|
{ key: 'code', label: 'Kode' },
|
||||||
|
{ key: 'name', label: 'Nama' },
|
||||||
|
],
|
||||||
|
skeletonSize: 10,
|
||||||
|
htmls: {
|
||||||
|
items: (rec: unknown): unknown => {
|
||||||
|
const recX = rec as DeviceOrder
|
||||||
|
return recX.items?.length || 0
|
||||||
|
},
|
||||||
|
}
|
||||||
|
// funcParsed: {
|
||||||
|
// parent: (rec: unknown): unknown => {
|
||||||
|
// const recX = rec as SmallDetailDto
|
||||||
|
// return recX.parent?.name || '-'
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// funcComponent: {
|
||||||
|
// action(rec: object, idx: any) {
|
||||||
|
// const res: RecComponent = {
|
||||||
|
// idx,
|
||||||
|
// rec: rec as object,
|
||||||
|
// component: action,
|
||||||
|
// props: {
|
||||||
|
// size: 'sm',
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
// return res
|
||||||
|
// },
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
// Components
|
||||||
|
import PaginationView from '~/components/pub/my-ui/pagination/pagination-view.vue'
|
||||||
|
|
||||||
|
// Types
|
||||||
|
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
||||||
|
|
||||||
|
// Configs
|
||||||
|
import { config } from './list.config'
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
data: any[]
|
||||||
|
paginationMeta: PaginationMeta
|
||||||
|
}
|
||||||
|
|
||||||
|
defineProps<Props>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
pageChange: [page: number]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
function handlePageChange(page: number) {
|
||||||
|
emit('pageChange', page)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="space-y-4">
|
||||||
|
<PubMyUiDataTable
|
||||||
|
v-bind="config"
|
||||||
|
:rows="[]"
|
||||||
|
/>
|
||||||
|
<PaginationView :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -23,6 +23,7 @@ import {
|
|||||||
isProcessing,
|
isProcessing,
|
||||||
isFormEntryDialogOpen,
|
isFormEntryDialogOpen,
|
||||||
isRecordConfirmationOpen,
|
isRecordConfirmationOpen,
|
||||||
|
onResetState,
|
||||||
handleActionSave,
|
handleActionSave,
|
||||||
handleActionEdit,
|
handleActionEdit,
|
||||||
handleActionRemove,
|
handleActionRemove,
|
||||||
@@ -43,6 +44,7 @@ interface Props {
|
|||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
|
||||||
let units = ref<{ value: string; label: string }[]>([])
|
let units = ref<{ value: string; label: string }[]>([])
|
||||||
|
const encounterId = ref<number>(props?.encounter?.id || 0)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@@ -57,7 +59,7 @@ const {
|
|||||||
fetchFn: async ({ page, search }) => {
|
fetchFn: async ({ page, search }) => {
|
||||||
const result = await getList({ 'encounter-id': props.encounter.id, includes: 'encounter,dstUnit', search, page })
|
const result = await getList({ 'encounter-id': props.encounter.id, includes: 'encounter,dstUnit', search, page })
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
data.value = result.body.data;
|
data.value = result.body.data
|
||||||
}
|
}
|
||||||
return { success: result.success || false, body: result.body || {} }
|
return { success: result.success || false, body: result.body || {} }
|
||||||
},
|
},
|
||||||
@@ -83,7 +85,7 @@ const headerPrep: HeaderPrep = {
|
|||||||
icon: 'i-lucide-plus',
|
icon: 'i-lucide-plus',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
recItem.value = {
|
recItem.value = {
|
||||||
encounter_id: props.encounter.id,
|
encounter_id: encounterId.value,
|
||||||
date: today.toISOString().slice(0, 10),
|
date: today.toISOString().slice(0, 10),
|
||||||
unit_id: 0,
|
unit_id: 0,
|
||||||
problem: '',
|
problem: '',
|
||||||
@@ -144,13 +146,29 @@ onMounted(async () => {
|
|||||||
@search="handleSearch"
|
@search="handleSearch"
|
||||||
class="mb-4 xl:mb-5"
|
class="mb-4 xl:mb-5"
|
||||||
/>
|
/>
|
||||||
<List :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
|
|
||||||
<Dialog v-model:open="isFormEntryDialogOpen" :title="recItem?.id ? 'Edit Konsultasi' : 'Tambah Konsultasi'" size="xl" prevent-outside>
|
<List
|
||||||
|
:data="data"
|
||||||
|
:pagination-meta="paginationMeta"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Dialog
|
||||||
|
v-model:open="isFormEntryDialogOpen"
|
||||||
|
:title="recItem?.id ? 'Edit Konsultasi' : 'Tambah Konsultasi'"
|
||||||
|
size="xl"
|
||||||
|
prevent-outside
|
||||||
|
@update:open="
|
||||||
|
(value: any) => {
|
||||||
|
onResetState()
|
||||||
|
isFormEntryDialogOpen = value
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
<Entry
|
<Entry
|
||||||
:schema="ConsultationSchema"
|
:schema="ConsultationSchema"
|
||||||
:values="recItem"
|
:values="recItem"
|
||||||
:encounter_id="props.encounter.id"
|
:encounter_id="encounterId"
|
||||||
:units="units"
|
:units="units"
|
||||||
:is-loading="isProcessing"
|
:is-loading="isProcessing"
|
||||||
:is-readonly="isReadonly"
|
:is-readonly="isReadonly"
|
||||||
@@ -168,7 +186,6 @@ onMounted(async () => {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
{{ isRecordConfirmationOpen }}
|
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
@@ -178,9 +195,18 @@ onMounted(async () => {
|
|||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p>
|
||||||
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
<strong>ID:</strong>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
{{ record?.id }}
|
||||||
|
</p>
|
||||||
|
<p v-if="record?.name">
|
||||||
|
<strong>Nama:</strong>
|
||||||
|
{{ record.name }}
|
||||||
|
</p>
|
||||||
|
<p v-if="record?.code">
|
||||||
|
<strong>Kode:</strong>
|
||||||
|
{{ record.code }}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import Nav from '~/components/pub/my-ui/nav-footer/ba-su.vue'
|
||||||
|
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
||||||
|
|
||||||
|
import { useQueryCRUDMode } from '~/composables/useQueryCRUD'
|
||||||
|
|
||||||
|
import ItemListEntry from '~/components/app/device-order-item/list-entry.vue'
|
||||||
|
import type { HeaderPrep } from '~/components/pub/my-ui/data/types'
|
||||||
|
|
||||||
|
const { backToList } = useQueryCRUDMode()
|
||||||
|
|
||||||
|
const headerPrep: HeaderPrep = {
|
||||||
|
title: 'Tambah Order Alkes',
|
||||||
|
icon: 'i-lucide-box',
|
||||||
|
}
|
||||||
|
|
||||||
|
function navClick(type: 'cancel' | 'submit') {
|
||||||
|
if (type === 'cancel') {
|
||||||
|
backToList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Header
|
||||||
|
:prep="headerPrep"
|
||||||
|
:ref-search-nav="headerPrep.refSearchNav"
|
||||||
|
class="mb-4 xl:mb-5"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ItemListEntry />
|
||||||
|
<Separator class="my-5" />
|
||||||
|
|
||||||
|
<div class="w-full flex justify-center">
|
||||||
|
<Nav @click="navClick" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
// Components
|
||||||
|
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||||
|
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
||||||
|
import RecordConfirmation from '~/components/pub/my-ui/confirmation/record-confirmation.vue'
|
||||||
|
import List from '~/components/app/device-order/list.vue'
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
import { usePaginatedList } from '~/composables/usePaginatedList'
|
||||||
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
|
// import { useQueryMode } from '~/composables/useQueryMode'
|
||||||
|
import { useQueryCRUDMode } from '~/composables/useQueryCRUD'
|
||||||
|
|
||||||
|
// Types
|
||||||
|
import { ActionEvents, type HeaderPrep } from '~/components/pub/my-ui/data/types'
|
||||||
|
import { type DeviceOrderFormData, DeviceOrderSchema } from '~/schemas/device-order.schema'
|
||||||
|
import type { DeviceOrder } from "~/models/device-order";
|
||||||
|
|
||||||
|
// Handlers
|
||||||
|
import {
|
||||||
|
recId,
|
||||||
|
recAction,
|
||||||
|
recItem,
|
||||||
|
isReadonly,
|
||||||
|
isProcessing,
|
||||||
|
isFormEntryDialogOpen,
|
||||||
|
isRecordConfirmationOpen,
|
||||||
|
onResetState,
|
||||||
|
handleActionSave,
|
||||||
|
handleActionEdit,
|
||||||
|
handleActionRemove,
|
||||||
|
handleCancelForm,
|
||||||
|
} from '~/handlers/device-order.handler'
|
||||||
|
|
||||||
|
// Services
|
||||||
|
import { getList } from '~/services/device-order.service'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const title = ref('')
|
||||||
|
|
||||||
|
// const { mode, openForm, backToList } = useQueryMode()
|
||||||
|
const { mode, goToEntry, backToList } = useQueryCRUDMode()
|
||||||
|
const { recordId } = useQueryCRUDRecordId()
|
||||||
|
|
||||||
|
const {
|
||||||
|
data,
|
||||||
|
isLoading,
|
||||||
|
paginationMeta,
|
||||||
|
searchInput,
|
||||||
|
handlePageChange,
|
||||||
|
handleSearch,
|
||||||
|
fetchData: getMyList,
|
||||||
|
} = usePaginatedList({
|
||||||
|
fetchFn: async (params: any) => {
|
||||||
|
const result = await getList({
|
||||||
|
search: params.search,
|
||||||
|
sort: 'createdAt:asc',
|
||||||
|
'page-number': params['page-number'] || 0,
|
||||||
|
'page-size': params['page-size'] || 10,
|
||||||
|
includes: 'parent,childrens',
|
||||||
|
})
|
||||||
|
return { success: result.success || false, body: result.body || {} }
|
||||||
|
},
|
||||||
|
entityName: 'device-order',
|
||||||
|
})
|
||||||
|
|
||||||
|
const headerPrep: HeaderPrep = {
|
||||||
|
title: 'Order Alkes',
|
||||||
|
icon: 'i-lucide-box',
|
||||||
|
refSearchNav: {
|
||||||
|
placeholder: 'Cari (min. 3 karakter)...',
|
||||||
|
minLength: 3,
|
||||||
|
debounceMs: 500,
|
||||||
|
showValidationFeedback: true,
|
||||||
|
onInput: (value: string) => {
|
||||||
|
searchInput.value = value
|
||||||
|
},
|
||||||
|
onClick: () => {},
|
||||||
|
onClear: () => {},
|
||||||
|
},
|
||||||
|
addNav: {
|
||||||
|
label: 'Tambah',
|
||||||
|
icon: 'i-lucide-plus',
|
||||||
|
onClick: async () => {
|
||||||
|
recItem.value = null
|
||||||
|
recId.value = 0
|
||||||
|
isReadonly.value = false
|
||||||
|
// await handleActionSave(recItem, getMyList, () => {}, () => {})
|
||||||
|
goToEntry()
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
provide('rec_id', recId)
|
||||||
|
provide('rec_action', recAction)
|
||||||
|
provide('rec_item', recItem)
|
||||||
|
provide('table_data_loader', isLoading)
|
||||||
|
|
||||||
|
// Watch for row actions when recId or recAction changes
|
||||||
|
onMounted(async () => {
|
||||||
|
await getMyList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Header
|
||||||
|
v-model="searchInput"
|
||||||
|
:prep="headerPrep"
|
||||||
|
:ref-search-nav="headerPrep.refSearchNav"
|
||||||
|
@search="handleSearch"
|
||||||
|
class="mb-4 xl:mb-5"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<List
|
||||||
|
:data="data"
|
||||||
|
:pagination-meta="paginationMeta"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- Record Confirmation Modal -->
|
||||||
|
<RecordConfirmation
|
||||||
|
v-model:open="isRecordConfirmationOpen"
|
||||||
|
action="delete"
|
||||||
|
:record="recItem"
|
||||||
|
@confirm="() => handleActionRemove(recId, getMyList, toast)"
|
||||||
|
@cancel=""
|
||||||
|
>
|
||||||
|
<template #default="{ record }">
|
||||||
|
<div class="text-sm">
|
||||||
|
<p>
|
||||||
|
<strong>ID:</strong>
|
||||||
|
{{ record?.id }}
|
||||||
|
</p>
|
||||||
|
<p v-if="record?.name">
|
||||||
|
<strong>Nama:</strong>
|
||||||
|
{{ record.name }}
|
||||||
|
</p>
|
||||||
|
<p v-if="record?.code">
|
||||||
|
<strong>Kode:</strong>
|
||||||
|
{{ record.code }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</RecordConfirmation>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
//
|
||||||
|
import List from './list.vue'
|
||||||
|
import Entry from './entry.vue'
|
||||||
|
|
||||||
|
const { mode } = useQueryMode()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<List v-if="mode === 'list'" />
|
||||||
|
<Entry v-else />
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Handlers
|
||||||
|
import { genCrudHandler } from '~/handlers/_handler'
|
||||||
|
|
||||||
|
// Services
|
||||||
|
import { create, update, remove } from '~/services/device-order-item.service'
|
||||||
|
|
||||||
|
export const {
|
||||||
|
recId,
|
||||||
|
recAction,
|
||||||
|
recItem,
|
||||||
|
isReadonly,
|
||||||
|
isProcessing,
|
||||||
|
isFormEntryDialogOpen,
|
||||||
|
isRecordConfirmationOpen,
|
||||||
|
onResetState,
|
||||||
|
handleActionSave,
|
||||||
|
handleActionEdit,
|
||||||
|
handleActionRemove,
|
||||||
|
handleCancelForm,
|
||||||
|
} = genCrudHandler({
|
||||||
|
create,
|
||||||
|
update,
|
||||||
|
remove,
|
||||||
|
})
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
// Handlers
|
||||||
|
import { genCrudHandler } from '~/handlers/_handler'
|
||||||
|
|
||||||
|
// Services
|
||||||
|
import { create, update, remove } from '~/services/device-order-item.service'
|
||||||
|
|
||||||
|
export const {
|
||||||
|
recId,
|
||||||
|
recAction,
|
||||||
|
recItem,
|
||||||
|
isReadonly,
|
||||||
|
isProcessing,
|
||||||
|
isFormEntryDialogOpen,
|
||||||
|
isRecordConfirmationOpen,
|
||||||
|
onResetState,
|
||||||
|
handleActionSave,
|
||||||
|
handleActionEdit,
|
||||||
|
handleActionRemove,
|
||||||
|
handleCancelForm,
|
||||||
|
} = genCrudHandler({
|
||||||
|
create,
|
||||||
|
update,
|
||||||
|
remove,
|
||||||
|
})
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { z } from 'zod'
|
||||||
|
import type { DeviceOrder } from '~/models/device-order'
|
||||||
|
|
||||||
|
const DeviceOrderSchema = z.object({
|
||||||
|
encounter_id: z.number({ required_error: 'Kode harus diisi' }),
|
||||||
|
doctor_id: z.number({ required_error: 'Kode harus diisi' }),
|
||||||
|
})
|
||||||
|
|
||||||
|
type DeviceOrderFormData = z.infer<typeof DeviceOrderSchema> & Partial<DeviceOrder>
|
||||||
|
|
||||||
|
export { DeviceOrderSchema }
|
||||||
|
export type { DeviceOrderFormData }
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// Base
|
||||||
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
|
const path = '/api/v1/device-order-item'
|
||||||
|
const name = 'device-order-item'
|
||||||
|
|
||||||
|
export function create(data: any) {
|
||||||
|
console.log('service create', data)
|
||||||
|
return base.create(path, data, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getList(params: any = null) {
|
||||||
|
return base.getList(path, params, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDetail(id: number | string) {
|
||||||
|
return base.getDetail(path, id, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function update(id: number | string, data: any) {
|
||||||
|
return base.update(path, id, data, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function remove(id: number | string) {
|
||||||
|
return base.remove(path, id, name)
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
// Base
|
||||||
|
import * as base from './_crud-base'
|
||||||
|
|
||||||
|
const path = '/api/v1/device-order'
|
||||||
|
const name = 'device-order'
|
||||||
|
|
||||||
|
export function create(data: any) {
|
||||||
|
console.log('service create', data)
|
||||||
|
return base.create(path, data, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getList(params: any = null) {
|
||||||
|
return base.getList(path, params, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getDetail(id: number | string) {
|
||||||
|
return base.getDetail(path, id, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function update(id: number | string, data: any) {
|
||||||
|
return base.update(path, id, data, name)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function remove(id: number | string) {
|
||||||
|
return base.remove(path, id, name)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user