translations modified
This commit is contained in:
parent
da86fee3d7
commit
bbb8a42066
|
|
@ -25,15 +25,18 @@ function request(method) {
|
|||
headers: authHeader(url),
|
||||
// credentials: "include",
|
||||
};
|
||||
|
||||
requestOptions.headers["Access-Control-Allow-Origin"] = "*";
|
||||
requestOptions.headers["X-Localization"] =
|
||||
localStorage.getItem(SELECTED_LANG) || "tm";
|
||||
requestOptions.headers["Accept"] = "application/json";
|
||||
|
||||
if (body) {
|
||||
if (!isFormData)
|
||||
requestOptions.headers["Content-Type"] = "application/json";
|
||||
requestOptions.headers["Access-Control-Allow-Origin"] = "*";
|
||||
requestOptions.headers["X-Localization"] =
|
||||
localStorage.getItem(SELECTED_LANG) || "tm";
|
||||
requestOptions.headers["Accept"] = "application/json";
|
||||
requestOptions.body = isFormData ? body : JSON.stringify(body);
|
||||
}
|
||||
|
||||
return fetch(url, requestOptions)
|
||||
.then(handleResponse)
|
||||
.catch((error) => {
|
||||
|
|
|
|||
|
|
@ -195,5 +195,8 @@ export const locale = {
|
|||
FAQ: "Frequently asked questions",
|
||||
INSTRUCTIONS: "Read instruction",
|
||||
|
||||
AUTH_CODE_SENT_TO_YOUR_EMAIL: "We have sent you an authorization code by email"
|
||||
AUTH_CODE_SENT_TO_YOUR_EMAIL:
|
||||
"We have sent you an authorization code by email",
|
||||
|
||||
SELECT_CATEGORY: `Выберите раздел`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -185,4 +185,6 @@ export const locale = {
|
|||
INSTRUCTIONS: "Читать инструкцию",
|
||||
|
||||
AUTH_CODE_SENT_TO_YOUR_EMAIL: `Мы отправили вам код авторизации по электронной почте`,
|
||||
|
||||
SELECT_CATEGORY: `Выберите раздел`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -185,4 +185,6 @@ export const locale = {
|
|||
INSTRUCTIONS: "Gözükdirijini okamak",
|
||||
|
||||
AUTH_CODE_SENT_TO_YOUR_EMAIL: `Biz siziň elektron poçtaňyza ulgama girmäge rugsat berýän kod ugratdyk`,
|
||||
|
||||
SELECT_CATEGORY: `Bölümi saýlaň`,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,16 +6,14 @@
|
|||
<div class="intro-y col-span-12 lg:col-span-6">
|
||||
<!-- BEGIN: Form Validation -->
|
||||
<PreviewComponent class="intro-y box">
|
||||
<div
|
||||
class="
|
||||
<div class="
|
||||
flex flex-col
|
||||
sm:flex-row
|
||||
items-center
|
||||
p-5
|
||||
border-b border-slate-200/60
|
||||
dark:border-darkmode-400
|
||||
"
|
||||
>
|
||||
">
|
||||
<h2 class="font-medium text-base mr-auto">{{ $t("NEW_TICKET_FORM") }}</h2>
|
||||
</div>
|
||||
<div class="p-5">
|
||||
|
|
@ -29,20 +27,11 @@
|
|||
>Required</span
|
||||
> -->
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model.trim="validate.title.$model"
|
||||
class="form-control"
|
||||
:class="{ 'border-danger': validate.title.$error }"
|
||||
name="title"
|
||||
:placeholder=" $t('TYPE_TICKET_TITLE') "
|
||||
/>
|
||||
<input type="text" v-model.trim="validate.title.$model" class="form-control"
|
||||
:class="{ 'border-danger': validate.title.$error }" name="title"
|
||||
:placeholder="$t('TYPE_TICKET_TITLE')" />
|
||||
<template v-if="validate.title.$error">
|
||||
<div
|
||||
v-for="(error, index) in validate.title.$errors"
|
||||
:key="index"
|
||||
class="text-danger mt-2"
|
||||
>
|
||||
<div v-for="(error, index) in validate.title.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -57,30 +46,18 @@
|
|||
>Required</span
|
||||
> -->
|
||||
</label>
|
||||
<select
|
||||
class="form-select px-4 block sm:mr-2"
|
||||
aria-label="Default select example"
|
||||
v-model="validate.category_id.$model"
|
||||
:class="{ 'border-danger': validate.category_id.$error }"
|
||||
name="category"
|
||||
>
|
||||
<option value="" disabled>Select the category</option>
|
||||
<select class="form-select px-4 block sm:mr-2" aria-label="Default select example"
|
||||
v-model="validate.category_id.$model" :class="{ 'border-danger': validate.category_id.$error }"
|
||||
name="category">
|
||||
<option value="" disabled>{{ $t('SELECT_CATEGORY') }}</option>
|
||||
<template v-if="categories.length">
|
||||
<option
|
||||
v-for="category in categories"
|
||||
:key="category.id"
|
||||
:value="category.id"
|
||||
>
|
||||
<option v-for="category in categories" :key="category.id" :value="category.id">
|
||||
{{ category.name }}
|
||||
</option>
|
||||
</template>
|
||||
</select>
|
||||
<template v-if="validate.category_id.$error">
|
||||
<div
|
||||
v-for="(error, index) in validate.category_id.$errors"
|
||||
:key="index"
|
||||
class="text-danger mt-2"
|
||||
>
|
||||
<div v-for="(error, index) in validate.category_id.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -95,38 +72,20 @@
|
|||
>Required, at least 10 characters</span
|
||||
> -->
|
||||
</label>
|
||||
<textarea
|
||||
v-model.trim="validate.content.$model"
|
||||
class="form-control"
|
||||
:class="{ 'border-danger': validate.content.$error }"
|
||||
name="content"
|
||||
:placeholder=" $t('TYPE_TICKET_CONTENT') "
|
||||
rows="5"
|
||||
></textarea>
|
||||
<textarea v-model.trim="validate.content.$model" class="form-control"
|
||||
:class="{ 'border-danger': validate.content.$error }" name="content"
|
||||
:placeholder="$t('TYPE_TICKET_CONTENT')" rows="5"></textarea>
|
||||
<template v-if="validate.content.$error">
|
||||
<div
|
||||
v-for="(error, index) in validate.content.$errors"
|
||||
:key="index"
|
||||
class="text-danger mt-2"
|
||||
>
|
||||
<div v-for="(error, index) in validate.content.$errors" :key="index" class="text-danger mt-2">
|
||||
{{ error.$message }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<!-- End Content -->
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-primary mt-5"
|
||||
:disabled="isLoading"
|
||||
>
|
||||
<button type="submit" class="btn btn-primary mt-5" :disabled="isLoading">
|
||||
{{ $t("SAVE") }}
|
||||
<LoadingIcon
|
||||
icon="oval"
|
||||
color="white"
|
||||
class="w-4 h-4 ml-2"
|
||||
v-if="isLoading"
|
||||
/>
|
||||
<LoadingIcon icon="oval" color="white" class="w-4 h-4 ml-2" v-if="isLoading" />
|
||||
</button>
|
||||
</form>
|
||||
<!-- END: Validation Form -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue