Skip to content
Snippets Groups Projects

Add a modal under feature flag for members invite

Closed Diana Zubova requested to merge dz/348486-additional-charge-users-modal into master
Compare and Show latest version
6 files
+ 129
13
Compare changes
  • Side-by-side
  • Inline
Files
6
<script>
import { GlModal } from '@gitlab/ui';
import { __, s__ } from '~/locale';
import { GlModal, GlLink } from '@gitlab/ui';
import { __, s__, sprintf } from '~/locale';
import { helpPagePath } from '~/helpers/help_page_helper';
export default {
components: {
GlModal,
GlLink,
},
props: {
form: {
type: HTMLFormElement,
required: true,
},
totalUserCount: {
type: Number,
required: true,
},
subscriptionSeats: {
type: String,
required: true,
},
groupName: {
type: String,
required: true,
},
},
data() {
return {
@@ -23,6 +37,23 @@ export default {
},
};
},
computed: {
modalInfoText() {
return sprintf(
s__(
'MembersOverage|Your subscription includes %{subscriptionSeats} seats. If you continue, the %{groupName} group will have %{totalSeats} seats in use and will be billed for the overage.',
),
{
subscriptionSeats: this.subscriptionSeats,
groupName: this.groupName,
totalSeats: this.totalUserCount,
},
);
},
learnMoreUrl() {
return helpPagePath('subscriptions/quarterly_reconciliation');
},
},
methods: {
handlePrimary() {
this.form.submit();
@@ -40,5 +71,8 @@ export default {
:action-primary="actionPrimary"
:action-cancel="actionCancel"
@primary="handlePrimary"
/>
>
{{ modalInfoText }}
<gl-link :href="learnMoreUrl" target="_blank">{{ __('Learn more.') }}</gl-link>
</gl-modal>
</template>
Loading