diff --git a/Tithe-Vue/src/components/Forms/AddPersonInFamilyForm.vue b/Tithe-Vue/src/components/Forms/AddPersonInFamilyForm.vue new file mode 100644 index 0000000..92c2b41 --- /dev/null +++ b/Tithe-Vue/src/components/Forms/AddPersonInFamilyForm.vue @@ -0,0 +1,58 @@ + + + diff --git a/Tithe-Vue/src/components/Forms/PersonForm.vue b/Tithe-Vue/src/components/Forms/PersonForm.vue new file mode 100644 index 0000000..2c483f4 --- /dev/null +++ b/Tithe-Vue/src/components/Forms/PersonForm.vue @@ -0,0 +1,180 @@ + + + + + diff --git a/Tithe-Vue/src/components/SearchBoxes/FamilyByParishSingleSelectBox.vue b/Tithe-Vue/src/components/SearchBoxes/FamilyByParishSingleSelectBox.vue new file mode 100644 index 0000000..b608281 --- /dev/null +++ b/Tithe-Vue/src/components/SearchBoxes/FamilyByParishSingleSelectBox.vue @@ -0,0 +1,72 @@ + + + diff --git a/Tithe-Vue/src/components/SearchBoxes/RelationSingleSelectBox.vue b/Tithe-Vue/src/components/SearchBoxes/RelationSingleSelectBox.vue new file mode 100644 index 0000000..073ef78 --- /dev/null +++ b/Tithe-Vue/src/components/SearchBoxes/RelationSingleSelectBox.vue @@ -0,0 +1,62 @@ + + + diff --git a/Tithe-Vue/src/views/FamilyView.vue b/Tithe-Vue/src/views/FamilyView.vue index 5253c16..47ff334 100644 --- a/Tithe-Vue/src/views/FamilyView.vue +++ b/Tithe-Vue/src/views/FamilyView.vue @@ -16,9 +16,11 @@ import { mdiTableLarge, } from "@mdi/js"; -import SearchBox from "@/components/SearchBox.vue"; +import AddPersonInFamilyForm from "@/components/Forms/AddPersonInFamilyForm.vue"; import ForaneSingleSelectBox from "@/components/SearchBoxes/ForaneSingleSelectBox.vue"; import ParishByForaneSingleSelectBox from "@/components/SearchBoxes/ParishByForaneSingleSelectBox.vue"; +import FamilyByParishSingleSelectBox from "@/components/SearchBoxes/FamilyByParishSingleSelectBox.vue"; +import KoottaymaByParishSingleSelectBox from "@/components/SearchBoxes/KoottaymaByParishSingleSelectBox.vue"; import LayoutAuthenticated from "@/layouts/LayoutAuthenticated.vue"; import SectionMain from "@/components/SectionMain.vue"; import FormField from "@/components/FormField.vue"; @@ -37,11 +39,7 @@ import RemoveEntityDisclosure from "@/components/RemoveEntityDisclosure.vue"; import TableTabs from "@/components/TableTabs.vue"; import { - familyAllForaneListQuery, - familyAllParishListQuery, - familyAllFamilyListQuery, familyPageActiveEnityCountQuery, - familyAllKoottaymaListQuery, familyPageActivePersonTableQuery, } from "@/externalized-data/graphqlQueries"; import { @@ -81,69 +79,16 @@ const forane = ref(); const parish = ref(); const family = ref(); -const ACTIVE_FORANE_LIST_QUERY = gql` - ${familyAllForaneListQuery} -`; - -const { - result: activeForaneList, - load: activeForaneListLoad, - refetch: activeForaneListRefetch, -} = useLazyQuery(ACTIVE_FORANE_LIST_QUERY); -activeForaneListLoad(); -const loadForanes = (query, setOptions) => { - setOptions( - activeForaneList.value?.getAllForanes?.map((entity) => { - return { - id: entity.foraneId, - label: entity.foraneName, - }; - }) ?? [] - ); +const changeInForane = (entity) => { + forane.value = entity; }; -const ACTIVE_PARISH_BY_FORANE_LIST_QUERY = gql` - ${familyAllParishListQuery} -`; - -const { - result: activeParishList, - load: activeParishListLoad, - refetch: activeParishListRefetch, -} = useLazyQuery(ACTIVE_PARISH_BY_FORANE_LIST_QUERY, () => ({ - foraneId: forane.value.id, -})); -const loadParishesByForane = (query, setOptions) => { - setOptions( - activeParishList.value?.getAllParishesByForane?.map((entity) => { - return { - id: entity.parishId, - label: entity.parishName, - }; - }) ?? [] - ); +const changeInParish = (entity) => { + parish.value = entity; }; -const ACTIVE_FAMILY_BY_PARISH_LIST_QUERY = gql` - ${familyAllFamilyListQuery} -`; - -const { - result: activeFamilyList, - load: activeFamilyListLoad, - refetch: activeFamilyListRefetch, -} = useLazyQuery(ACTIVE_FAMILY_BY_PARISH_LIST_QUERY, () => ({ - parishId: parish.value.id, -})); -const loadFamiliesByParish = (query, setOptions) => { - setOptions( - activeFamilyList.value?.getAllFamiliesByParish?.map((entity) => { - return { - id: entity.familyId, - label: entity.familyName, - }; - }) ?? [] - ); +const changeInFamily = (entity) => { + family.value = entity; }; // Entity Count in Family Page @@ -165,14 +110,6 @@ const activePersonCount = computed( () => activeEntityByFamilyCount.value?.getPersonCountByFamily ?? 0 ); -watch(forane, () => { - activeParishListLoad(); -}); - -watch(parish, () => { - activeFamilyListLoad(); -}); - watch(family, () => { activeEntityByFamilyCountEnabled.value = true; }); @@ -197,56 +134,20 @@ const formForane = ref(); // Form Parish Search Box const formParish = ref(); -const { - result: activeFormParishList, - load: activeFormParishListLoad, - refetch: activeFormParishListRefetch, -} = useLazyQuery(ACTIVE_PARISH_BY_FORANE_LIST_QUERY, () => ({ - foraneId: formForane.value.id, -})); -const loadFormParishesByForane = (query, setOptions) => { - setOptions( - activeFormParishList.value?.getAllParishesByForane?.map((entity) => { - return { - id: entity.parishId, - label: entity.parishName, - }; - }) ?? [] - ); -}; - // Form Koottayma Search Box const formKoottayma = ref(); -const ACTIVE_KOOTTAYMA_BY_PARISH_LIST_QUERY = gql` - ${familyAllKoottaymaListQuery} -`; - -const { - result: activeFormKoottaymaList, - load: activeFormKoottaymaListLoad, - refetch: activeFormKoottaymaListRefetch, -} = useLazyQuery(ACTIVE_KOOTTAYMA_BY_PARISH_LIST_QUERY, () => ({ - parishId: formParish.value.id, -})); -const loadFormKoottaymasByParish = (query, setOptions) => { - setOptions( - activeFormKoottaymaList.value?.getAllKoottaymasByParish?.map((entity) => { - return { - id: entity.koottaymaId, - label: entity.koottaymaName, - }; - }) ?? [] - ); +const changeInFormForane = (entity) => { + formForane.value = entity; }; -watch(formForane, () => { - activeFormParishListLoad(); -}); +const changeInFormParish = (entity) => { + formParish.value = entity; +}; -watch(formParish, () => { - activeFormKoottaymaListLoad(); -}); +const changeInFormKoottayma = (entity) => { + formKoottayma.value = entity; +}; watch(formKoottayma, (value) => { createFamilyForm.koottaymaId = value.id; @@ -404,32 +305,22 @@ const getActivePersonRows = computed(() => {
- - - - - - - - + + + + + + + + +
@@ -451,6 +342,7 @@ const getActivePersonRows = computed(() => { v-model="createFamilyForm.familyName" type="text" :icon="mdiAccountMultiple" + :borderless="true" placeholder="Shalom House" /> @@ -460,37 +352,29 @@ const getActivePersonRows = computed(() => { v-model="createFamilyForm.address.buildingName" /> --> - - - - - - - - - + + + + @@ -498,9 +382,10 @@ const getActivePersonRows = computed(() => { ref="addressFormComponent" @address-form-change="changeInAddressFormData" /> + @@ -619,4 +504,12 @@ const getActivePersonRows = computed(() => { .baseButtonStyle { width: 100%; } + +.multipleSelectAddressBox :deep(.multiselect-theme) { + --ms-bg: #1e293b; + --ms-dropdown-bg: #1e293b; + --ms-dropdown-border-color: #1e293b; + + --ms-py: 0.757rem; +} diff --git a/Tithe-Vue/src/views/KoottaymaView.vue b/Tithe-Vue/src/views/KoottaymaView.vue index 8bb89aa..5962586 100644 --- a/Tithe-Vue/src/views/KoottaymaView.vue +++ b/Tithe-Vue/src/views/KoottaymaView.vue @@ -20,7 +20,6 @@ import { import ForaneSingleSelectBox from "@/components/SearchBoxes/ForaneSingleSelectBox.vue"; import ParishByForaneSingleSelectBox from "@/components/SearchBoxes/ParishByForaneSingleSelectBox.vue"; import KoottaymaByParishSingleSelectBox from "@/components/SearchBoxes/KoottaymaByParishSingleSelectBox.vue"; -import SearchBox from "@/components/SearchBox.vue"; import LayoutAuthenticated from "@/layouts/LayoutAuthenticated.vue"; import SectionMain from "@/components/SectionMain.vue"; import FormField from "@/components/FormField.vue"; @@ -38,9 +37,6 @@ import RemoveEntityDisclosure from "@/components/RemoveEntityDisclosure.vue"; import TableTabs from "@/components/TableTabs.vue"; import { - koottaymaAllForaneListQuery, - koottaymaAllParishListQuery, - koottaymaAllKoottaymaListQuery, koottaymaPageActiveEnityCountQuery, koottaymaPageActiveFamilyTableQuery, koottaymaPageActivePersonTableQuery, @@ -336,6 +332,7 @@ const getActivePersonRows = computed(() => { v-model="createKoottaymaForm.koottaymaName" type="text" :icon="mdiHandsPray" + :borderless="true" placeholder="St. George Koottayma" /> @@ -355,7 +352,7 @@ const getActivePersonRows = computed(() => { diff --git a/Tithe-Vue/src/views/PersonView.vue b/Tithe-Vue/src/views/PersonView.vue index 629e5a6..35749ad 100644 --- a/Tithe-Vue/src/views/PersonView.vue +++ b/Tithe-Vue/src/views/PersonView.vue @@ -569,7 +569,7 @@ onMounted(() => {