Skip to content

Commit

Permalink
Add CButtonSubmit and apply it to webapps
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinDY committed Oct 20, 2023
1 parent c36a1e5 commit 0da3ad3
Show file tree
Hide file tree
Showing 71 changed files with 632 additions and 297 deletions.
13 changes: 9 additions & 4 deletions client/web/admin/src/components/Apigw/CFiltersStepper.vue
Expand Up @@ -53,10 +53,11 @@
:filters="getSelectedFiltersByStep"
@addFilter="onAddFilter"
/>
<c-submit-button
<c-button-submit
:disabled="disabled"
:processing="processing"
:success="success"
:disabled="disabled"
:text="$t('admin:general.label.submit')"
@submit="$emit('submit')"
/>
</div>
Expand All @@ -65,7 +66,6 @@
</template>
<script>
import CFilterModal from 'corteza-webapp-admin/src/components/Apigw/CFilterModal'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
import CFiltersTable from 'corteza-webapp-admin/src/components/Apigw/CFiltersTable'
import CFiltersDropdown from 'corteza-webapp-admin/src/components/Apigw/CFiltersDropdown'
Expand All @@ -78,31 +78,36 @@ const mapKindToStep = {
export default {
components: {
CFilterModal,
CSubmitButton,
CFiltersTable,
CFiltersDropdown,
},
props: {
fetching: {
type: Boolean,
value: false,
},
processing: {
type: Boolean,
value: false,
},
success: {
type: Boolean,
value: false,
},
filters: {
type: Array,
required: true,
},
availableFilters: {
type: Array,
required: true,
},
steps: {
type: Array,
required: true,
Expand Down
9 changes: 4 additions & 5 deletions client/web/admin/src/components/Apigw/CRouteEditorInfo.vue
Expand Up @@ -139,11 +139,12 @@
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:disabled="saveDisabled"
:processing="processing"
:success="success"
:disabled="saveDisabled"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit', route)"
/>

Expand All @@ -161,7 +162,6 @@
<script>
import { NoID } from '@cortezaproject/corteza-js'
import ConfirmationToggle from 'corteza-webapp-admin/src/components/ConfirmationToggle'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CRouteEditorInfo',
Expand All @@ -173,7 +173,6 @@ export default {
components: {
ConfirmationToggle,
CSubmitButton,
},
props: {
Expand Down
10 changes: 3 additions & 7 deletions client/web/admin/src/components/Apigw/CSettingsEditor.vue
Expand Up @@ -52,18 +52,18 @@
</b-form-row>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:processing="processing"
:success="success"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit', settings)"
/>
</template>
</b-card>
</template>

<script>
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CSettingsEditor',
Expand All @@ -73,10 +73,6 @@ export default {
keyPrefix: 'settings',
},
components: {
CSubmitButton,
},
props: {
settings: {
type: Object,
Expand Down
Expand Up @@ -103,11 +103,11 @@
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:processing="processing"
:success="success"
:disabled="saveDisabled"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit', application)"
/>

Expand All @@ -125,7 +125,6 @@
<script>
import { NoID } from '@cortezaproject/corteza-js'
import ConfirmationToggle from 'corteza-webapp-admin/src/components/ConfirmationToggle'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CApplicationEditorInfo',
Expand All @@ -137,7 +136,6 @@ export default {
components: {
ConfirmationToggle,
CSubmitButton,
},
props: {
Expand Down
Expand Up @@ -134,12 +134,12 @@
</template>

<template #footer>
<c-submit-button
data-test-id="button-submit"
class="float-right"
<c-button-submit
:disabled="disabled"
:processing="processing"
:success="success"
:disabled="disabled"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit', { unify, unifyAssets })"
/>
</template>
Expand All @@ -148,7 +148,6 @@

<script>
import { NoID } from '@cortezaproject/corteza-js'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CApplicationEditorUnify',
Expand All @@ -158,10 +157,6 @@ export default {
keyPrefix: 'editor.unify',
},
components: {
CSubmitButton,
},
props: {
unify: {
type: Object,
Expand Down
Expand Up @@ -443,11 +443,12 @@ curl -X POST {{ curlURL }} \
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:disabled="saveDisabled"
:processing="processing"
:success="success"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="submit"
/>

Expand Down Expand Up @@ -479,7 +480,6 @@ curl -X POST {{ curlURL }} \
import { NoID } from '@cortezaproject/corteza-js'
import { handle, components } from '@cortezaproject/corteza-vue'
import ConfirmationToggle from 'corteza-webapp-admin/src/components/ConfirmationToggle'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
import CRolePicker from 'corteza-webapp-admin/src/components/CRolePicker'
import CSelectUser from 'corteza-webapp-admin/src/components/Authclient/CSelectUser'
import copy from 'copy-to-clipboard'
Expand All @@ -497,7 +497,6 @@ export default {
components: {
ConfirmationToggle,
CSubmitButton,
CRolePicker,
CSelectUser,
CInputDateTime,
Expand Down
1 change: 1 addition & 0 deletions client/web/admin/src/components/CRolePicker.vue
Expand Up @@ -48,6 +48,7 @@ import { debounce } from 'lodash'
import { VueSelect } from 'vue-select'
import { components } from '@cortezaproject/corteza-vue/'
const { CInputConfirm } = components
function roleSorter (a, b) {
return `${a.name} ${a.handle} ${a.roleID}`.localeCompare(`${b.name} ${b.handle} ${b.roleID}`)
}
Expand Down
Expand Up @@ -133,11 +133,12 @@
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:disabled="saveDisabled"
:processing="processing"
:success="success"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit', node)"
/>

Expand All @@ -154,7 +155,6 @@
<script>
import { NoID } from '@cortezaproject/corteza-js'
import ConfirmationToggle from 'corteza-webapp-admin/src/components/ConfirmationToggle'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CFederationEditorInfo',
Expand All @@ -166,7 +166,6 @@ export default {
components: {
ConfirmationToggle,
CSubmitButton,
},
props: {
Expand Down
11 changes: 4 additions & 7 deletions client/web/admin/src/components/Permissions/CPermissionList.vue
Expand Up @@ -179,14 +179,13 @@
v-if="loaded && canGrant"
#footer
>
<c-submit-button
class="float-right"
<c-button-submit
:processing="processing"
:success="success"
:text="$t('ui.save')"
class="float-right"
@submit="onSubmit"
>
{{ $t('ui.save') }}
</c-submit-button>
/>
</template>
</b-card>

Expand Down Expand Up @@ -262,7 +261,6 @@
</template>

<script>
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
import { VueSelect } from 'vue-select'
import _ from 'lodash'
Expand All @@ -272,7 +270,6 @@ export default {
},
components: {
CSubmitButton,
VueSelect,
},
Expand Down
9 changes: 4 additions & 5 deletions client/web/admin/src/components/Queues/CQueueEditorInfo.vue
Expand Up @@ -96,11 +96,12 @@
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:disabled="saveDisabled"
:processing="processing"
:success="success"
:disabled="saveDisabled"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit', queue)"
/>

Expand All @@ -119,7 +120,6 @@
import { NoID } from '@cortezaproject/corteza-js'
import { handle } from '@cortezaproject/corteza-vue'
import ConfirmationToggle from 'corteza-webapp-admin/src/components/ConfirmationToggle'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CQueueEditorInfo',
Expand All @@ -131,7 +131,6 @@ export default {
components: {
ConfirmationToggle,
CSubmitButton,
},
props: {
Expand Down
9 changes: 4 additions & 5 deletions client/web/admin/src/components/Role/CRoleEditorInfo.vue
Expand Up @@ -158,11 +158,12 @@
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:disabled="saveDisabled"
:processing="processing"
:success="success"
:disabled="saveDisabled"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="submit()"
/>

Expand Down Expand Up @@ -191,7 +192,6 @@
import { system, NoID } from '@cortezaproject/corteza-js'
import { handle } from '@cortezaproject/corteza-vue'
import ConfirmationToggle from 'corteza-webapp-admin/src/components/ConfirmationToggle'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
export default {
name: 'CRoleEditorInfo',
Expand All @@ -203,7 +203,6 @@ export default {
components: {
ConfirmationToggle,
CSubmitButton,
},
props: {
Expand Down
7 changes: 3 additions & 4 deletions client/web/admin/src/components/Role/CRoleEditorMembers.vue
Expand Up @@ -55,10 +55,11 @@
</template>

<template #footer>
<c-submit-button
class="float-right"
<c-button-submit
:processing="processing"
:success="success"
:text="$t('admin:general.label.submit')"
class="float-right"
@submit="$emit('submit')"
/>
</template>
Expand All @@ -68,7 +69,6 @@
<script>
import { debounce } from 'lodash'
import { VueSelect } from 'vue-select'
import CSubmitButton from 'corteza-webapp-admin/src/components/CSubmitButton'
import { components } from '@cortezaproject/corteza-vue/'
const { CInputConfirm } = components
Expand All @@ -79,7 +79,6 @@ export default {
},
components: {
CSubmitButton,
VueSelect,
CInputConfirm,
},
Expand Down

0 comments on commit 0da3ad3

Please sign in to comment.