Skip to content

Commit

Permalink
feat: added level to facility
Browse files Browse the repository at this point in the history
  • Loading branch information
PiusKariuki committed Oct 1, 2024
1 parent 7f623e2 commit eee2eda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/modules/facilities/hooks/useRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const useRegistration = () => {


const submit = async (evt) => {
console.log("selected facility", selectedFacility.value)
evt.preventDefault()
loading.value = true;
try {
Expand All @@ -44,7 +45,7 @@ export const useRegistration = () => {
resourceType: "Location",
id: resourceID ? resourceID : selectedFacility.value.name,
name: selectedFacility.value.name,
level: selectedFacility.value.level,
level: selectedFacility.value.keph_level_name,
partOf: {
reference: `Location/${selectedFacility.value.county}`
},
Expand Down
5 changes: 1 addition & 4 deletions src/modules/facilities/views/AllFacilities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
:headers="headers">
<template #item-id="item">
<div class="flex items-center gap-4">
<router-link class="underline text-[#2b4fb1] font-medium" :to="`/facility/${item.resource.id}`">View
</router-link>
<router-link class="underline text-[#2b4fb1] font-medium" :to="`/facility/edit/${item.resource.id}`">Edit
</router-link>
<router-link class="underline text-[#2b4fb1] font-medium" :to="`/facility/${item.resource.id}`">View</router-link>
</div>
</template>
</EasyDataTable>
Expand Down
3 changes: 0 additions & 3 deletions src/shared/hooks/useAxios.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {ref} from "vue";
import axios from "axios"
import {useAuthStore} from "../store/authStore.js";
import {useRouter} from "vue-router";
import {useToast} from "maz-ui";

export const useAxios = () => {
const data = ref(null)
Expand All @@ -14,7 +13,6 @@ export const useAxios = () => {

const router = useRouter()

const toast = useToast()

const FHIRAxiosInstance = axios.create({
baseURL: "https://hiedhs.intellisoftkenya.com/hapi/fhir",
Expand All @@ -37,7 +35,6 @@ export const useAxios = () => {
response => response,
async error => {
if (error.response && error.response.status === 401) {
toast.info("Your session has expired please login again")
authStore.logout()
await router.push("/")
}
Expand Down

0 comments on commit eee2eda

Please sign in to comment.