Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
refactor: VOL-4635 remove docman support
Browse files Browse the repository at this point in the history
  • Loading branch information
ilindsay committed Jun 17, 2024
1 parent 0be45c6 commit 9d97f0d
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 37 deletions.
7 changes: 0 additions & 7 deletions module/Admin/src/Controller/MyDetailsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,4 @@ private function redirectToIndex()
true
);
}

protected function alterFormForEdit($form, $formData)
{
/* @var $form \Common\Form\Form */
$form->get('userSettings')->remove('osType');
return $form;
}
}
5 changes: 0 additions & 5 deletions module/Admin/src/Controller/UserManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,6 @@ protected function alterFormForEdit($form, $data)
//transport manager and operator, we don't modify the form
}

//Hide OS type select for non internal users
if ($data['userType']['userType'] != RefData::USER_TYPE_INTERNAL) {
$form->get('userSettings')->remove('osType');
}

return $form;
}

Expand Down
12 changes: 0 additions & 12 deletions module/Admin/src/Form/Model/Fieldset/UserSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,4 @@ class UserSettings
* @Form\Type("OlcsCheckbox")
*/
public $translateToWelsh = null;

/**
* @Form\Attributes({"id":"osType"})
* @Form\Options({
* "label": "User type",
* "disable_inarray_validator": false,
* "service_name": "Common\Service\Data\RefData",
* "category": "user_os"
* })
* @Form\Type("DynamicSelect")
*/
public $osType = null;
}
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,4 @@ protected function getUriPattern(): string
}
return (string) $url_pattern;
}

protected function getOsType(): string
{
$query = MyAccount::create([]);
$response = $this->handleQuery($query)->getResult();
return $response['osType']['id'] ?? RefData::USER_OS_TYPE_WINDOWS_7;
}
}
2 changes: 0 additions & 2 deletions module/Olcs/src/Data/Mapper/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public static function mapFromResult(array $data)
switch ($data['userType']) {
case 'internal':
$formData['userType']['team'] = $data['team']['id'];
$formData['userSettings']['osType'] = $data['osType'];
break;
case 'transport-manager':
$formData['userType']['currentTransportManager'] = $data['transportManager']['id'];
Expand Down Expand Up @@ -135,7 +134,6 @@ public static function mapFromForm(array $data)
switch ($data['userType']['userType']) {
case 'internal':
$commandData['team'] = $data['userType']['team'];
$commandData['osType'] = $data['userSettings']['osType'];
break;
case 'transport-manager':
$commandData['application'] = $data['userType']['applicationTransportManagers']['application'];
Expand Down
4 changes: 0 additions & 4 deletions test/Olcs/src/Data/Mapper/UserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public function mapFromResultDataProvider()
],
],
'translateToWelsh' => 'Y',
'osType' => 'windows_10'
],
"expected" => [
'id' => 987,
Expand Down Expand Up @@ -126,7 +125,6 @@ public function mapFromResultDataProvider()
],
'userSettings' => [
'translateToWelsh' => 'Y',
'osType' => 'windows_10'
],
]
],
Expand Down Expand Up @@ -396,7 +394,6 @@ public function mapFromFormDataProvider()
],
'userSettings' => [
'translateToWelsh' => 'Y',
'osType' => 'windows_10'
],
],
"expected" => [
Expand Down Expand Up @@ -434,7 +431,6 @@ public function mapFromFormDataProvider()
],
],
'translateToWelsh' => 'Y',
'osType' => 'windows_10'
],
],
// edit - transport-manager
Expand Down

0 comments on commit 9d97f0d

Please sign in to comment.