mirror of
https://github.com/Karaka-Management/oms-Support.git
synced 2026-01-11 00:58:41 +00:00
bump
This commit is contained in:
parent
8480819da4
commit
0bc085da11
35
.github/dev_bug_report.md
vendored
35
.github/dev_bug_report.md
vendored
|
|
@ -1,35 +0,0 @@
|
||||||
---
|
|
||||||
name: Dev Bug Report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: ''
|
|
||||||
labels: stat_backlog, type_bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# Bug Description
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
# How to Reproduce
|
|
||||||
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
## Minimal Code Example
|
|
||||||
|
|
||||||
```
|
|
||||||
// your code ...
|
|
||||||
```
|
|
||||||
|
|
||||||
# Expected Behavior
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
# Screenshots
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
# Additional Information
|
|
||||||
Add any other context about the problem here.
|
|
||||||
18
.github/dev_feature_request.md
vendored
18
.github/dev_feature_request.md
vendored
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
name: Dev Feature Request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: stat_backlog, type_feature
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
# What is the feature you request
|
|
||||||
* A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
* A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
# Alternatives
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
# Additional Information
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
"type": 2,
|
"type": 2,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Tickets",
|
"name": "Tickets",
|
||||||
"uri": "{/base}/support/list",
|
"uri": "{/base}/support/list?{?}",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
@ -33,7 +33,7 @@
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "List",
|
"name": "List",
|
||||||
"uri": "{/base}/support/list",
|
"uri": "{/base}/support/list?{?}",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
|
||||||
|
|
@ -161,16 +161,6 @@ final class ApiController extends Controller
|
||||||
|
|
||||||
$handler = $this->app->moduleManager->get('Admin', 'Api')->setUpServerMailHandler();
|
$handler = $this->app->moduleManager->get('Admin', 'Api')->setUpServerMailHandler();
|
||||||
|
|
||||||
/** @var \Model\Setting $emailFrom */
|
|
||||||
$emailFrom = $this->app->appSettings->get(
|
|
||||||
names: AdminSettingsEnum::MAIL_SERVER_ADDR,
|
|
||||||
module: 'Admin'
|
|
||||||
);
|
|
||||||
|
|
||||||
if (empty($emailFrom->content)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @var \Model\Setting $billingTemplate */
|
/** @var \Model\Setting $billingTemplate */
|
||||||
$supportTemplate = $this->app->appSettings->get(
|
$supportTemplate = $this->app->appSettings->get(
|
||||||
names: SettingsEnum::SUPPORT_EMAIL_TEMPLATE,
|
names: SettingsEnum::SUPPORT_EMAIL_TEMPLATE,
|
||||||
|
|
@ -183,36 +173,43 @@ final class ApiController extends Controller
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$mail = clone $baseEmail;
|
$mail = clone $baseEmail;
|
||||||
$mail->setFrom($emailFrom->content);
|
|
||||||
|
$status = false;
|
||||||
|
if ($mail->id !== 0) {
|
||||||
|
$status = $this->app->moduleManager->get('Admin', 'Api')->setupEmailDefaults($mail, $this->app->l11nServer->language);
|
||||||
|
}
|
||||||
|
|
||||||
$mail->addTo($email);
|
$mail->addTo($email);
|
||||||
|
|
||||||
// @todo probably needs to be changed to messageId = \uniqid() . '-' . $ticket->id ?!
|
// @todo probably needs to be changed to messageId = \uniqid() . '-' . $ticket->id ?!
|
||||||
// Careful, uniqueid is overwritten in the email class, will need check for if empty
|
// Careful, uniqueid is overwritten in the email class, will need check for if empty
|
||||||
$mail->addCustomHeader('ticket_id', (string) $ticket->id);
|
$mail->addCustomHeader('ticket_id', (string) $ticket->id);
|
||||||
|
|
||||||
$mailL11n = $baseEmail->getL11nByLanguage($language);
|
|
||||||
if ($mailL11n->id === 0) {
|
|
||||||
$mailL11n = $baseEmail->getL11nByLanguage($language = $this->app->l11nServer->language);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($mailL11n->id === 0) {
|
|
||||||
$mailL11n = $baseEmail->getL11nByLanguage($language = 'en');
|
|
||||||
}
|
|
||||||
|
|
||||||
$mail->subject = $mailL11n->subject;
|
|
||||||
$mail->body = $mailL11n->body;
|
|
||||||
$mail->bodyAlt = $mailL11n->bodyAlt;
|
|
||||||
|
|
||||||
$lang = include __DIR__ . '/../../Tasks/Theme/Backend/Lang/' . $language . '.lang.php';
|
$lang = include __DIR__ . '/../../Tasks/Theme/Backend/Lang/' . $language . '.lang.php';
|
||||||
|
|
||||||
$mail->template = [
|
$mail->template = \array_merge(
|
||||||
'{user_name}' => $account->login,
|
$mail->template,
|
||||||
'{ticket_id}' => $ticket->id,
|
[
|
||||||
'{ticket_status}' => $lang['Tasks']['S' . $ticket->task->status],
|
'{user_name}' => $account->login,
|
||||||
'{ticket_subject}' => $ticket->task->title,
|
'{ticket_id}' => $ticket->id,
|
||||||
];
|
'{ticket_status}' => $lang['Tasks']['S' . $ticket->task->status],
|
||||||
|
'{ticket_subject}' => $ticket->task->title,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
$handler->send($mail);
|
if ($status) {
|
||||||
|
$status = $handler->send($mail);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$status) {
|
||||||
|
\phpOMS\Log\FileLogger::getInstance()->error(
|
||||||
|
\phpOMS\Log\FileLogger::MSG_FULL, [
|
||||||
|
'message' => 'Couldn\'t send mail: ' . $mail->id,
|
||||||
|
'line' => __LINE__,
|
||||||
|
'file' => self::class,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ final class BackendController extends Controller
|
||||||
public function viewSupportList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
public function viewSupportList(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
{
|
{
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$head->addAsset(AssetType::CSS, 'Modules/Tasks/Theme/Backend/css/styles.css?v=1.0.0');
|
$head->addAsset(AssetType::CSS, 'Modules/Tasks/Theme/Backend/css/styles.css?v=' . self::VERSION);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Support/Theme/Backend/support-list');
|
$view->setTemplate('/Modules/Support/Theme/Backend/support-list');
|
||||||
|
|
@ -261,7 +261,7 @@ final class BackendController extends Controller
|
||||||
public function viewPrivateSupportDashboard(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
public function viewPrivateSupportDashboard(RequestAbstract $request, ResponseAbstract $response, array $data = []) : RenderableInterface
|
||||||
{
|
{
|
||||||
$head = $response->data['Content']->head;
|
$head = $response->data['Content']->head;
|
||||||
$head->addAsset(AssetType::CSS, 'Modules/Tasks/Theme/Backend/css/styles.css?v=1.0.0');
|
$head->addAsset(AssetType::CSS, 'Modules/Tasks/Theme/Backend/css/styles.css?v=' . self::VERSION);
|
||||||
|
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Support/Theme/Backend/user-support-dashboard');
|
$view->setTemplate('/Modules/Support/Theme/Backend/user-support-dashboard');
|
||||||
|
|
|
||||||
|
|
@ -106,8 +106,8 @@ echo $this->data['nav']->render(); ?>
|
||||||
<div class="col-xs-0 end-xs plain-grid">
|
<div class="col-xs-0 end-xs plain-grid">
|
||||||
<?php if ($task->isEditable && $this->request->header->account === $task->createdBy->id) : ?>
|
<?php if ($task->isEditable && $this->request->header->account === $task->createdBy->id) : ?>
|
||||||
<div class="col-xs end-xs plain-grid">
|
<div class="col-xs end-xs plain-grid">
|
||||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
<button class="save vh"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
<button class="cancel vh"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||||
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
@ -148,8 +148,8 @@ echo $this->data['nav']->render(); ?>
|
||||||
|
|
||||||
<div class="col-xs end-xs plain-grid">
|
<div class="col-xs end-xs plain-grid">
|
||||||
<input type="hidden" value="" name="id">
|
<input type="hidden" value="" name="id">
|
||||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
<button class="save vh"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
<button class="cancel vh"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||||
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -272,8 +272,8 @@ echo $this->data['nav']->render(); ?>
|
||||||
) : ?>
|
) : ?>
|
||||||
<div class="col-xs end-xs plain-grid">
|
<div class="col-xs end-xs plain-grid">
|
||||||
<input type="hidden" value="<?= $element->taskElement->id; ?>" name="id">
|
<input type="hidden" value="<?= $element->taskElement->id; ?>" name="id">
|
||||||
<button class="save hidden"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
<button class="save vh"><?= $this->getHtml('Save', '0', '0'); ?></button>
|
||||||
<button class="cancel hidden"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
<button class="cancel vh"><?= $this->getHtml('Cancel', '0', '0'); ?></button>
|
||||||
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
<button class="update"><?= $this->getHtml('Edit', '0', '0'); ?></button>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user