File tree Expand file tree Collapse file tree
Source/Applications/SystemCenterNotification Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ void ConfigureRequest(HttpRequestMessage request)
233233 for ( int index = 0 ; index < results . Count ( ) ; index ++ )
234234 {
235235 XElement data = JsonConvert . DeserializeObject < XElement > ( results [ index ] [ "Data" ] . ToString ( ) ) ;
236- results [ index ] [ "Data" ] = data . ToString ( ) ?? "" ;
236+ results [ index ] [ "Data" ] = data ? . ToString ( ) ?? "" ;
237237 }
238238
239239 return Ok ( results ) ;
Original file line number Diff line number Diff line change @@ -219,7 +219,11 @@ const ByEmailType = (props: IProps) => {
219219 Field = { 'ShowSubscription' }
220220 HeaderStyle = { { width : '10%' } }
221221 RowStyle = { { width : '10%' } }
222- Content = { ( { item } ) => item . ShowSubscription ? < ReactIcons . CheckMark Color = "var(--success)" /> : < ReactIcons . CrossMark Color = "var(--danger)" /> }
222+ Content = { ( { item } ) =>
223+ item . ShowSubscription && ( categories . find ( category => category . ID === item . EmailCategoryID ) ?. SelfSubscribe ?? false ) ?
224+ < ReactIcons . CheckMark Color = "var(--success)" /> :
225+ < ReactIcons . CrossMark Color = "var(--danger)" />
226+ }
223227 > Self Subscription
224228 </ Column >
225229 < Column < EmailType >
Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ const EmailForm = (props: IProps) => {
7171 < Select < EmailType > Record = { props . record } Field = { 'EmailCategoryID' } Label = { 'Category' }
7272 Options = { categories . map ( c => ( { Value : c . ID . toString ( ) , Label : c . Name } ) ) }
7373 Setter = { ( record ) => { record . EmailCategoryID = parseInt ( record . EmailCategoryID . toString ( ) ) ; props . setRecord ( record ) } } />
74- < CheckBox < EmailType > Record = { props . record } Field = { 'ShowSubscription' } Label = { 'Allow Self Subscription' } Setter = { ( record ) => props . setRecord ( record ) } />
74+ < CheckBox < EmailType > Record = { props . record } Field = { 'ShowSubscription' } Label = { 'Allow Self Subscription' } Setter = { ( record ) => props . setRecord ( record ) }
75+ Disabled = { ! ( categories . find ( category => category . ID === props . record . EmailCategoryID ) ?. SelfSubscribe ?? false ) }
76+ Help = { "Category must allow self-subscription to change this setting." } />
7577 < CheckBox < EmailType > Record = { props . record } Field = { 'RequireApproval' } Label = { 'Requires Approval' } Setter = { ( record ) => props . setRecord ( record ) } />
7678 </ div >
7779 < div className = "col" >
Original file line number Diff line number Diff line change @@ -189,7 +189,11 @@ const ByReport = (props: IProps) => {
189189 Field = { 'ShowSubscription' }
190190 HeaderStyle = { { width : '15%' } }
191191 RowStyle = { { width : '15%' } }
192- Content = { ( { item } ) => item . ShowSubscription ? < ReactIcons . CheckMark Color = "var(--success)" /> : < ReactIcons . CrossMark Color = "var(--danger)" /> }
192+ Content = { ( { item } ) =>
193+ item . ShowSubscription && ( categories . find ( category => category . ID === item . EmailCategoryID ) ?. SelfSubscribe ?? false ) ?
194+ < ReactIcons . CheckMark Color = "var(--success)" /> :
195+ < ReactIcons . CrossMark Color = "var(--danger)" />
196+ }
193197 > Self Subscription
194198 </ Column >
195199 < Column < ScheduledEmailType >
Original file line number Diff line number Diff line change @@ -75,7 +75,9 @@ const ReportForm = (props: IProps) => {
7575 Label = { 'File Path' }
7676 Help = { 'Specify the path to save this Report as a file. The subject will be used for the file name. If File Path is left empty, no file will be saved.' }
7777 Valid = { Valid } Setter = { ( record ) => props . setRecord ( record ) } />
78- < CheckBox < ScheduledEmailType > Record = { props . record } Field = { 'ShowSubscription' } Label = { 'Allow Self Subscription' } Setter = { ( record ) => props . setRecord ( record ) } />
78+ < CheckBox < ScheduledEmailType > Record = { props . record } Field = { 'ShowSubscription' } Label = { 'Allow Self Subscription' } Setter = { ( record ) => props . setRecord ( record ) }
79+ Disabled = { ! ( categories . find ( category => category . ID === props . record . EmailCategoryID ) ?. SelfSubscribe ?? false ) }
80+ Help = { "Category must allow self-subscription to change this setting." } />
7981 < CheckBox < ScheduledEmailType > Record = { props . record } Field = { 'RequireApproval' } Label = { 'Requires Approval' } Setter = { ( record ) => props . setRecord ( record ) } />
8082 < CheckBox < ScheduledEmailType > Record = { props . record } Field = { 'SMS' } Label = { 'Send as a Text' } Setter = { ( record ) => props . setRecord ( record ) } />
8183 </ div >
You can’t perform that action at this time.
0 commit comments