adminforth 2.27.0-next.30 → 2.27.0-next.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -162,7 +162,7 @@ const columnError = (column: AdminForthResourceColumnCommon) => {
162
162
  return currentValues.value[column.name] && currentValues.value[column.name].reduce((error: any, item: any) => {
163
163
  if (column.isArray) {
164
164
  return error || validateValue(column.isArray.itemType, item, column) ||
165
- (item === null || !item.toString() ? t('Array cannot contain empty items') : null);
165
+ (item === null || (!item || item.toString() === '') ? t('Array cannot contain empty items') : null);
166
166
  } else {
167
167
  return error;
168
168
  }
@@ -11,6 +11,7 @@
11
11
  class="rounded-md m-0.5 bg-lightAnnouncementBG dark:bg-darkAnnouncementBG text-lightAnnouncementText dark:text-darkAnnouncementText py-0.5 px-2.5 text-sm"
12
12
  >
13
13
  <RouterLink
14
+ v-if="foreignResource && foreignResource?.pk"
14
15
  class="font-medium text-lightSidebarText dark:text-darkSidebarText hover:brightness-110 whitespace-nowrap"
15
16
  :to="{
16
17
  name: 'resource-show',
@@ -147,7 +147,7 @@ const editableRecord = computed(() => {
147
147
  coreStore.resource.columns.forEach(column => {
148
148
  if (column.foreignResource) {
149
149
  if (column.isArray?.enabled) {
150
- newRecord[column.name] = newRecord[column.name]?.map((fr: { pk: any }) => fr.pk);
150
+ newRecord[column.name] = newRecord[column.name]?.map((fr: { pk: any }) => fr?.pk);
151
151
  } else {
152
152
  newRecord[column.name] = newRecord[column.name]?.pk;
153
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.27.0-next.30",
3
+ "version": "2.27.0-next.31",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",