-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
psp-9080 add missing LEASE_STAKEHOLDER_TYPE codes. #4286
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
IF EXISTS ( | ||
SELECT | ||
1 | ||
FROM | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNER' | ||
) BEGIN | ||
UPDATE | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
SET | ||
IS_DISABLED = 1, | ||
CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNER'; | ||
|
||
END; | ||
|
||
IF EXISTS ( | ||
SELECT | ||
1 | ||
FROM | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNREP' | ||
) BEGIN | ||
UPDATE | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
SET | ||
IS_DISABLED = 1, | ||
CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNREP'; | ||
|
||
END; | ||
|
||
GO |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
IF NOT EXISTS ( | ||
SELECT | ||
1 | ||
FROM | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNER' | ||
) | ||
INSERT INTO | ||
PIMS_LEASE_STAKEHOLDER_TYPE ( | ||
LEASE_STAKEHOLDER_TYPE_CODE, | ||
DESCRIPTION, | ||
IS_PAYABLE_RELATED | ||
) | ||
VALUES | ||
('OWNER', N'Owner', 1); | ||
|
||
ELSE | ||
UPDATE | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
SET | ||
IS_DISABLED = 0, | ||
CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNER'; | ||
|
||
IF NOT EXISTS ( | ||
SELECT | ||
1 | ||
FROM | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNREP' | ||
) | ||
INSERT INTO | ||
PIMS_LEASE_STAKEHOLDER_TYPE ( | ||
LEASE_STAKEHOLDER_TYPE_CODE, | ||
DESCRIPTION, | ||
IS_PAYABLE_RELATED | ||
) | ||
VALUES | ||
('OWNREP', N'Owner Representative', 1); | ||
|
||
ELSE | ||
UPDATE | ||
PIMS_LEASE_STAKEHOLDER_TYPE | ||
SET | ||
IS_DISABLED = 0, | ||
CONCURRENCY_CONTROL_NUMBER = CONCURRENCY_CONTROL_NUMBER + 1 | ||
WHERE | ||
LEASE_STAKEHOLDER_TYPE_CODE = 'OWNREP'; | ||
|
||
GO |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,10 +100,12 @@ export const Select: React.FC<React.PropsWithChildren<SelectProps>> = ({ | |
}; | ||
|
||
const renderPlaceholder = () => { | ||
if (!placeholder) { | ||
const calculatedPlaceholder = | ||
!value || options.find(option => option.value === value) ? null : 'N/A'; // Render N/A in the event that the currently selected value is not in the list. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: this is required, otherwise if a value is currently selected that is not in the options list, the select will default to showing the first value in the options list, even if that is not what the select's current value is. To correct this, the user would have to select the value which currently appears selected, which is not intuitive. |
||
if (!calculatedPlaceholder && !placeholder) { | ||
return null; | ||
} | ||
return <option value="">{`${placeholder}`}</option>; | ||
return <option value="">{`${placeholder ?? calculatedPlaceholder}`}</option>; | ||
}; | ||
|
||
const renderOptions = () => { | ||
|
@@ -153,7 +155,7 @@ export const Select: React.FC<React.PropsWithChildren<SelectProps>> = ({ | |
custom={custom} | ||
isInvalid={!!touch && !!error} | ||
{...rest} | ||
value={getIn(values, field) ?? ''} | ||
value={value ?? ''} | ||
multiple={multiple} | ||
onChange={onSelectChange} | ||
onBlur={(e: any) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Doug did a migration of the old values in the alter up, but forgot to add these new values. They are present in the BUILD.