diff --git a/.husky/pre-commit b/.husky/pre-commit index 9e8f1de5..5a182ef1 100644 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,4 @@ -yarn app:prettify -yarn server:prettify +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +yarn lint-staged diff --git a/Makefile b/Makefile index 6e4ee2d0..cfbb31d3 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,7 @@ all: clean install cp -r ./app/dist ./server/build/public install: + ${YARN} cd ./app && $(YARN) cd ./server && $(YARN) diff --git a/app/src/components/app/item-list.vue b/app/src/components/app/item-list.vue index 073c2932..0b2c9b3d 100644 --- a/app/src/components/app/item-list.vue +++ b/app/src/components/app/item-list.vue @@ -103,7 +103,7 @@
@@ -141,7 +141,7 @@ - +
{{ item[key] }}
@@ -250,7 +250,7 @@

{ + const setSort = (key: string) => { const index = SORTS.findIndex((order) => order === sort.order); if (sort.key === key) { @@ -416,16 +416,15 @@ /* SORT */ /* SCROLL */ - const row = ref(null); const table = ref(null); const tbody = ref(null); const scrollbar = ref(null); - const twocolumns = ref(null); + const twoColumns = ref(null); const tableContainer = ref(null); - const scrollcontainer = ref(null); + const scrollContainer = ref(null); const tableHeaderContainer = ref(null); - const metatbody = ref(null); + const metaTableBody = ref(null); watchEffect(() => { if (props.isSelected) { @@ -441,7 +440,7 @@ // eslint-disable-next-line @typescript-eslint/ban-ts-comment //@ts-ignore scrollbar.value.style.width = `${+table.value.scrollWidth}px`; - scrollcontainer.value.style.marginLeft = `${+twocolumns.value.scrollWidth + 14}px`; + scrollContainer.value.style.marginLeft = `${+twoColumns.value.scrollWidth + 14}px`; }); }, ); @@ -461,14 +460,14 @@ () => items.value, async () => { await nextTick(() => { - const metarows = metatbody.value?.getElementsByTagName("tr")?.[0]; - const metacells = metarows?.getElementsByTagName("td"); + const metaRows = metaTableBody.value?.getElementsByTagName("tr")?.[0]; + const metaCells = metaRows?.getElementsByTagName("td"); const rows = tbody.value?.getElementsByTagName("tr")?.[0]; const cells = rows?.getElementsByTagName("td"); - if (cells && metacells) { - widths.value = [...metacells, ...cells].map((td) => td.getBoundingClientRect()?.width); + if (cells && metaCells) { + widths.value = [...metaCells, ...cells].map((td) => td.getBoundingClientRect()?.width); } }); }, @@ -476,7 +475,7 @@ /* RESIZE */ const handleScrollbarPosition = throttle((event) => { - scrollcontainer.value?.scroll({ left: event.target.scrollLeft }); + scrollContainer.value?.scroll({ left: event.target.scrollLeft }); tableHeaderContainer.value?.scroll({ left: event.target.scrollLeft }); }, 0.5); @@ -530,7 +529,7 @@ }; }; - const find = (item: any) => { + const find = (item: Record) => { const index = selectedItems.value.findIndex((_item) => { const pkMatch = pk.value ? _item[pk.value.AttributeName] === item[pk.value.AttributeName] : true; @@ -542,7 +541,7 @@ return index; }; - const select = (item: any) => { + const select = (item: Record) => { emit("unselect"); const index = find(item); @@ -619,8 +618,6 @@ const offcanvas = (item) => { const bsOffcanvas = new bootstrap.Offcanvas(offcanvasRef.value); - const href = handleItem(item); - codeMirrorRef.value.dispatch({ changes: { from: 0, diff --git a/app/src/views/items/CreateItem.vue b/app/src/views/items/CreateItem.vue index 9f6ed5ad..a18b57fe 100644 --- a/app/src/views/items/CreateItem.vue +++ b/app/src/views/items/CreateItem.vue @@ -88,8 +88,6 @@