Add explicit billing issue ticket type

This commit is contained in:
Johannes Zellner
2023-08-25 12:08:44 +02:00
parent 34c997401f
commit 0e507bad7e
4 changed files with 6 additions and 3 deletions

View File

@@ -932,7 +932,8 @@
"reportPlaceholder": "Describe your issue", "reportPlaceholder": "Describe your issue",
"emailPlaceholder": "If needed, provide an email address different from above to reach you", "emailPlaceholder": "If needed, provide an email address different from above to reach you",
"emailVerifyAction": "Verify now", "emailVerifyAction": "Verify now",
"emailNotVerified": "Your cloudron.io account email {{ email }} is not verified. Please verify it to open support tickets." "emailNotVerified": "Your cloudron.io account email {{ email }} is not verified. Please verify it to open support tickets.",
"typeBilling": "Billing Issue"
}, },
"remoteSupport": { "remoteSupport": {
"title": "Remote Support", "title": "Remote Support",

View File

@@ -507,7 +507,8 @@
}, },
"changeBackgroundImage": { "changeBackgroundImage": {
"title": "Stel achtergrond afbeelding in" "title": "Stel achtergrond afbeelding in"
} },
"enable2FANotAvailable": "Niet beschikbaar voor gebruikers met een externe authenticatie bron"
}, },
"backups": { "backups": {
"title": "Backups", "title": "Backups",

View File

@@ -33,6 +33,7 @@
<select class="form-control" name="type" style="width: 50%;" ng-model="feedback.type" required ng-disabled="!subscription.emailVerified"> <select class="form-control" name="type" style="width: 50%;" ng-model="feedback.type" required ng-disabled="!subscription.emailVerified">
<option value="app_error">{{ 'support.ticket.typeApp' | tr }}</option> <option value="app_error">{{ 'support.ticket.typeApp' | tr }}</option>
<option value="ticket">{{ 'support.ticket.typeBug' | tr }}</option> <option value="ticket">{{ 'support.ticket.typeBug' | tr }}</option>
<option value="billing">{{ 'support.ticket.typeBilling' | tr }}</option>
<option value="email_error">{{ 'support.ticket.typeEmail' | tr }}</option> <option value="email_error">{{ 'support.ticket.typeEmail' | tr }}</option>
</select> </select>
</div> </div>

View File

@@ -41,7 +41,7 @@ async function canCreateTicket(req, res, next) {
async function createTicket(req, res, next) { async function createTicket(req, res, next) {
assert.strictEqual(typeof req.user, 'object'); assert.strictEqual(typeof req.user, 'object');
const VALID_TYPES = [ 'feedback', 'ticket', 'app_missing', 'app_error', 'upgrade_request', 'email_error' ]; const VALID_TYPES = [ 'feedback', 'ticket', 'app_missing', 'app_error', 'upgrade_request', 'email_error', 'billing' ];
if (typeof req.body.type !== 'string' || !req.body.type) return next(new HttpError(400, 'type must be string')); if (typeof req.body.type !== 'string' || !req.body.type) return next(new HttpError(400, 'type must be string'));
if (VALID_TYPES.indexOf(req.body.type) === -1) return next(new HttpError(400, 'unknown type')); if (VALID_TYPES.indexOf(req.body.type) === -1) return next(new HttpError(400, 'unknown type'));