@@ -53,28 +53,8 @@ public static function getObjectStructure($context = ''): array {
53
53
'author_display ' => 'Author ' ,
54
54
'subject_facet ' => 'Subject ' ,
55
55
'user_list ' => 'List (id) ' ,
56
- // 'hold_title' => 'Title',
57
- // 'hold_author' => 'Author',
58
- // 'list_id' => 'List Name',
59
- // 'list_name' => 'List Length',
60
- // 'work_id' => 'Reviewed Title',
61
- // 'work_author' => 'Reviewed Author',
62
56
],
63
57
'required ' => false ,
64
- // var_dump($groupedWorkDriver->getSolrField('format_category_main')); #Books, eBooks, Audiobooks, Music, Video
65
- // var_dump($groupedWorkDriver->getSolrField('publisherStr'));
66
- // var_dump($groupedWorkDriver->getSolrField('title_display'));
67
- // var_dump($groupedWorkDriver->getSolrField('topic_facet'));
68
- // var_dump($groupedWorkDriver->getSolrField('placeOfPublication'));
69
- // var_dump($groupedWorkDriver->getSolrField('publishDate'));
70
- // var_dump($groupedWorkDriver->getSolrField('owning_library_main'));
71
- // var_dump($groupedWorkDriver->getSolrField('lc_subject'));
72
- // var_dump($groupedWorkDriver->getSolrField('subject_facet'));
73
- // var_dump($groupedWorkDriver->getSolrField('itype_main'));
74
- // var_dump($groupedWorkDriver->getSolrField('format_main'));
75
- // var_dump($groupedWorkDriver->getSolrField('language'));
76
- // var_dump($groupedWorkDriver->getSolrField('auth_author2')); #contributors
77
- // var_dump($groupedWorkDriver->getSolrField('author_display')); #main author
78
58
],
79
59
'conditionalOperator ' => [
80
60
'property ' => 'conditionalOperator ' ,
@@ -98,27 +78,6 @@ public static function getObjectStructure($context = ''): array {
98
78
return $ structure ;
99
79
}
100
80
101
- public static function getConditionalFields () {
102
- $ conditionalFields = [
103
- 'user_checkout ' => [
104
- ['value ' => 'title ' , 'label ' => 'Title ' ],
105
- ['value ' => 'author ' , 'label ' => 'Author ' ],
106
- ],
107
- 'user_hold ' => [
108
- ['value ' => 'hold_title ' , 'label ' => 'Title ' ],
109
- ['value ' => 'hold_author ' , 'label ' => 'Author ' ],
110
- ],
111
- 'user_list ' => [
112
- ['value ' => 'list_id ' , 'label ' => 'List Name ' ],
113
- ['value ' => 'list_name ' , 'label ' => 'List Length ' ],
114
- ],
115
- 'user_work_review ' => [
116
- ['value ' => 'work_id ' , 'label ' => 'Reviewed Title ' ],
117
- ['value ' => 'work_author ' , 'label ' => 'Reviewed Author ' ],
118
- ],
119
- ];
120
- return $ conditionalFields ;
121
- }
122
81
123
82
/**
124
83
* @return array
@@ -135,53 +94,3 @@ public static function getMilestoneList(): array {
135
94
return $ milestoneList ;
136
95
}
137
96
}
138
-
139
- // $conditionalFields = Milestone::getConditionalFields();
140
- /*?>
141
- <script>
142
- var conditionalFields = <?php echo json_encode($conditionalFields); ?>
143
-
144
- function updateConditionalField(milestoneType) {
145
- // Get the dropdown element for conditional fields
146
- var conditionalFieldDropdown = document.querySelector('[name="conditionalField"]');
147
-
148
- // Clear existing options in the dropdown
149
- conditionalFieldDropdown.innerHTML = '';
150
-
151
- // Check if milestoneType has conditional fields
152
- var options = conditionalFields[milestoneType] || [];
153
-
154
- // If no options are available
155
- if (options.length === 0) {
156
- var noOption = document.createElement('option');
157
- noOption.value = '';
158
- noOption.text = 'No conditional fields available';
159
- conditionalFieldDropdown.appendChild(noOption);
160
- return;
161
- }
162
-
163
- // Populate new options
164
- options.forEach(function(option) {
165
- var newOption = document.createElement('option');
166
- newOption.value = option.value;
167
- newOption.text = option.label;
168
- conditionalFieldDropdown.appendChild(newOption);
169
- });
170
- }
171
-
172
- // Trigger dropdown update when the page loads or the milestoneType is changed
173
- document.addEventListener('DOMContentLoaded', function() {
174
- var milestoneTypeDropdown = document.querySelector('[name="milestoneType"]');
175
-
176
- if(milestoneTypeDropdown) {
177
- milestoneTypeDropdown.addEventListener('change', function() {
178
- updateConditionalField(this.value);
179
- });
180
- updateConditionalField(milestoneTypeDropdown.value);
181
-
182
- } else {
183
- console.error("Milestone type dropdown not found.");
184
- }
185
- });
186
-
187
- </script>*/
0 commit comments