Merge pull request #39 from ivandiazwm/master

Multiple Fixes and improvements for release 4.1
This commit is contained in:
Ivan Diaz 2017-06-28 16:56:26 +02:00 committed by GitHub
commit d7c7f4f059
141 changed files with 4866 additions and 271 deletions

View File

@ -1,13 +1,13 @@
{
"name": "os4-react",
"version": "4.0.0",
"author": "Ivan Diaz <ivan@opensupports.com>",
"description": "OpenSupports version 4 with reactjs",
"name": "OpenSupports",
"version": "4.1.0",
"author": "Ivan Diaz <contact@opensupports.com>",
"description": "Open source ticket system made with PHP and ReactJS",
"repository": {
"type": "git",
"url": "https://github.com/ivandiazwm/opensupports.git"
"url": "https://github.com/opensupports/opensupports"
},
"private": true,
"private": false,
"engines": {
"node": "^0.12.x",
"npm": "^2.1.x"

View File

@ -14,11 +14,11 @@ export default {
path: '/user/login',
data: loginData
}).then((result) => {
store.dispatch(this.getUserData(result.data.userId, result.data.token, result.data.staff));
if(result.data.staff) {
store.dispatch(AdminDataActions.retrieveCustomResponses());
}
store.dispatch(this.getUserData(result.data.userId, result.data.token, result.data.staff)).then(() => {
if(result.data.staff) {
store.dispatch(AdminDataActions.retrieveCustomResponses());
}
});
resolve(result);
}).catch((result) => {

View File

@ -21,6 +21,7 @@
&-name {
font-size: $font-size--md;
line-height: 20px;
display: inline-flex;
}
}

View File

@ -108,7 +108,7 @@ class App extends React.Component {
}
if(props.config.installedDone && props.config.installed && _.includes(props.location.pathname, '/install')) {
history.push('/');
history.push('/admin');
}
if(isProd && _.includes(props.location.pathname, '/components-demo')) {

View File

@ -139,8 +139,8 @@ class StaffEditor extends React.Component {
case 'DEPARTMENTS':
message = 'DEPARTMENTS_UPDATED';
break;
case 'EMAIL_SETTING':
message = 'EMAIL_SETTING_UPDATED';
case 'SEND_EMAIL_ON_NEW_TICKET':
message = 'STAFF_UPDATED';
break;
case 'FAIL':
message = 'FAILED_EDIT_STAFF';
@ -154,7 +154,7 @@ class StaffEditor extends React.Component {
return (
<div>
<span className="separator staff-editor__separator"/>
<Form className="staff-editor__update-email-setting" label={i18n('EMAIL_SETTING')} values={{sendEmailOnNewTicket: this.state.sendEmailOnNewTicket}} onChange={form => this.setState({sendEmailOnNewTicket: form.sendEmailOnNewTicket})} onSubmit={this.onSubmit.bind(this, 'EMAIL_SETTING')}>
<Form className="staff-editor__update-email-setting" values={{sendEmailOnNewTicket: this.state.sendEmailOnNewTicket}} onChange={form => this.setState({sendEmailOnNewTicket: form.sendEmailOnNewTicket})} onSubmit={this.onSubmit.bind(this, 'SEND_EMAIL_ON_NEW_TICKET')}>
<FormField name="sendEmailOnNewTicket" label={i18n('SEND_EMAIL_ON_NEW_TICKET')} field="checkbox" fieldProps={{size: 'large'}} />
<SubmitButton size="medium" className="staff-editor__submit-button">{i18n('UPDATE')}</SubmitButton>
</Form>
@ -290,7 +290,7 @@ class StaffEditor extends React.Component {
path: '/staff/edit',
data: {
staffId: this.props.staffId,
sendEmailOnNewTicket: form.sendEmailOnNewTicket,
sendEmailOnNewTicket: form.sendEmailOnNewTicket * 1,
email: form.email,
password: form.password,
level: (form.level !== undefined) ? form.level + 1 : null,

View File

@ -14,7 +14,7 @@ const steps = [
'SERVER_REQUIREMENTS',
'DATABASE_CONFIGURATION',
'USER_SYSTEM',
'SYSTEM_SETTINGS',
'SETTINGS',
'ADMIN_SETUP',
'COMPLETED'
];
@ -25,11 +25,11 @@ class InstallLayout extends React.Component {
return (
<DocumentTitle title="OpenSupports Installation">
<Widget className="install-layout">
<div className="install-layout__header">
<div className="install-layout__header-logo">
<div className="install-layout__header row">
<div className="install-layout__header-logo col-md-4">
<img width="100%" src={API.getURL() + '/images/logo.png'} alt="OpenSupports Installation"/>
</div>
<div className="install-layout__header-text">
<div className="install-layout__header-text col-md-8">
<div className="install-layout__header-title">
{i18n('INSTALL_HEADER_TITLE')}
</div>

View File

@ -12,14 +12,9 @@
&__header {
text-align: left;
&-logo {
display: inline-block;
max-width: 300px;
}
&-logo,
&-text {
display: inline-block;
margin-left: 20px;
}
&-title {

View File

@ -26,7 +26,7 @@ class InstallStep5Settings extends React.Component {
render() {
return (
<div className="install-step-5">
<Header title={i18n('STEP_TITLE', {title: i18n('SYSTEM_SETTINGS'), current: 5, total: 7})} description={i18n('STEP_5_DESCRIPTION')}/>
<Header title={i18n('STEP_TITLE', {title: i18n('SETTINGS'), current: 5, total: 7})} description={i18n('STEP_5_DESCRIPTION')}/>
{this.renderMessage()}
<Form loading={this.state.loading} onSubmit={this.onSubmit.bind(this)} value={this.state.form} onChange={(form) => this.setState({form})}>
<FormField name="title" label={i18n('TITLE')} fieldProps={{size: 'large'}} required/>
@ -110,6 +110,7 @@ class InstallStep5Settings extends React.Component {
API.call({
path: '/system/init-settings',
data: _.extend({}, form, {
'url': root,
'language': this.props.language,
'user-system-enabled': this.props['user-system-enabled'],
'registration': this.props['registration']

View File

@ -95,7 +95,7 @@ describe('Login/Recover Widget', function () {
failMessage: 'INVALID_CREDENTIALS'
}
});
expect(loginForm.props.errors).to.deep.equal({password: 'Invalid password'});
expect(loginForm.props.errors).to.deep.equal({password: 'ERROR_PASSWORD'});
expect(loginForm.props.loading).to.equal(false);
});
@ -160,7 +160,7 @@ describe('Login/Recover Widget', function () {
component.refs.recoverForm.refs.email.focus.reset();
component.onRecoverPasswordFail();
expect(recoverForm.props.errors).to.deep.equal({email: 'Email does not exist'});
expect(recoverForm.props.errors).to.deep.equal({email: 'EMAIL_NOT_EXIST'});
expect(recoverForm.props.loading).to.equal(false);
expect(component.refs.recoverForm.refs.email.focus).to.have.been.called;
});
@ -175,7 +175,7 @@ describe('Login/Recover Widget', function () {
expect(recoverForm.props.loading).to.equal(false);
expect(message).to.not.equal(null);
expect(message.props.type).to.equal('info');
expect(message.props.children).to.equal('An email with recover instructions has been sent.');
expect(message.props.children).to.equal('RECOVER_SENT');
});
it('should show front side if \'Back to login form\' link is clicked', function () {

View File

@ -1,16 +1,42 @@
import React from 'react';
import {connect} from 'react-redux';
import classNames from 'classnames';
class MainLayoutFooter extends React.Component {
render() {
return (
<div className="main-layout-footer">
<div className="main-layout-footer--powered">
Powered by <a className="main-layout-footer--os-link" href="http://www.opensupports.com/" target="_blank">OpenSupports</a>
<div className={this.getClass()}>
{(this.props.adminPanelOpened) ? this.renderExtraLinks() : null}
<div className="main-layout-footer__powered">
Powered by <a className="main-layout-footer__os-link" href="http://www.opensupports.com/" target="_blank">OpenSupports</a>
</div>
</div>
);
}
renderExtraLinks() {
return (
<div className="main-layout-footer__extra-links">
<a className="main-layout-footer__extra-link" href="http://www.opensupports.com/documentation/" target="_blank">Documentation</a>
<span> | </span>
<a className="main-layout-footer__extra-link" href="http://www.opensupports.com/download/#donation" target="_blank">Donate</a>
</div>
);
}
getClass() {
let classes = {
'main-layout-footer': true,
'main-layout-footer_admin-panel': this.props.adminPanelOpened
};
return classNames(classes);
}
}
export default MainLayoutFooter;
export default connect((store) => {
return {
adminPanelOpened: store.session.staff
};
})(MainLayoutFooter);

View File

@ -6,14 +6,35 @@
height: 32px;
width: 100%;
&--powered {
&__powered,
&__extra-links {
float: right;
padding-right: 20px;
color: white;
display: inline-block;
padding-top: 7px;
padding-top: 6px;
}
&--os-link {
color: $secondary-red;
&__extra-link,
&__os-link {
color: $secondary-blue;
text-decoration: none;
&:hover,
&:focus {
text-decoration: none;
color: black;
}
}
&__os-link {
color: $secondary-red;
}
&_admin-panel {
.main-layout-footer__powered {
float: left;
padding-left: 20px;
}
}
}

View File

@ -59,7 +59,7 @@ describe('Recover Password form', function () {
let message = TestUtils.scryRenderedComponentsWithType(component, Message)[0];
expect(message).to.not.equal(null);
expect(message.props.type).to.equal('error');
expect(message.props.children).to.equal('Invalid recover data');
expect(message.props.children).to.equal('INVALID_RECOVER');
});
it('should show message when recover success', function () {
@ -69,6 +69,6 @@ describe('Recover Password form', function () {
let message = TestUtils.scryRenderedComponentsWithType(component, Message)[0];
expect(message).to.not.equal(null);
expect(message.props.type).to.equal('success');
expect(message.props.children).to.equal('Password recovered successfully');
expect(message.props.children).to.equal('VALID_RECOVER');
});
});

View File

@ -8,6 +8,7 @@ import japaneseLanguage from 'data/languages/jp';
import portugueseLanguage from 'data/languages/pt';
import russianLanguage from 'data/languages/ru';
import turkishLanguage from 'data/languages/tr';
import italianLanguage from 'data/languages/it';
export default {
'en': {
@ -49,5 +50,9 @@ export default {
'in': {
name: 'Hindi',
data: indianLanguage
},
'it': {
name: 'Italian',
data: italianLanguage
}
};

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': '票號',
'NEXT': '下一個',
'SEND_EMAIL_ON_NEW_TICKET': '电子邮件为每个新票',
'STAFF_UPDATED': '工作人员已更新',
'UPDATE': '更新',
'CHART_CREATE_TICKET': '已創建門票',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': '這裡列出了運行OpenSupports的要求。請確保滿足所有要求。',
'STEP_3_DESCRIPTION': '請填寫MySQL數據庫配置。',
'STEP_4_DESCRIPTION': '請選擇您的用戶系統首選項。',
'STEP_5_DESCRIPTION': '請配置管理員帳號。',
'STEP_6_DESCRIPTION': '安裝完成',
'STEP_5_DESCRIPTION': '请选择您的一般系统偏好。',
'STEP_6_DESCRIPTION': '請配置管理員帳號。',
'STEP_7_DESCRIPTION': '安裝完成',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': '這是一個用於創建票證的表單。填寫表格並將您的問題/疑問/建議發送給我們。我們的支持系統將盡快回答。',

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Ticketnummer',
'NEXT': 'Nächster',
'SEND_EMAIL_ON_NEW_TICKET': 'Email für jedes neues Ticket',
'STAFF_UPDATED': 'Mitarbeiter wurde aktualisiert',
'UPDATE': 'Aktualisierung',
'CHART_CREATE_TICKET': 'Tickets erstellt',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': 'Hier sind die Voraussetzungen für das Ausführen von OpenSupports aufgelistet. Bitte stellen Sie sicher, dass alle Anforderungen erfüllt sind.',
'STEP_3_DESCRIPTION': 'Bitte füllen Sie die MySQL-Datenbankkonfiguration aus.',
'STEP_4_DESCRIPTION': 'Bitte wählen Sie Ihre Benutzer-Einstellungen.',
'STEP_5_DESCRIPTION': 'Bitte konfigurieren Sie das Administratorkonto.',
'STEP_6_DESCRIPTION': 'Die Installation ist abgeschlossen.',
'STEP_5_DESCRIPTION': 'Bitte wählen Sie Ihre allgemeinen Systemeinstellungen aus.',
'STEP_6_DESCRIPTION': 'Bitte konfigurieren Sie das Administratorkonto.',
'STEP_7_DESCRIPTION': 'Die Installation ist abgeschlossen.',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'Dies ist ein Formular für die Erstellung von Tickets. Füllen Sie das Formular aus und senden Sie uns Ihre Fragen / Anregungen. Unser Support-System wird so schnell wie möglich antworten.',
@ -359,7 +361,6 @@ export default {
'REMEMBER_ME': 'Merken',
'EMAIL_LOWERCASE': 'Email',
'PASSWORD_LOWERCASE': 'Passwort',
'SYSTEM_SETTINGS': 'System settings',
'TEST_SMTP_CONNECTION': 'SMTP-Verbindung testen',
'SMTP_CONNECTION_SUCCESS': 'SMTP-Anmeldeinformationen sind gültig.',
'SMTP_CONNECTION_ERROR': 'Kann keine Verbindung zum SMTP-Server herstellen.'

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Ticket number',
'NEXT': 'Next',
'SEND_EMAIL_ON_NEW_TICKET': 'Send email on new ticket',
'STAFF_UPDATED': 'Staff member has been updated',
'UPDATE': 'Update',
'CHART_CREATE_TICKET': 'Tickets created',
@ -241,7 +242,7 @@ export default {
'STEP_2_DESCRIPTION': 'Here are listed the requirements for running OpenSupports. Please make sure that all requirements are satisfied.',
'STEP_3_DESCRIPTION': 'Please fill the MySQL database configuration.',
'STEP_4_DESCRIPTION': 'Please select your user system preferences.',
'STEP_5_DESCRIPTION': 'Please select your general system preferences.',
'STEP_5_DESCRIPTION': 'Please fill your general system preferences.',
'STEP_6_DESCRIPTION': 'Please configure the administrator account.',
'STEP_7_DESCRIPTION': 'Installation is completed.',
@ -360,7 +361,6 @@ export default {
'REMEMBER_ME': 'Remember me',
'EMAIL_LOWERCASE': 'email',
'PASSWORD_LOWERCASE': 'password',
'SYSTEM_SETTINGS': 'System settings',
'TEST_SMTP_CONNECTION': 'Test SMTP connection',
'SMTP_CONNECTION_SUCCESS': 'SMTP credentials are valid.',
'SMTP_CONNECTION_ERROR': 'Can\'t connect to SMTP server.'

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Número de Ticket',
'NEXT': 'Siguiente',
'SEND_EMAIL_ON_NEW_TICKET': 'Enviar email por cada nuevo ticket',
'STAFF_UPDATED': 'Miembro de Staff actualizado',
'UPDATE': 'Actualizar',
'CHART_CREATE_TICKET': 'Tickets creados',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': 'Aqui estan listados los requisitos para OpenSupports. Por favor, asegúrese de cumplir con todos los requisitos.',
'STEP_3_DESCRIPTION': 'Por favor, complete la configuracion de la base de datos MySQL.',
'STEP_4_DESCRIPTION': 'Por favor, seleccione sus preferencias de sistema de usuarios.',
'STEP_5_DESCRIPTION': 'Por favor, configure la cuenta de administrador.',
'STEP_6_DESCRIPTION': 'La instalación ha sido completada.',
'STEP_5_DESCRIPTION': 'Pro favor, seleccione sus preferencias generales del sistema.',
'STEP_6_DESCRIPTION': 'Por favor, configure la cuenta de administrador.',
'STEP_7_DESCRIPTION': 'La instalación ha sido completada.',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'Este es un formulario para crear tickets. Rellene el formulario y envíenos sus dudas. Nuestro sistema de soporte responderá lo antes posible.',

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Numéro de ticket',
'NEXT': 'Suivant',
'SEND_EMAIL_ON_NEW_TICKET': 'Envoyer un e-mail pour chaque nouveau ticket',
'STAFF_UPDATED': 'Le membre du personnel a été mis à jour',
'UPDATE': 'Mettre à jour',
'CHART_CREATE_TICKET': 'Tickets créés',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': 'Voici les conditions requises pour exécuter OpenSupports. Assurez-vous que toutes les conditions requises soient satisfaites.',
'STEP_3_DESCRIPTION': 'Veuillez remplir la configuration de la base de données MySQL.',
'STEP_4_DESCRIPTION': 'Veuillez sélectionner les préférences de votre système utilisateur.',
'STEP_5_DESCRIPTION': 'Veuillez configurer le compte administrateur.',
'STEP_6_DESCRIPTION': 'L\'installation est terminée.',
'STEP_5_DESCRIPTION': 'Sélectionnez vos préférences générales du système.',
'STEP_6_DESCRIPTION': 'Veuillez configurer le compte administrateur.',
'STEP_7_DESCRIPTION': 'L\'installation est terminée.',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'Il s\'agit d\'un formulaire de création de tickets. Remplissez le formulaire et envoyez-nous vos questions / doutes / suggestions. Notre système de support répondra le plus rapidement possible.',

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'टिकट नंबर',
'NEXT': 'आगामी',
'SEND_EMAIL_ON_NEW_TICKET': 'एक ईमेल भेजने के लिए प्रत्येक नए टिकट',
'STAFF_UPDATED': 'स्टाफ सदस्य को अद्यतन किया गया है',
'UPDATE': 'अद्यतन',
'CHART_CREATE_TICKET': 'टिकट बनाया',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': 'यहां OpenSupports चलाने के लिए आवश्यकताओं को सूचीबद्ध किया गया है। कृपया सुनिश्चित करें कि सभी आवश्यकताओं को संतुष्ट किया गया है।',
'STEP_3_DESCRIPTION': 'कृपया MySQL डाटाबेस कॉन्फ़िगरेशन को भरें।',
'STEP_4_DESCRIPTION': 'कृपया अपना उपयोगकर्ता सिस्टम वरीयता चुनें',
'STEP_5_DESCRIPTION': 'कृपया व्यवस्थापक खाते को कॉन्फ़िगर करें',
'STEP_6_DESCRIPTION': 'स्थापना पूर्ण हो गई है।',
'STEP_5_DESCRIPTION': 'कृपया अपनी सामान्य सिस्टम वरीयताओं का चयन करें',
'STEP_6_DESCRIPTION': 'कृपया व्यवस्थापक खाते को कॉन्फ़िगर करें',
'STEP_7_DESCRIPTION': 'स्थापना पूर्ण हो गई है।',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'यह टिकट बनाने के लिए एक रूप है। फार्म भरें और हमें अपने मुद्दों / संदेह / सुझाव भेज सकते हैं। हमारे समर्थन प्रणाली के रूप में जल्द से जल्द यह जवाब देना होगा।',

View File

@ -0,0 +1,368 @@
export default {
'WELCOME': 'Benvenuto',
'TICKETS': 'Tickets',
'ARTICLES': 'Articoli',
'ACCOUNT': 'Account',
'SUBMIT': 'Invia',
'EMAIL': 'Email',
'PASSWORD': 'Password',
'REPEAT_PASSWORD': 'Ripeti Password',
'LOG_IN': 'Log In',
'SIGN_UP': 'Registrati',
'FORGOT_PASSWORD': 'Hai dimenticato la password?',
'RECOVER_PASSWORD': 'Recupera Password',
'RECOVER_SENT': 'E\' stata inviata un\'email con le istruzioni per il recupero della password.',
'NEW_EMAIL': 'Nuova Email',
'FULL_NAME': 'Nome Completo',
'OLD_PASSWORD': 'Vecchia Password',
'NEW_PASSWORD': 'Nuova Password',
'REPEAT_NEW_PASSWORD': 'Ripeti la nuova password',
'BACK_LOGIN_FORM': 'Ritorna al modulo di login',
'VIEW_ARTICLES': 'Visualizza gli articoli',
'EDIT_PROFILE': 'Modifica Profilo',
'CLOSE_SESSION': 'Chiudi Sessione',
'CREATE_TICKET': 'Crea Ticket',
'TICKET_LIST': 'Lista Ticket',
'SUPPORT_CENTER': 'Support Center',
'DEPARTMENT': 'Department',
'AUTHOR': 'Autore',
'DATE': 'Data',
'RESPOND': 'Rispondi',
'RESPOND_TICKET': 'Rispondi al ticket',
'NO_ATTACHMENT': 'Nessun file allegato',
'STAFF': 'Staff',
'CUSTOMER': 'Customer',
'YES': 'Si',
'NO': 'No',
'CANCEL': 'Cancellla',
'MY_ACCOUNT': 'Mio Account',
'DASHBOARD': 'Dashboard',
'USERS': 'Utente',
'SETTINGS': 'Impostazioni',
'STATISTICS': 'Statistiche',
'LAST_ACTIVITY': 'Ultime Attività',
'MY_TICKETS': 'I miei Tickets',
'NEW_TICKETS': 'Nuovo Tickets',
'ALL_TICKETS': 'Tutti i Tickets',
'CUSTOM_RESPONSES': 'Risposte Personalizzate',
'LIST_USERS': 'Lista Utenti',
'BAN_USERS': 'Utenti Indesiderati',
'LIST_ARTICLES': 'Lista Articoli',
'STAFF_MEMBERS': 'Membri dello Staff',
'DEPARTMENTS': 'Dipartimenti',
'SYSTEM_PREFERENCES': 'Impostazioni Preferite',
'ADVANCED_SETTINGS': 'Impostazioni Avanzate',
'EMAIL_TEMPLATES': 'Email Templates',
'FILTERS_CUSTOM_FIELDS': 'Filtri e Campi Personalizzati',
'PRIORITY': 'Priorità',
'NUMBER': 'Numero',
'HIGH': 'Alta',
'MEDIUM': 'Media',
'LOW': 'Bassa',
'TITLE': 'Oggetto',
'CONTENT': 'Contenuto',
'SAVE': 'Salva',
'DISCARD_CHANGES': 'Non Salvare le Modifiche',
'DELETE': 'Elimina',
'LANGUAGE': 'Lingua',
'OWNER': 'Owner',
'OWNED': 'Owned',
'STATUS': 'Stato',
'NONE': 'None',
'OPENED': 'Operto',
'CLOSED': 'Chiuso',
'CLOSE': 'Chiuso',
'RE_OPEN': 'Riaperto',
'ASSIGN_TO_ME': 'Assegnato a me',
'UN_ASSIGN': 'Non Assegnato',
'VIEW_TICKET': 'Visualizza Ticket',
'VIEW_TICKET_DESCRIPTION': 'Controlla lo stato del tuo ticket utilizzando il numero del ticket e l\'inidirzzo email.',
'SELECT_CUSTOM_RESPONSE': 'Seleziona una risposta personalizzata...',
'WARNING': 'Avvertenza',
'INFO': 'Informazione',
'ALL_DEPARTMENTS': 'Tutti i Dipartimenti',
'EMAIL_BANNED': 'Email banned',
'UN_BAN': 'Disable ban',
'BAN_NEW_EMAIL': 'Ban new email',
'BAN_EMAIL': 'Ban email',
'EDIT_EMAIL': 'Modifica email',
'EDIT_PASSWORD': 'Modifica password',
'CHANGE_EMAIL': 'Modificare email',
'CHANGE_PASSWORD': 'Modificare password',
'NAME': 'Nome',
'SIGNUP_DATE': 'Data di iscrizione',
'SEARCH_USERS': 'Cerca utente...',
'SEARCH_EMAIL': 'Cerca email...',
'USER_VIEW_TITLE': 'User #{userId}',
'EDIT_TOPIC': 'Modifica Argomento',
'ADD_TOPIC': 'Aggiugni Argomento',
'ICON': 'Icona',
'COLOR': 'Colore',
'ADD_NEW_ARTICLE': 'Aggiungi un nuovo articolo',
'ADD_ARTICLE': 'Aggiungi articolo',
'LAST_EDITED_IN': 'Ultimo aggiornamento {date}',
'EDIT': 'Modifica',
'NO_RESULTS': 'Nessun risultato',
'DELETE_AND_BAN': 'Delete and ban',
'STAFF_LEVEL': 'Livello Staff',
'ASSIGNED': 'Assegnato',
'ASSIGNED_TICKETS': '{tickets} Tickets assegnato',
'CLOSED_TICKETS': '{tickets} Tickets chiuso',
'LAST_LOGIN': 'Ultima login',
'ADD_NEW_STAFF': 'Aggiungi nuovo membro allo staff',
'ADD_STAFF': 'Aggiungi staff',
'LEVEL': 'Livello',
'LEVEL_1': 'Livello 1 (Tickets)',
'LEVEL_2': 'Livello 2 (Tickets + Articolo)',
'LEVEL_3': 'Livello 3 (Tickets + Articolo + Staff)',
'LEVEL_1_DESCRIPTION': 'può solo rispondere ai ticket e gestire gli utenti.',
'LEVEL_2_DESCRIPTION': 'può solo rispondere ai ticket e gestire gli utenti, può creare o modificare articoli e può creare risposte personalizzate.',
'LEVEL_3_DESCRIPTION': 'può solo rispondere ai ticket e gestire gli utenti, può creare o modificare articoli e può creare risposte personalizzate, può creare o modificare i membri del personale e gestire l\'intero sistema.',
'UPDATE_EMAIL': 'Aggiorna email',
'UPDATE_PASSWORD': 'Aggiorna password',
'UPDATE_LEVEL': 'Aggiorna livello',
'UPDATE_DEPARTMENTS': 'Aggiorna dipartimento',
'EDIT_STAFF': 'Modifica membro dello staff',
'ADD_DEPARTMENT': 'Inserisci dipartimento',
'UPDATE_DEPARTMENT': 'Aggiorna dipartimento',
'TRANSFER_TICKETS_TO': 'Trasferisci il ticket a ',
'COMMENTS': 'Commenti',
'DELETE_STAFF_MEMBER': 'Cancella membro dello staff',
'MAINTENANCE_MODE': 'Modalità manutenzione',
'MAINTENANCE_MODE_INFO': 'Il sistema è temporaneamente in manutenzione.',
'RECOVER_DEFAULT': 'Ripristina originale',
'SUPPORT_CENTER_URL': 'Support Center URL',
'SUPPORT_CENTER_TITLE': 'Support Center Titolo',
'SUPPORT_CENTER_LAYOUT': 'Support Center Layout',
'DEFAULT_TIMEZONE': 'Default Timezone (GMT)',
'NOREPLY_EMAIL': 'Noreply Email',
'SMTP_USER': 'SMTP User',
'SMTP_SERVER': 'SMTP Server',
'SMTP_PASSWORD': 'SMTP Password',
'PORT': 'Port',
'RECAPTCHA_PUBLIC_KEY': 'Recaptcha Public Key',
'RECAPTCHA_PRIVATE_KEY': 'Recaptcha Private Key',
'ALLOW_FILE_ATTACHMENTS': 'Consenti di allegare file',
'MAX_SIZE_KB': 'Dimensione massima (KB)',
'UPDATE_SETTINGS': 'Aggiorna modifiche',
'DEFAULT_LANGUAGE': 'Lingua predefinita',
'SUPPORTED_LANGUAGES': 'Lingue supportate',
'SUPPORTED_LANGUAGES_INFO': 'I ticket possono essere scritti solo nelle lingue supportate.',
'ALLOWED_LANGUAGES': 'Lingue consentite',
'ALLOWED_LANGUAGES_INFO': 'Le lingue consentite sono le lingue che possono essere utilizzate da un utente.',
'SETTINGS_UPDATED': 'Le impostazioni sono state aggiornate',
'ON': 'On',
'OFF': 'Off',
'BOXED': 'Boxed',
'FULL_WIDTH': 'Full width',
'LOAD_MORE': 'Load More',
'MY_NOTIFICATIONS': 'Le mie notifiche',
'ALL_NOTIFICATIONS': 'Tutte le notifiche',
'VERIFY_SUCCESS': 'Utente verificato',
'VERIFY_FAILED': 'Impossibile verificare',
'ENABLE_USER_SYSTEM': 'Utilizza il sistema utente',
'ENABLE_USER_REGISTRATION': 'Abilita la registrazione degli utenti',
'INCLUDE_USERS_VIA_CSV': 'Aggiungi utenti tramite file CSV',
'BACKUP_DATABASE': 'Backup database',
'DELETE_ALL_USERS': 'Cancella tutti gli utenti',
'PLEASE_CONFIRM_PASSWORD': 'Devi confermare la tua password per apportare queste modifiche',
'REGISTRATION_API_KEYS': 'Registrazione API keys',
'NAME_OF_KEY': 'Name of key',
'KEY': 'Key',
'ADD_API_KEY': 'Add API Key',
'NO_KEY_SELECTED': 'No Key selected',
'CHECK_TICKET': 'Controlla Ticket',
'ACTIVITY': 'Attività',
'HOME': 'Home',
'TICKET_NUMBER': 'Ticket numero',
'NEXT': 'Prossimo',
'SEND_EMAIL_ON_NEW_TICKET': 'Invia e-mail al nuovo ticket',
'STAFF_UPDATED': 'Il membro del personale è stato aggiornato',
'UPDATE': 'Aggiornare',
'CHART_CREATE_TICKET': 'Tickets creato',
'CHART_CLOSE': 'Tickets chiuso',
'CHART_SIGNUP': 'Registrati',
'CHART_COMMENT': 'Rispondi',
'CHART_ASSIGN': 'Assegnato',
//ACTIVITIES
'ACTIVITY_COMMENT': 'Commento al ticket',
'ACTIVITY_ASSIGN': 'Ticket assegnato',
'ACTIVITY_UN_ASSIGN': 'Ticket non assegnato',
'ACTIVITY_CLOSE': 'Ticket chiuso',
'ACTIVITY_CREATE_TICKET': 'Ticket creato',
'ACTIVITY_RE_OPEN': 'Ticket riaperto',
'ACTIVITY_DEPARTMENT_CHANGED': 'Cambio reparto al ticket',
'ACTIVITY_PRIORITY_CHANGED': 'Priorità del ticket modificata',
'ACTIVITY_EDIT_SETTINGS': 'impostazioni modificate',
'ACTIVITY_SIGNUP': 'signed up',
'ACTIVITY_ADD_TOPIC': 'Topic aggiunto',
'ACTIVITY_ADD_ARTICLE': 'Articolo Aggiunto',
'ACTIVITY_DELETE_TOPIC': 'Topic Cancellato',
'ACTIVITY_DELETE_ARTICLE': 'Articolo cancellato',
'ACTIVITY_EDIT_ARTICLE': 'Modifica articolo',
'ACTIVITY_ADD_STAFF': 'Membro staff aggiunto',
'ACTIVITY_ADD_DEPARTMENT': 'Dipartimento aggiunto',
'ACTIVITY_DELETE_DEPARTMENT': 'Dipartimento cancellato',
'ACTIVITY_EDIT_DEPARTMENT': 'Dipartimento modificato',
'ACTIVITY_ADD_CUSTOM_RESPONSE': 'Aggiunta risposta personalizzata',
'ACTIVITY_DELETE_CUSTOM_RESPONSE': 'Risposta personalizzata cancellata',
'ACTIVITY_EDIT_CUSTOM_RESPONSE': 'Risposta personalizzata modificata',
'ACTIVITY_BAN_USER': 'Utente bannato',
'ACTIVITY_DELETE_USER': 'Utente cancellato',
'ACTIVITY_UN_BAN_USER': 'Utente non definito',
'SERVER_REQUIREMENTS': 'Requisiti Server',
'DATABASE_CONFIGURATION': 'Configurazione Databasa',
'ADMIN_SETUP': 'Impostazioni amministratore',
'COMPLETED': 'Completato',
'INSTALL_HEADER_TITLE': 'OpenSupports Installation Wizard',
'INSTALL_HEADER_DESCRIPTION': 'Questa procedura guidata ti aiuterà a configurare e installare OpenSupport sul tuo sito web',
'SELECT_LANGUAGE': 'Seleziona la lingua',
'REQUIREMENT': 'Requisiti',
'VALUE': 'Valore',
'REFRESH': 'Aggiorna',
'USER_SYSTEM': 'User System',
'PREVIOUS': 'Precedente',
'DATABASE_HOST': 'MySQL server',
'DATABASE_NAME': 'MySQL database name',
'DATABASE_USER': 'MySQL user',
'DATABASE_PASSWORD': 'MySQL password',
'ADMIN_NAME': 'Nome account amministratore',
'ADMIN_EMAIL': 'E-mail amministratore',
'ADMIN_PASSWORD': 'Password account amministratore',
'ADMIN_PASSWORD_DESCRIPTION': 'Ricordati questa password, è necessaria per accedere al pannello di controllo.',
'INSTALLATION_COMPLETED': 'Installazione completata.',
'INSTALLATION_COMPLETED_DESCRIPTION': 'L\'installazione di OpenSupports è completata. Reindirizzamento al pannello di controllo...',
'STEP_TITLE': 'Step {current} of {total} - {title}',
'STEP_1_DESCRIPTION': 'Seleziona la lingua preferita per la procedura guidata di ainstallazione.',
'STEP_2_DESCRIPTION': 'Ecco elencati i requisiti per l\'esecuzione di OpenSupports. Assicurati che tutti i requisiti siano soddisfatti.',
'STEP_3_DESCRIPTION': 'Ti preghiamo di compilare la configurazione del database MySQL..',
'STEP_4_DESCRIPTION': 'Seleziona le preferenze del tuo sistema utente.',
'STEP_5_DESCRIPTION': 'Seleziona le tue preferenze generali di sistema.',
'STEP_6_DESCRIPTION': 'Configura l\'account amministratore.',
'STEP_7_DESCRIPTION': 'L\'installazione è completata.',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'Compila tutti i campi, ti risponderemo il prima possibile.',
'TICKET_LIST_DESCRIPTION': 'Qui puoi trovare l\'elenco di tutti i ticket che hai creato.',
'TICKETS_DESCRIPTION': 'Invia il tuo ticket al nostro centro di assistenza.',
'ARTICLES_DESCRIPTION': 'Qui puoi trovare le risposte alle tue domande.',
'ACCOUNT_DESCRIPTION': 'Tutti i tuoi ticket sono memorizzati nell\'area personale del tuo account.',
'SUPPORT_CENTER_DESCRIPTION': 'Benvenuto nel nostro centro assistenza. Puoi contattarci creando un ticket, il nostro staff ti risponderà al più presto. .',
'CUSTOM_RESPONSES_DESCRIPTION': 'Le risposte personalizzate sono risposte automatiche per problemi comuni',
'MY_TICKETS_DESCRIPTION': 'Qui puoi visualizzare i ticket che ti hanno assegnato.',
'NEW_TICKETS_DESCRIPTION': 'Qui puoi visualizare i ticket che non sono ancora stati assegnati.',
'ALL_TICKETS_DESCRIPTION': 'Qui puoi visualizzare tutti i ticket che sono stati assegnati.',
'TICKET_VIEW_DESCRIPTION': 'Questo ticket è stato inviato da un utente. Puoi rispondere o assegnare il ticket.',
'BAN_USERS_DESCRIPTION': 'Elenco utenti bannati. Puoi aggiungerne altri o riabilitarli.',
'LIST_USERS_DESCRIPTION': 'Elenco utenti registrati. Puoi aggiungere, eliminare o bannare utenti.',
'USER_VIEW_DESCRIPTION': 'Qui puoi trovare tutte le informazioni su un utente e tutti i ticket inviati dall\'utente. Puoi anche eliminarlo o bannare.',
'DELETE_USER_DESCRIPTION': 'L\'utente sarà eliminato. Tutti i suoi ticket verranno cancellati. ',
'DELETE_TOPIC_DESCRIPTION': 'Eliminando il topic, tutti gli articoli verranno cancellati.',
'EDIT_TOPIC_DESCRIPTION': 'Puoi modificare il topic.',
'ADD_ARTICLE_DESCRIPTION': 'Qui puoi aggiungere la descrizione di un articolo {category}.',
'LIST_ARTICLES_DESCRIPTION': 'Lista articoli e descrizioni.',
'ADD_TOPIC_DESCRIPTION': 'Aggiungere descrizione topic.',
'DELETE_ARTICLE_DESCRIPTION': 'Cancella descrizione articolo.',
'STAFF_MEMBERS_DESCRIPTION': 'Elenco membri dello staff.',
'ADD_STAFF_DESCRIPTION': 'Qui puoi aggiungere membri dello staff ai dipartimenti.',
'EDIT_STAFF_DESCRIPTION': 'Qiìui puoi modificare le informazioni su un membro dello staff.',
'MY_ACCOUNT_DESCRIPTION': 'Qui puoi modificare le tue informazioni.',
'DEPARTMENTS_DESCRIPTION': 'Un dipartimento è un\'unità di lavoro, è usato per classificare i ticket .',
'MAINTENANCE_MODE_DESCRIPTION': 'Il sistema è in manutenzione. Torneremo al più presto.',
'EMAIL_TEMPLATES_DESCRIPTION': 'Qui puoi modoficare i modelli delle email che verranno inviate agli utenti. Ricorda che le doppie brackets curly braces indicano un valore variabile. Ad esempio, \'name\' rappresenta il \'nome \' dell\'utente.',
'SYSTEM_PREFERENCES_DESCRIPTION': 'Qui puoi modificare le preferenze del sistema..',
'VERIFY_SUCCESS_DESCRIPTION': 'L\'utente è stato verificato correttamente.',
'VERIFY_FAILED_DESCRIPTION': 'Non è stata eseguita la verifica.',
'STATISTICS_DESCRIPTION': 'Qui puoi visualizzare le statistiche relative ai ticket e alle iscrizioni.',
'ADVANCED_SETTINGS_DESCRIPTION': 'Qui puoi modificare le impostazioni avanzate del tuo sistema. Attenzione, le modifiche apportate non possono essere invertite.',
'USER_SYSTEM_DISABLED': 'Il sistema utente è stato disabilitato',
'USER_SYSTEM_ENABLED': 'Il sistema utente è stato abilitato',
'REGISTRATION_DISABLED': 'La registrazione è stata disattivata',
'REGISTRATION_ENABLED': 'La registrazione è stata attivata',
'ADD_API_KEY_DESCRIPTION': 'Inserisci il nome e verrà generata una chiave di registrazione API.',
'SIGN_UP_VIEW_DESCRIPTION': 'Qui puoi creare un account per il nostro centro di supporto. È richiesto per i l\'invio dei ticket e per la consultazione della documentazione.',
'EDIT_PROFILE_VIEW_DESCRIPTION': 'Qui puoi modificare l\'utente modificando la tua email o la tua password.',
'ENABLE_USER_SYSTEM_DESCRIPTION': 'Abilita / disabilita l\'utilizzo di un sistema utente. Se lo disattiverai, tutti gli utenti verranno eliminati ma i biglietti saranno conservati. Se lo abiliterai, verranno creati gli utenti dei biglietti esistenti.',
'CSV_DESCRIPTION': 'l file CSV deve avere 3 colonne: e-mail, password, nome. Non esiste alcun limite nel conteggio delle righe. Sarà creato un utente per riga nel file.',
'SMTP_SERVER_DESCRIPTION': 'La configurazione del server SMTP consente all\'applicazione di inviare messaggi. Se non lo si configura, non verrà inviata alcuna email da OpenSupports.',
//ERRORS
'EMAIL_OR_PASSWORD': 'Email o password errate',
'EMAIL_NOT_EXIST': 'Email non esiste',
'ERROR_EMPTY': 'Invalid value',
'ERROR_PASSWORD': 'Password errata',
'ERROR_NAME': 'Nome errato',
'ERROR_TITLE': 'Titolo Errato',
'ERROR_EMAIL': 'Email errata',
'ERROR_CONTENT_SHORT': 'Contenuto troppo breve',
'PASSWORD_NOT_MATCH': 'La password non corrisponde',
'INVALID_RECOVER': 'I dati di ripristino non sono validi',
'TICKET_SENT_ERROR': 'Si è verificato un errore durante la creazione del ticket.',
'TICKET_COMMENT_ERROR': 'Si è verificato un errore durante il tentativo di aggiungere il commento.',
'NO_PERMISSION': 'Non hai permesso di accedere a questa pagina.',
'INVALID_USER': 'ID utente non valido',
'ERROR_RETRIEVING_TICKETS': 'Si è verificato un errore durante il tentativo di recuperare il tickets.',
'ERROR_RETRIEVING_USERS': 'Si è verificato un errore durante il tentativo di recuperare gli utenti.',
'ERROR_RETRIEVING_BAN_LIST': 'Si è verificato un errore durante il tentativo di recuperare l\'elenco delle email non autorizzate.',
'ERROR_BANNING_EMAIL': 'Si è verificato un errore durante il tentativo di bannare l\'email.',
'ERROR_RETRIEVING_ARTICLES': 'Si è verificato un errore durante il tentativo di recuperare gli articoli.',
'ERROR_LIST': 'Seleziona almeno un valore',
'ERROR_URL': 'URL non valido',
'UNVERIFIED_EMAIL': 'L\'email non è ancora verificata',
'ERROR_UPDATING_SETTINGS': 'Si è verificato un errore durante l\'aggiornamento delle impostazioni',
'INVALID_EMAIL_OR_TICKET_NUMBER': 'E-mail o numero di ticket non validi',
'INVALID_FILE': 'File non valido',
'ERRORS_FOUND': 'Trovati errori',
//MESSAGES
'SIGNUP_SUCCESS': 'È stato registrato con successo nel nostro sistema di supporto.',
'TICKET_SENT': 'Il Ticket è stato creato con successo.',
'VALID_RECOVER': 'Password recuperata correttamente',
'EMAIL_EXISTS': 'Email già in uso',
'ARE_YOU_SURE': 'Conferma azione',
'EMAIL_WILL_CHANGE': 'L\'email corrente verrà modificata',
'PASSWORD_WILL_CHANGE': 'La password corrente verrà modificata',
'EMAIL_CHANGED': 'L\'email è stata modificata correttamente',
'PASSWORD_CHANGED': 'La password è stata modificata correttamente',
'OLD_PASSWORD_INCORRECT': 'La vecchia password non è corretta',
'WILL_LOSE_CHANGES': 'Non hai salvato. Le modifiche verranno perse.',
'WILL_DELETE_CUSTOM_RESPONSE': 'La risposta personalizzata verrà eliminata..',
'WILL_DELETE_DEPARTMENT': 'Il dipartimento verrà cancellato. Tutti i ticket saranno trasferiti al dipartimento selezionato.',
'NO_STAFF_ASSIGNED': 'Nessun membro dello staff è assegnato a questo dipartimento.',
'LEVEL_UPDATED': 'Il livello è stato aggiornato correttamente.',
'DEPARTMENTS_UPDATED': 'I dipartimenti sono stati aggiornati con successo.',
'FAILED_EDIT_STAFF': 'Si è verificato un errore durante la modifica di un membro dello staff.',
'EMAIL_BANNED_SUCCESSFULLY': 'L\'email è stata bannata correttamente',
'WILL_DELETE_STAFF': 'Questo membro dello staff sarà cancellato e tutti i suoi biglietti saranno riassegnati.',
'WILL_RECOVER_EMAIL_TEMPLATE': 'Questo template verrà recuperato al suo valore predefinito in questa lingua.',
'SUCCESS_IMPORTING_CSV_DESCRIPTION': 'Il file CSV è stato importato correttamente',
'SUCCESS_DELETING_ALL_USERS': 'Gli utenti devono essere eliminati correttamente',
'LAST_7_DAYS': 'Ultimi 7 giorni',
'LAST_30_DAYS': 'Ultimi 30 giorni',
'LAST_90_DAYS': 'Ultimi 90 giorni',
'LAST_365_DAYS': 'Ultimi 365 giorni',
'ACTIVITY_COMMENT_THIS': 'ha commentato questo ticket',
'ACTIVITY_ASSIGN_THIS': 'assegnato questo ticket',
'ACTIVITY_UN_ASSIGN_THIS': 'non ha assegnato questo ticket',
'ACTIVITY_CLOSE_THIS': 'ha chiuso questo ticket',
'ACTIVITY_CREATE_TICKET_THIS': 'ha creato questo ticket',
'ACTIVITY_RE_OPEN_THIS': 'ha riaperto questo ticket',
'ACTIVITY_DEPARTMENT_CHANGED_THIS': 'dipartimento del ticket cambiato in ',
'ACTIVITY_PRIORITY_CHANGED_THIS': 'priorità del ticket modificata a ',
'DATE_PREFIX': 'on',
'LEFT_EMPTY_DATABASE': 'Left empty for automatic database creation',
'REMEMBER_ME': 'Ricordami la password',
'EMAIL_LOWERCASE': 'email',
'PASSWORD_LOWERCASE': 'password',
'TEST_SMTP_CONNECTION': 'Verifica connessione SMTP',
'SMTP_CONNECTION_SUCCESS': 'Le credenziali SMTP sono valide.',
'SMTP_CONNECTION_ERROR': 'Impossibile connettersi al server SMTP.'
};
/** Special thanks to Fabio Giarrusso for translation contribution **/

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'チケット番号',
'NEXT': '次',
'SEND_EMAIL_ON_NEW_TICKET': 'メールを送信毎に新しいチケット',
'STAFF_UPDATED': 'スタッフメンバーが更新されました',
'UPDATE': '更新',
'CHART_CREATE_TICKET': '作成されたチケット',
@ -236,13 +237,14 @@ export default {
'INSTALLATION_COMPLETED': 'インストールが完了しました。',
'INSTALLATION_COMPLETED_DESCRIPTION': 'OpenSupportsのインストールが完了しました。管理パネルにリダイレクトしています...',
'STEP_TITLE': 'ステップ {current} of {total} - {title}',
'STEP_TITLE': 'ステップ {current} / {total} - {title}',
'STEP_1_DESCRIPTION': 'インストールウィザードの優先言語を選択します。',
'STEP_2_DESCRIPTION': 'ここにOpenSupportを実行するための要件が記載されています。すべての要件が満たされていることを確認してください。',
'STEP_3_DESCRIPTION': 'MySQLデータベースの設定を記入してください。',
'STEP_4_DESCRIPTION': 'あなたのユーザーシステムの設定を選択してください。',
'STEP_5_DESCRIPTION': '管理者アカウントを設定してください。',
'STEP_6_DESCRIPTION': 'インストールが完了しました。',
'STEP_5_DESCRIPTION': 'あなたの一般的なシステム環境設定を選択してください。',
'STEP_6_DESCRIPTION': '管理者アカウントを設定してください。',
'STEP_7_DESCRIPTION': 'インストールが完了しました。',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'これはチケットを作成するためのフォームです。 フォームに記入し、あなたに問題/疑問/提案をお送りください。私たちのサポートシステムは、できるだけ早くそれに答えるでしょう。',

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Número do bilhete',
'NEXT': 'Próximo',
'SEND_EMAIL_ON_NEW_TICKET': 'Enviar email para cada novo ticket',
'STAFF_UPDATED': 'Membro da equipe foi atualizado',
'UPDATE': 'Actualizar',
'CHART_CREATE_TICKET': 'Ingressos criados',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': 'Aqui estão listados os requisitos para executar o OpenSupports. Certifique-se de que todos os requisitos estão satisfeitos.',
'STEP_3_DESCRIPTION': 'Preencha a configuração do banco de dados MySQL.',
'STEP_4_DESCRIPTION': 'Selecione as preferências do sistema do usuário.',
'STEP_5_DESCRIPTION': 'Configure a conta de administrador.',
'STEP_6_DESCRIPTION': 'A instalação está concluída.',
'STEP_5_DESCRIPTION': 'Selecione as preferências gerais do sistema.',
'STEP_6_DESCRIPTION': 'Configure a conta de administrador.',
'STEP_7_DESCRIPTION': 'A instalação está concluída.',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'Este é um formulário para criar ingressos. Preencha o formulário e envie-nos seus problemas / dúvidas / sugestões. Nosso sistema de suporte responderá o mais rápido possível.',

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Номер билета',
'NEXT': 'следующий',
'SEND_EMAIL_ON_NEW_TICKET': 'Отправить письмо на новый билет',
'STAFF_UPDATED': 'Сотрудник обновлен',
'UPDATE': 'Обновить',
'CHART_CREATE_TICKET': 'Билеты создано',

View File

@ -177,6 +177,7 @@ export default {
'TICKET_NUMBER': 'Bilet numarası',
'NEXT': 'Sonraki',
'SEND_EMAIL_ON_NEW_TICKET': 'Yeni biletle e-posta gönder',
'STAFF_UPDATED': 'Çalışanlar güncellendi',
'UPDATE': 'Güncelleştirme',
'CHART_CREATE_TICKET': 'Biletler oluşturuldu',
@ -241,8 +242,9 @@ export default {
'STEP_2_DESCRIPTION': 'Aşağıda, OpenSupports çalıştırma gereksinimleri listelenmiştir. Lütfen tüm gereksinimlerin karşılandığından emin olun.',
'STEP_3_DESCRIPTION': 'Lütfen MySQL veritabanı yapılandırmasını doldurun.',
'STEP_4_DESCRIPTION': 'Lütfen kullanıcı sistemi tercihlerinizi seçin.',
'STEP_5_DESCRIPTION': 'Lütfen yönetici hesabını yapılandırın.',
'STEP_6_DESCRIPTION': 'Kurulum tamamlandı.',
'STEP_5_DESCRIPTION': 'Lütfen genel sistem tercihlerinizi seçin.',
'STEP_6_DESCRIPTION': 'Lütfen yönetici hesabını yapılandırın.',
'STEP_7_DESCRIPTION': 'Kurulum tamamlandı.',
//VIEW DESCRIPTIONS
'CREATE_TICKET_DESCRIPTION': 'Bu, bir bilet oluşturmak için kullanılan bir form. Formu doldurun ve bize sorunlarınızı / şüphelerinizi / önerileri gönderin. Destek sistemimiz mümkün olan en kısa zamanda cevaplayacaktır.',

View File

@ -4,10 +4,6 @@ import date from 'lib-app/date';
class SessionStore {
constructor() {
this.storage = LocalStorage;
if (!this.getItem('language')) {
this.setItem('language', 'en');
}
}
createSession(userId, token) {

View File

@ -7,7 +7,7 @@ import ListValidator from 'lib-app/validations/list-validator';
let validators = {
'DEFAULT': new Validator(),
'NAME': new LengthValidator(2, 'ERROR_NAME'),
'TITLE': new LengthValidator(2, 'ERROR_TITLE'),
'TITLE': new LengthValidator(10, 'ERROR_TITLE'),
'EMAIL': new EmailValidator(),
'TEXT_AREA': new LengthValidator(10, 'ERROR_CONTENT_SHORT'),
'PASSWORD': new LengthValidator(6, 'ERROR_PASSWORD'),

View File

@ -35,7 +35,7 @@ class ConfigReducer extends Reducer {
onInitConfigs(state, payload) {
let currentLanguage = sessionStore.getItem('language');
if(!_.includes(payload.data.allowedLanguages, currentLanguage)) {
if(payload.data.allowedLanguages && !_.includes(payload.data.allowedLanguages, currentLanguage)) {
currentLanguage = payload.data.language;
}
@ -44,7 +44,7 @@ class ConfigReducer extends Reducer {
}));
return _.extend({}, state, payload.data, {
language: currentLanguage || payload.data.language,
language: currentLanguage || payload.data.language || 'en',
registration: !!(payload.data.registration * 1),
'user-system-enabled': !!(payload.data['user-system-enabled']* 1),
'allow-attachments': !!(payload.data['allow-attachments']* 1),

View File

@ -114,7 +114,7 @@ class SessionReducer extends Reducer {
userLevel: userData.level,
userDepartments: userData.departments,
userTickets: userData.tickets,
userSendEmailOnNewTicket: userData.sendEmailOnNewTicket
userSendEmailOnNewTicket: userData.sendEmailOnNewTicket * 1
});
}
@ -123,7 +123,7 @@ class SessionReducer extends Reducer {
let userId = sessionStore.getSessionData().userId;
return _.extend({}, state, {
initDone: true,
initDone: true,
logged: true,
staff: userData.staff,
userName: userData.name,
@ -133,7 +133,7 @@ class SessionReducer extends Reducer {
userDepartments: userData.departments,
userTickets: userData.tickets,
userId: userId,
userSendEmailOnNewTicket: userData.sendEmailOnNewTicket
userSendEmailOnNewTicket: userData.sendEmailOnNewTicket * 1
});
}

195
db_upgrades/4.1.sql Normal file

File diff suppressed because one or more lines are too long

82
server/_apidoc.js Normal file
View File

@ -0,0 +1,82 @@
/**
* @api {post} /staff/get Get staff
* @apiVersion 4.0.0
*
* @apiName Get staff
*
* @apiGroup Staff
*
* @apiDescription This path retrieves information about a staff member.
*
* @apiPermission staff1
*
* @apiParam {Number} staffId The id of the staff member to be searched.
*
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data Information about a staff member
* @apiSuccess {String} data.name Staff id
* @apiSuccess {String} data.email Staff id
* @apiSuccess {String} data.profilePic Staff id
* @apiSuccess {Number} data.level Staff id
* @apiSuccess {Boolean} data.staff Staff id
* @apiSuccess {[Department](#api-Data_Structures-ObjectDepartment)[]} data.departments Array of departments that has assigned.
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets that has assigned.
*
*/
/**
* @api {get} /system/download Download file
* @apiVersion 4.0.0
*
* @apiName Download file
*
* @apiGroup System
*
* @apiDescription This path downloads a file.
*
* @apiPermission any
*
* @apiParam {String} file The filename to be downloaded.
*
*
* @apiSuccess {Object} file File content
*
*/
/**
* @api {post} /system/init-settings Init settings
* @apiVersion 4.0.0
*
* @apiName Init settings
*
* @apiGroup System
*
* @apiDescription This path sets the initial settings. It can only be used once during installation.
*
* @apiPermission any
*
* @apiParam {String} language Indicates the default language of the system.
* @apiParam {String} user-system-enabled Indicates if the user system should be enabled.
* @apiParam {String} registration Indicates if the registration should be enabled.
*
* @apiUse INVALID_LANGUAGE
* @apiUse INIT_SETTINGS_DONE
*
* @apiSuccess {Object} data Empty object
*
*/
/**
* @api {OBJECT} Staff Staff
* @apiVersion 4.0.0
* @apiGroup Data Structures
* @apiParam {String} name Name of the staff member.
* @apiParam {String} email Email of the staff member.
* @apiParam {String} profilePic profilePic url of the staff member.
* @apiParam {Number} level Level of the staff member.
* @apiParam {Object[]} departments The departments the staff member has assigned.
* @apiParam {[Ticket](#api-Data_Structures-ObjectTicket)[]} tickets The tickets the staff member has assigned.
* @apiParam {Number} lastLogin The last login of the staff member.
*/

View File

@ -1,6 +1,6 @@
{
"name": "OpenSupports API Documentation",
"version": "4.0.0",
"version": "4.1.0",
"title": "OpenSupports API Documentation",
"description": "Backend API documentation for developers.",
"header": {

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/add-topic Add topic
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Add topic
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/add Add article
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Add article
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/delete-topic Delete topic
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete topic
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/delete Delete article
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete article
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/edit-topic Edit topic
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit topic
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/edit Edit article
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit a article
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /article/get-all Get all articles
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get all articles
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/add Add staff
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Add staff
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/assign-ticket Assign ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Assign ticket
*

View File

@ -4,7 +4,7 @@ use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /staff/delete Delete staff
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete staff
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/edit Edit staff
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit staff
*
@ -75,7 +75,7 @@ class EditStaffController extends Controller {
$this->staffInstance->password = Hashing::hashPassword(Controller::request('password'));
}
if(Controller::request('level') && Controller::isStaffLogged(3) && Controller::request('staffId') !== Controller::getLoggedUser()->id) {
if(Controller::request('level') && Controller::isStaffLogged(3) && !$this->isModifyingCurrentStaff()) {
$this->staffInstance->level = Controller::request('level');
}
@ -87,8 +87,8 @@ class EditStaffController extends Controller {
$this->staffInstance->profilePic = ($fileUploader instanceof FileUploader) ? $fileUploader->getFileName() : null;
}
if(Controller::request('sendEmailOnNewTicket') !== null && !Controller::request('staffId') ) {
$this->staffInstance->sendEmailOnNewTicket = Controller::request('sendEmailOnNewTicket');
if(Controller::request('sendEmailOnNewTicket') !== null && $this->isModifyingCurrentStaff()) {
$this->staffInstance->sendEmailOnNewTicket = Controller::request('sendEmailOnNewTicket') * 1;
}
$this->staffInstance->store();
@ -141,4 +141,8 @@ class EditStaffController extends Controller {
}
}
}
private function isModifyingCurrentStaff() {
return !Controller::request('staffId') || Controller::request('staffId') === Controller::getLoggedUser()->id;
}
}

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-all-tickets Get all tickets
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get all tickets
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-all Get all staffs
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get all staffs
*

View File

@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-new-tickets Get new tickets
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get new tickets
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/get-tickets Get tickets
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get tickets
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/get Get staff
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get staff
*
@ -19,13 +19,14 @@ DataValidator::with('CustomValidations', true);
* @apiUse NO_PERMISSION
*
* @apiSuccess {Object} data Information about a staff member
* @apiSuccess {String} data.name Staff id
* @apiSuccess {String} data.email Staff id
* @apiSuccess {String} data.profilePic Staff id
* @apiSuccess {Number} data.level Staff id
* @apiSuccess {Boolean} data.staff Staff id
* @apiSuccess {String} data.name Name of the staff member
* @apiSuccess {String} data.email Elmail of the staff member
* @apiSuccess {String} data.profilePic Profile pic filename of staff member
* @apiSuccess {Number} data.level Level of staff member
* @apiSuccess {Boolean} data.staff Indicates that it is a staff (always true)
* @apiSuccess {[Department](#api-Data_Structures-ObjectDepartment)[]} data.departments Array of departments that has assigned.
* @apiSuccess {[Ticket](#api-Data_Structures-ObjectTicket)[]} data.tickets Array of tickets that has assigned.
* @apiSuccess {Boolean} data.sendEmailOnNewTicket Indicates if this member receives a mail when a ticket is created.
*
*/
@ -67,7 +68,8 @@ class GetStaffController extends Controller {
'level' => $user->level,
'staff' => true,
'departments' => $parsedDepartmentList,
'tickets' => $user->sharedTicketList->toArray()
'tickets' => $user->sharedTicketList->toArray(),
'sendEmailOnNewTicket' => $user->sendEmailOnNewTicket
]);
}
}

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/last-events Get last events
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get last events
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /staff/search-tickets Search tickets
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Search tickets
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /staff/un-assign-ticket Un-assign ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Un-assign ticket
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/add-api-key Add APIKey
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Add APIKey
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/add-department Add department
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Add department
*

View File

@ -3,7 +3,7 @@ use Ifsnop\Mysqldump as IMysqldump;
/**
* @api {post} /system/backup-database Backup database
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Backup database
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/check-requirements Checks requirements
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Check requirements
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/csv-import CSV import
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName CSV import
*

View File

@ -3,7 +3,7 @@ use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /system/delete-all-users Delete all users
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete all users
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/delete-api-key Delete APIKey
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete APIKey
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/delete-department Delete department
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete department
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/disable-registration Disable registration
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Disable registration
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/disable-user-system Disable user system
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Disable user system
*

View File

@ -4,7 +4,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {get} /system/download Download file
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Download file
*
@ -16,6 +16,7 @@ use Respect\Validation\Validator as DataValidator;
*
* @apiParam {String} file The filename to be downloaded.
*
* @apiError 403 You have no permission to access the file.
*
* @apiSuccess {Object} file File content
*
@ -39,31 +40,31 @@ class DownloadController extends Controller {
public function handler() {
$fileName = Controller::request('file');
$staffUser = Staff::getDataStore($fileName, 'profilePic');
$isStaffProfilePic = !Staff::getDataStore($fileName, 'profilePic')->isNull();
if($staffUser->isNull()) {
if(!$isStaffProfilePic) {
$session = Session::getInstance();
$loggedUser = Controller::getLoggedUser();
if(!$session->sessionExists()) {
print '';
Response::respond403();
return;
}
$ticket = Ticket::getTicket($fileName, 'file');
if($ticket->isNull() || ($this->isNotAuthor($ticket, $loggedUser) && $this->isNotOwner($ticket, $loggedUser))) {
if($ticket->isNull() || ($this->isNotAuthor($ticket, $loggedUser) && $this->isNotDepartmentOwner($ticket, $loggedUser))) {
$ticketEvent = Ticketevent::getDataStore($fileName, 'file');
if($ticketEvent->isNull()) {
print '';
Response::respond403();
return;
}
$ticket = $ticketEvent->ticket;
if($this->isNotAuthor($ticket, $loggedUser) && $this->isNotOwner($ticket, $loggedUser)) {
print '';
if($this->isNotAuthor($ticket, $loggedUser) && $this->isNotDepartmentOwner($ticket, $loggedUser)) {
Response::respond403();
return;
}
}
@ -80,17 +81,17 @@ class DownloadController extends Controller {
if($session->getTicketNumber()) {
return $session->getTicketNumber() !== $ticket->ticketNumber;
} else {
return Controller::getLoggedUser()->level >= 1 || $ticket->author->id !== $loggedUser->id;
return $loggedUser->level >= 1 || $ticket->author->id !== $loggedUser->id;
}
}
private function isNotOwner($ticket, $loggedUser) {
private function isNotDepartmentOwner($ticket, $loggedUser) {
$session = Session::getInstance();
if($session->getTicketNumber()) {
return $session->getTicketNumber() !== $ticket->ticketNumber;
} else {
return !(Controller::getLoggedUser()->level >= 1) || !$ticket->owner || $ticket->owner->id !== $loggedUser->id;
return !($loggedUser->level >= 1) || !$loggedUser->sharedDepartmentList->includesId($ticket->department->id);
}
}
}

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/edit-department Edit department
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit department
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/edit-mail-template Edit mail template
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit mail template
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/edit-settings Edit settings
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit settings
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/enable-registration Enable registration
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Enable registration
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/enable-user-system Enable user system
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Enable user system
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-api-keys Get APIKeys
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get APIKeys
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-logs Get logs
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get logs
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-mail-templates Get mail templates
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get mail templates
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /system/get-settings Get settings
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get settings
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/get-stats Get stats
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get stats
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/init-admin Init admin
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Init admin
*

View File

@ -4,7 +4,7 @@ use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /system/init-database Init database
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Init database
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /system/init-settings Init settings
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Init settings
*
@ -17,6 +17,14 @@ DataValidator::with('CustomValidations', true);
* @apiParam {String} language Indicates the default language of the system.
* @apiParam {String} user-system-enabled Indicates if the user system should be enabled.
* @apiParam {String} registration Indicates if the registration should be enabled.
* @apiParam {String} no-reply-email Email from where automated emails will be sent.
* @apiParam {String} smtp-host SMTP Server address.
* @apiParam {String} smtp-port SMTP Server port.
* @apiParam {String} smtp-user SMTP Authentication User.
* @apiParam {String} smtp-pass SMTP Authentication Password.
* @apiParam {String} allow-attachments Indicates if files can be attached to tickets and comments.
* @apiParam {String} title Title of the support center
* @apiParam {String} url Url of the frontend client.
*
* @apiUse INVALID_LANGUAGE
* @apiUse INIT_SETTINGS_DONE
@ -115,12 +123,14 @@ class InitSettingsController extends Controller {
}
}
private function storeLanguages() {
$defaultLanguage = Controller::request('language');
foreach(Language::LANGUAGES as $languageCode) {
$language = new Language();
$language->setProperties([
'code' => $languageCode,
'allowed' => 1,
'supported' => ($languageCode === 'en')
'supported' => ($languageCode === $defaultLanguage)
]);
$language->store();

View File

@ -3,7 +3,7 @@ use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /system/installation-done Installation done
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Installation done
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /system/recover-mail-template Recover mail template
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Recover mail template
*

View File

@ -41,7 +41,7 @@ class TestSMTPController extends Controller {
Controller::request('smtp-host'),
Controller::request('smtp-port'),
Controller::request('smtp-user'),
Controller::request('smtp-pass'),
Controller::request('smtp-password'),
Controller::request('no-reply-email')
);

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/add-custom-response Add custom responses
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Add a custom response
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/change-department Change department
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Change department
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /ticket/change-priority Change priority
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Change priority
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/check Check ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Check ticket
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/close Close ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Close
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/comment Comment ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Comment ticket
*
@ -76,10 +76,12 @@ class CommentController extends Controller {
$session = Session::getInstance();
$this->requestData();
if ((!Controller::isUserSystemEnabled() && !Controller::isStaffLogged()) || $session->isLoggedWithId(($this->ticket->author) ? $this->ticket->author->id : 0) || (Controller::isStaffLogged() && $session->isLoggedWithId(($this->ticket->owner) ? $this->ticket->owner->id : 0))) {
if ((!Controller::isUserSystemEnabled() && !Controller::isStaffLogged()) ||
(!Controller::isStaffLogged() && $session->isLoggedWithId(($this->ticket->author) ? $this->ticket->author->id : 0)) ||
(Controller::isStaffLogged() && $session->isLoggedWithId(($this->ticket->owner) ? $this->ticket->owner->id : 0))) {
$this->storeComment();
if(Controller::isStaffLogged()) {
if(Controller::isStaffLogged() || $this->ticket->owner) {
$this->sendMail();
}
@ -122,9 +124,17 @@ class CommentController extends Controller {
private function sendMail() {
$mailSender = MailSender::getInstance();
$email = ($this->ticket->author) ? $this->ticket->author->email : $this->ticket->authorEmail;
$name = ($this->ticket->author) ? $this->ticket->author->name : $this->ticket->authorName;
if(!Controller::isStaffLogged() && $this->ticket->owner) {
$email = $this->ticket->owner->email;
$name = $this->ticket->owner->name;
}
$mailSender->setTemplate(MailTemplate::TICKET_RESPONDED, [
'to' => ($this->ticket->author) ? $this->ticket->author->email : $this->ticket->authorEmail,
'name' => ($this->ticket->author) ? $this->ticket->author->name : $this->ticket->authorName,
'to' => $email,
'name' => $name,
'ticketNumber' => $this->ticket->ticketNumber,
'title' => $this->ticket->title,
'url' => Setting::getSetting('url')->getValue()

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/create Create ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Create ticket
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/delete-custom-response Delete custom response
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete custom response
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/edit-custom-response Edit custom response
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit custom response
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/get-custom-responses Get custom responses
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get custom responses
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
DataValidator::with('CustomValidations', true);
/**
* @api {post} /ticket/get Get ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get ticket
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /ticket/re-open Reopen ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Reopen ticket
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /ticket/seen See ticket
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName See ticket
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/ban Ban email
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Ban email
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /user/check-session Check session
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Check session
*

View File

@ -4,7 +4,7 @@ use RedBeanPHP\Facade as RedBean;
/**
* @api {post} /user/delete Delete user
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Delete user
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/edit-email Edit email
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit email
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/edit-password Edit password
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Edit password
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/get-user Get user information
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get user information
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/get-users Get users list
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get users list
*

View File

@ -4,7 +4,7 @@ DataValidator::with('CustomValidations', true);
/**
* @api {post} /user/get Get my information
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get my Information
*

View File

@ -3,7 +3,7 @@ use Respect\Validation\Validator as DataValidator;
/**
* @api {post} /user/list-ban Get ban list
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Get ban list
*

View File

@ -2,7 +2,7 @@
/**
* @api {post} /user/login Login
* @apiVersion 4.0.0
* @apiVersion 4.1.0
*
* @apiName Login
*

Some files were not shown because too many files have changed in this diff Show More