Bugfix/fix voice call active text

This commit is contained in:
Luca Haid
2024-04-16 17:36:10 +00:00
parent 1db1d583da
commit 5c7eef001a
2 changed files with 20 additions and 1 deletions

View File

@@ -117,7 +117,7 @@ class VoiceCallHistoryModel {
$sql .= isset($filters['billable']) ? self::generateFilterCondition($filters['billable'], "billable") : "";
$sql .= isset($filters['duration']) ? self::generateFilterCondition($filters['duration'], "duration") : "";
return $sql;
return $sql . " ORDER BY `start` DESC";
}
public static function getVoiceCallHistory($filters, $limit = null, $offset = 0): array {

View File

@@ -0,0 +1,19 @@
<?php /** @noinspection ALL */
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddVoiceCallHistoryStartIndex extends AbstractMigration {
public function up(): void {
if ($this->getEnvironment() == "thetool") {
//VoiceCallHistory Table add start index
$this->table("VoiceCallHistory")->addIndex(["start"]);
}
}
public function down(): void {
if ($this->getEnvironment() == "thetool") {
$this->table("VoiceCallHistory")->removeIndex(["start"]);
}
}
}