Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assetLicenceGroup #177

Merged
merged 9 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Enable corepack
run: corepack enable

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
Expand Down
62 changes: 31 additions & 31 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adam-admin",
"packageManager": "[email protected].0",
"packageManager": "[email protected].1",
"license": "Apache-2.0",
"version": "0.0.1",
"scripts": {
Expand All @@ -21,60 +21,60 @@
"cy:open": "CYPRESS_CACHE_FOLDER='node_modules/.cache/Cypress' yarn cypress open -C cypress/config/cypress.config.ts"
},
"dependencies": {
"@anzusystems/common-admin": "1.47.0-alpha18",
"@anzusystems/common-admin": "1.47.0-alpha49",
"@mdi/font": "7.4.47",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
"@vueuse/core": "10.7.2",
"@vueuse/integrations": "10.7.2",
"axios": "^1.6.7",
"@vueuse/core": "10.9.0",
"@vueuse/integrations": "10.9.0",
"axios": "^1.6.8",
"cropperjs": "^1.6.1",
"jwt-decode": "^4.0.0",
"pinia": "^2.1.7",
"rusha": "^0.8.14",
"socket.io-client": "^4.7.4",
"socket.io-client": "^4.7.5",
"sortablejs": "^1.15.2",
"universal-cookie": "^7.0.2",
"universal-cookie": "^7.1.4",
"uuid": "^9.0.1",
"vue": "3.4.17",
"vue-i18n": "^9.9.1",
"vue-router": "^4.2.5",
"vuetify": "^3.5.3"
"vue": "3.4.21",
"vue-i18n": "^9.12.0",
"vue-router": "^4.3.0",
"vuetify": "^3.5.15"
},
"devDependencies": {
"@cypress/grep": "^4.0.1",
"@intlify/unplugin-vue-i18n": "^2.0.0",
"@rushstack/eslint-patch": "^1.7.2",
"@stylistic/eslint-plugin": "^1.6.1",
"@tsconfig/node18": "^18.2.2",
"@types/node": "^20.11.17",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@rushstack/eslint-patch": "^1.10.2",
"@stylistic/eslint-plugin": "^1.7.0",
"@tsconfig/node18": "^18.2.4",
"@types/node": "^20.12.7",
"@types/rusha": "^0.8.3",
"@types/sortablejs": "^1.15.7",
"@types/sortablejs": "^1.15.8",
"@types/uuid": "^9.0.8",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/parser": "^7.6.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/language-server": "^1.8.27",
"@vue/language-service": "^1.8.27",
"@vue/tsconfig": "^0.5.1",
"cypress": "^13.7.0",
"cypress": "^13.7.3",
"cypress-downloadfile": "1.2.3",
"cypress-mochawesome-reporter": "^3.8.1",
"eslint": "8.56.0",
"cypress-mochawesome-reporter": "^3.8.2",
"eslint": "8.57.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-vue": "^9.21.1",
"eslint-plugin-vue": "^9.24.1",
"npm-run-all": "^4.1.5",
"postcss": "^8.4.35",
"postcss": "^8.4.38",
"postcss-html": "^1.6.0",
"prettier": "^3.2.5",
"sass": "^1.70.0",
"stylelint": "^16.2.1",
"sass": "^1.75.0",
"stylelint": "^16.3.1",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard-scss": "^13.0.0",
"typescript": "~5.3.3",
"vite": "^5.1.1",
"vite-plugin-vuetify": "^2.0.1",
"vue-tsc": "1.8.27"
"stylelint-config-standard-scss": "^13.1.0",
"typescript": "~5.4.5",
"vite": "^5.2.8",
"vite-plugin-vuetify": "^2.0.3",
"vue-tsc": "2.0.7"
}
}
8 changes: 8 additions & 0 deletions src/components/system/sidebar/SidebarMain.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ const { t } = useI18n()
data-cy="asset-licence-settings"
/>
</Acl>
<Acl :permission="ACL.DAM_ASSET_LICENCE_GROUP_UI">
<VListItem
:to="{ name: ROUTE.DAM.ASSET_LICENCE_GROUP.LIST }"
prepend-icon="mdi-account-key"
:title="t('sidebar.settings.assetLicenceGroups')"
data-cy="asset-licence-group-settings"
/>
</Acl>
<Acl :permission="ACL.DAM_AUTHOR_UI">
<VListItem
:to="{ name: ROUTE.DAM.AUTHOR.LIST }"
Expand Down
14 changes: 14 additions & 0 deletions src/components/system/sidebar/SidebarRail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,20 @@ const { t } = useI18n()
</VTooltip>
</VListItem>
</Acl>
<Acl :permission="ACL.DAM_ASSET_LICENCE_GROUP_UI">
<VListItem
:to="{ name: ROUTE.DAM.ASSET_LICENCE_GROUP.LIST }"
prepend-icon="mdi-account-key"
data-cy="asset-licence-group-settings"
>
<VTooltip
location="right"
activator="parent"
>
{{ t('sidebar.settings.assetLicenceGroups') }}
</VTooltip>
</VListItem>
</Acl>
<Acl :permission="ACL.DAM_AUTHOR_UI">
<VListItem
:to="{ name: ROUTE.DAM.AUTHOR.LIST }"
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ import apiValidation from '@/locales/en/error/apiValidation.json'
import apiForbiddenOperation from '@/locales/en/error/apiForbiddenOperation.json'
import jsValidation from '@/locales/en/error/jsValidation.json'
import breadcrumb from '@/locales/en/breadcrumb.json'
import assetLicenceGroup from '@/locales/en/coreDam/assetLicenceGroup.json'

