This repository has been archived by the owner on Aug 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Task Allocation Rules sub category support (#119)
* feat: Task Allocation Rules sub category support * fix: unit tests * fix: undone changes to file * fix: refactor * fix: refactor
- Loading branch information
Showing
8 changed files
with
91 additions
and
20 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
module/Admin/assets/js/inline/forms/selected-category-subcategory-filtering.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
OLCS.ready(function() { | ||
"use strict"; | ||
|
||
OLCS.cascadeInput({ | ||
source: "#category", | ||
dest: "#subCategory", | ||
url: "/list/task-sub-categories", | ||
emptyLabel: "Not applicable" | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,6 @@ | |
use Mockery\Adapter\Phpunit\MockeryTestCase; | ||
use Olcs\Data\Mapper\TaskAllocationRule as Sut; | ||
|
||
/** | ||
* TaskAllocationRuleTest | ||
* | ||
* @author Mat Evans <[email protected]> | ||
*/ | ||
class TaskAllocationRuleTest extends MockeryTestCase | ||
{ | ||
public function testMapFromResult() | ||
|
@@ -18,6 +13,7 @@ public function testMapFromResult() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => ['id' => 'GOODS'], | ||
'isMlh' => '', | ||
'trafficArea' => 'TA', | ||
|
@@ -29,6 +25,7 @@ public function testMapFromResult() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'GOODS', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|
@@ -46,6 +43,7 @@ public function testMapFromResultAlphaSplit() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => ['id' => 'GOODS'], | ||
'isMlh' => '', | ||
'trafficArea' => 'TA', | ||
|
@@ -58,6 +56,7 @@ public function testMapFromResultAlphaSplit() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'GOODS', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|
@@ -83,6 +82,7 @@ public function testMapFromForm() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'lcat_gv', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|
@@ -95,6 +95,7 @@ public function testMapFromForm() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'lcat_gv', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|
@@ -111,6 +112,7 @@ public function testMapFromFormWithTeamId() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'na', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|
@@ -123,6 +125,7 @@ public function testMapFromFormWithTeamId() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => null, | ||
'isMlh' => null, | ||
'trafficArea' => 'TA', | ||
|
@@ -139,6 +142,7 @@ public function testMapFromFormWithAlphaSplit() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'lcat_gv', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|
@@ -151,6 +155,7 @@ public function testMapFromFormWithAlphaSplit() | |
'id' => 1404, | ||
'version' => 33, | ||
'category' => 'CAT', | ||
'subCategory' => 'SUBCAT', | ||
'goodsOrPsv' => 'lcat_gv', | ||
'isMlh' => 'N', | ||
'trafficArea' => 'TA', | ||
|