File tree Expand file tree Collapse file tree 6 files changed +82
-90
lines changed
src/views/DrefFinalReportForm Expand file tree Collapse file tree 6 files changed +82
-90
lines changed Original file line number Diff line number Diff line change 100100 "stylelint" : " ^16.17.0" ,
101101 "stylelint-config-concentric" : " ^2.0.2" ,
102102 "stylelint-config-recommended" : " ^15.0.0" ,
103- "stylelint-no-unused-selectors" : " git+https://github.com/toggle-corp/stylelint-no-unused-selectors#e0831e1" ,
104103 "stylelint-value-no-unknown-custom-properties" : " ^6.0.1" ,
105104 "surge" : " ^0.23.1" ,
106105 "ts-md5" : " ^1.3.1" ,
Original file line number Diff line number Diff line change @@ -201,6 +201,7 @@ const schema: FinalReportFormSchema = {
201201 national_authorities : { } ,
202202 un_or_other_actor : { } ,
203203 is_there_major_coordination_mechanism : { } ,
204+ has_national_society_conducted : { } ,
204205
205206 // OPERATION
206207 total_dref_allocation : { } ,
@@ -426,6 +427,23 @@ const schema: FinalReportFormSchema = {
426427 } ,
427428 ) ;
428429
430+ formFields = addCondition (
431+ formFields ,
432+ formValue ,
433+ [ 'has_national_society_conducted' ] ,
434+ [ 'national_society_conducted_description' ] ,
435+ ( val ) : Pick < FinalReportFormSchemaFields , 'national_society_conducted_description' > => {
436+ if ( val ?. has_national_society_conducted ) {
437+ return {
438+ national_society_conducted_description : { } ,
439+ } ;
440+ }
441+ return {
442+ national_society_conducted_description : { forceValue : nullValue } ,
443+ } ;
444+ } ,
445+ ) ;
446+
429447 type ActionsDrefTypeRelatedFields = Pick < FinalReportFormSchemaFields , 'needs_identified' | 'event_scope' > ;
430448 formFields = addCondition (
431449 formFields ,
Original file line number Diff line number Diff line change @@ -15,17 +15,9 @@ const config = {
1515 'stylelint-config-concentric' ,
1616 ] ,
1717 plugins : [
18- 'stylelint-no-unused-selectors' ,
1918 'stylelint-value-no-unknown-custom-properties' ,
2019 ] ,
2120 rules : {
22- 'plugin/no-unused-selectors' : [
23- true ,
24- {
25- suffixesToStrip : [ '.module' ] ,
26- documents : [ '{cssDir}/{cssName}.tsx' ] ,
27- } ,
28- ] ,
2921 'csstools/value-no-unknown-custom-properties' : [
3022 true ,
3123 {
Original file line number Diff line number Diff line change 9595 "stylelint" : " ^16.17.0" ,
9696 "stylelint-config-concentric" : " ^2.0.2" ,
9797 "stylelint-config-recommended" : " ^15.0.0" ,
98- "stylelint-no-unused-selectors" : " git+https://github.com/toggle-corp/stylelint-no-unused-selectors#e0831e1" ,
9998 "stylelint-value-no-unknown-custom-properties" : " ^6.0.1" ,
10099 "typescript" : " ^5.2.2" ,
101100 "typescript-eslint" : " ^8.26.0" ,
Original file line number Diff line number Diff line change 11const config = {
22 plugins : [
3- 'stylelint-no-unused-selectors' ,
43 'stylelint-value-no-unknown-custom-properties' ,
54 ] ,
65 extends : [
@@ -10,12 +9,6 @@ const config = {
109 rules : {
1110 // https://stylelint.io/migration-guide/to-15
1211 // indentation: 4,
13- 'plugin/no-unused-selectors' : {
14- 'suffixesToStrip' : [ '.module' ] ,
15- 'documents' : [
16- '{cssDir}/{cssName}.tsx' ,
17- ] ,
18- } ,
1912 'csstools/value-no-unknown-custom-properties' : [
2013 true , {
2114 importFrom : [ './src/index.css' ]
You can’t perform that action at this time.
0 commit comments