export default {
common: messagesEn.common,
$vuetify: messagesEn.$vuetify,
coreDam: {
asset,
assetLicence,
assetLicenceGroup,
author,
distribution,
distributionCategory,
Expand Down
5 changes: 5 additions & 0 deletions src/locales/en/breadcrumb.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"detail": "Licence",
"edit": "Licence"
},
"assetLicenceGroup": {
"list": "Asset licence groups",
"detail": "Licence group",
"edit": "Licence groups"
},
"author": {
"list": "Authors",
"detail": "Author",
Expand Down
14 changes: 14 additions & 0 deletions src/locales/en/coreDam/assetLicenceGroup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"model": {
"id": "ID",
"name": "Name",
"extSystem": "Ext system",
"licences": "Licences"
},
"filter": {
"id": "ID"
},
"meta": {
"create": "Create licence group"
}
}
1 change: 1 addition & 0 deletions src/locales/en/coreDam/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"enabled": "Enabled",
"plainPassword": "New password",
"assetLicences": "Licences",
"licenceGroups": "Licence groups",
"userToExtSystems": "User to External Systems",
"adminToExtSystems": "Admin to External Systems",
"superAdmin": "Super admin",
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"anzuUser": "Permission Users",
"extSystems": "External Systems",
"assetLicences": "Asset Licences",
"assetLicenceGroups": "Asset Licence groups",
"keywords": "Keywords",
"authors": "Authors",
"distributionCategory": "Distribution Categories",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/sk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import sidebar from '@/locales/sk/sidebar.json'
import system from '@/locales/sk/system.json'
import asset from '@/locales/sk/coreDam/asset.json'
import assetLicence from '@/locales/sk/coreDam/assetLicence.json'
import assetLicenceGroup from '@/locales/sk/coreDam/assetLicenceGroup.json'
import author from '@/locales/sk/coreDam/author.json'
import distribution from '@/locales/sk/coreDam/distribution.json'
import distributionCategory from '@/locales/sk/coreDam/distributionCategory.json'
Expand Down Expand Up @@ -32,6 +33,7 @@ export default {
coreDam: {
asset,
assetLicence,
assetLicenceGroup,
author,
distribution,
distributionCategory,
Expand Down
5 changes: 5 additions & 0 deletions src/locales/sk/breadcrumb.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"detail": "Licencie",
"edit": "Licencie"
},
"assetLicenceGroup": {
"list": "Skupiny licencií assetov",
"detail": "Skupina licencie",
"edit": "Skupina licencie"
},
"author": {
"list": "Autori",
"detail": "Autor",
Expand Down
14 changes: 14 additions & 0 deletions src/locales/sk/coreDam/assetLicenceGroup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"model": {
"id": "ID",
"name": "Meno",
"extSystem": "Externý systém",
"licences": "Licencie"
},
"filter": {
"id": "ID"
},
"meta": {
"create": "Vytvoriť skupinu licencií"
}
}
1 change: 1 addition & 0 deletions src/locales/sk/coreDam/user.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"enabled": "Povolený",
"plainPassword": "Nové heslo",
"assetLicences": "Licencie",
"licenceGroups": "Skupiny licencií",
"userToExtSystems": "Používateľ externých systémov",
"adminToExtSystems": "Admin externých systémov",
"superAdmin": "Super admin",
Expand Down
1 change: 1 addition & 0 deletions src/locales/sk/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"anzuUser": "Oprávnenia používateľov",
"extSystems": "Externé systémy",
"assetLicences": "Licencie assetov",
"assetLicenceGroups": "Skupiny Licencií assetov",
"keywords": "Kľúčové slová",
"authors": "Autori",
"distributionCategory": "Kategórie distribúcií",
Expand Down
24 changes: 24 additions & 0 deletions src/model/coreDam/factory/AssetLicenceGroupFactory.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { type DamAssetLicenceGroup, dateTimeNow } from '@anzusystems/common-admin'
import { ENTITY } from '@/services/api/coreDam/assetLicenceGroupApi'

export function useAssetLicenceGroupFactory() {
const createDefault = (): DamAssetLicenceGroup => {
return {
id: 0,
name: '',
extSystem: null,
licences: [],
createdAt: dateTimeNow(),
modifiedAt: dateTimeNow(),
createdBy: 0,
modifiedBy: 0,
_resourceName: ENTITY,
_system: SYSTEM_CORE_DAM,
}
}

return {
createDefault,
}
}
2 changes: 2 additions & 0 deletions src/model/coreDam/factory/UserFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function useUserFactory() {
permissionGroups: [],
permissions: {},
resolvedPermissions: {},
licenceGroups: [],
assetLicences: [],
enabled: true,
createdAt: dateTimeNow(),
Expand All @@ -43,6 +44,7 @@ export function useUserFactory() {
adminToExtSystems: user.adminToExtSystems,
userToExtSystems: [],
assetLicences: user.assetLicences,
licenceGroups: user.licenceGroups,
allowedAssetExternalProviders: user.allowedAssetExternalProviders,
allowedDistributionServices: user.allowedDistributionServices,
}
Expand Down
16 changes: 16 additions & 0 deletions src/model/coreDam/filter/AssetLicenceGroupFilter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { makeFilterHelper } from '@anzusystems/common-admin'
import { reactive } from 'vue'
import { SYSTEM_CORE_DAM } from '@/model/systems'
import { ENTITY } from '@/services/api/coreDam/assetLicenceGroupApi'

const makeFilter = makeFilterHelper(SYSTEM_CORE_DAM, ENTITY)

const filter = reactive({
id: {
...makeFilter({ name: 'id' }),
},
})

export function useAssetLicenceGroupListFilter() {
return filter
}
2 changes: 2 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { videoShowRoutes } from '@/router/routes/coreDam/videoShow'
import { jobRoutes } from '@/router/routes/coreDam/job'
import HomepageView from '@/views/system/HomepageView.vue'
import { ANotFoundView } from '@anzusystems/common-admin'
import { assetLicenceGroupRoutes } from '@/router/routes/coreDam/assetLicenceGroup'

const vueRouter = createRouter({
history: createWebHistory(),
Expand All @@ -38,6 +39,7 @@ const vueRouter = createRouter({
...userRoutes,
...extSystemRoutes,
...assetLicenceRoutes,
...assetLicenceGroupRoutes,
...permissionGroupRoutes,
...anzuUserRoutes,
...authorRoutes,
Expand Down
5 changes: 5 additions & 0 deletions src/router/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ const routes = {
DETAIL: 'assetLicence_detail',
EDIT: 'assetLicence_edit',
},
ASSET_LICENCE_GROUP: {
LIST: 'assetLicenceGroup_list',
DETAIL: 'assetLicenceGroup_detail',
EDIT: 'assetLicenceGroup_edit',
},
AUTHOR: {
LIST: 'author_list',
DETAIL: 'author_detail',
Expand Down
Loading