Skip to content

Commit

Permalink
updated js import
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenSpruk committed Oct 11, 2023
1 parent aa3a977 commit 0405816
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions vue/components/notifications-editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
APIConsumer,
ComponentDisplay,
ConsumerLogicApi,
FormConsumerOneShotApi, gettext,
FormConsumerApiOneShot, gettext,
useActionHandler,
} from '@velis/dynamicforms';
import { onMounted, onUnmounted, ref } from 'vue';
Expand Down Expand Up @@ -50,12 +50,12 @@ const notificationLogic = ref(new ConsumerLogicApi(
notificationLogic.value.getFullDefinition();
const actionViewLicense = async (): Promise<boolean> => {
await FormConsumerOneShotApi({ url: licenseConsumerUrl, trailingSlash: licenseConsumerUrlTrailingSlash, pk: 'new' });
await FormConsumerApiOneShotv({ url: licenseConsumerUrl, trailingSlash: licenseConsumerUrlTrailingSlash, pk: 'new' });
return true;
};
const actionAddNotification = async (): Promise<boolean> => {
await FormConsumerOneShotApi({
await FormConsumerApiOneShot({
url: consumerUrl,
trailingSlash: consumerTrailingSlash,
pk: 'new',
Expand Down
4 changes: 2 additions & 2 deletions vue/components/user-session/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ConsumerLogicApi, dfModal as dfModalApi,
dfModal, DialogSize,
DisplayMode,
FilteredActions, FormConsumerOneShotApi,
FilteredActions, FormConsumerApiOneShot,
FormPayload,
gettext,
} from '@velis/dynamicforms';
Expand Down Expand Up @@ -221,7 +221,7 @@ export default function useLogin() {
socialAuth.value = formDef.payload.social_auth_providers;
}

const openRegistration = async () => FormConsumerOneShotApi(
const openRegistration = async () => FormConsumerApiOneShot(
{ url: '/account/profile/register', trailingSlash: false },
);

Expand Down
5 changes: 2 additions & 3 deletions vue/components/user-session/project-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Action,
apiClient,
dfModal,
FormConsumerOneShotApi,
FormConsumerApiOneShot,
FormPayload,
} from '@velis/dynamicforms';
import slugify from 'slugify';
Expand Down Expand Up @@ -46,7 +46,6 @@ async function loadData() {
}
async function addNewProject() {
// const addProjectModal = await FormConsumerOneShotApi({ url: '/project', trailingSlash: false, pk: 'new' });
let slugChanged = false;
let ignoreSlugChange = false;
const valueChangedHandler = (action: Action, payload: FormPayload, context: any) => {
Expand All @@ -60,7 +59,7 @@ async function addNewProject() {
}
return false;
};
const addProjectModal = await FormConsumerOneShotApi(
const addProjectModal = await FormConsumerApiOneShot(
{
url: '/project',
trailingSlash: false,
Expand Down
8 changes: 4 additions & 4 deletions vue/components/user-session/user-profile.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { Action, dfModal, DialogSize, FilteredActions, FormConsumerOneShotApi, gettext } from '@velis/dynamicforms';
import { Action, dfModal, DialogSize, FilteredActions, FormConsumerApiOneShot, gettext } from '@velis/dynamicforms';
import axios from 'axios';
import _ from 'lodash';
import { computed, h, onMounted, watch } from 'vue';
Expand Down Expand Up @@ -30,7 +30,7 @@ let socialConnectionsModalPromise = null as any;
const showProjectList = computed(() => (props.projectListComponent && userSession.loggedIn && display.smAndDown.value));
async function changePassword() {
await FormConsumerOneShotApi({ url: '/account/change-password/', trailingSlash: true, pk: 'new' });
await FormConsumerApiOneShot({ url: '/account/change-password/', trailingSlash: true, pk: 'new' });
}
async function checkResetPassword() {
Expand All @@ -52,7 +52,7 @@ watch(() => userSession.impersonated, () => window.location.reload());
onMounted(() => loadData());
async function showImpersonateLogin() {
await FormConsumerOneShotApi({ url: '/account/impersonate', trailingSlash: false });
await FormConsumerApiOneShot({ url: '/account/impersonate', trailingSlash: false });
await userSession.checkLogin(false);
}
Expand All @@ -62,7 +62,7 @@ async function stopImpersonation() {
}
async function userProfile() {
await FormConsumerOneShotApi({ url: '/account/profile/current', trailingSlash: false });
await FormConsumerApiOneShot({ url: '/account/profile/current', trailingSlash: false });
await userSession.checkLogin(false);
}
Expand Down

0 comments on commit 0405816

Please sign in to comment.