@asd20/ui 3.2.541 → 3.2.543
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -129,8 +129,12 @@ import Asd20SocialMenu from '../../../components/molecules/Asd20SocialMenu'
|
|
|
129
129
|
import Asd20Logo from '../../../components/atoms/Asd20Logo'
|
|
130
130
|
import Asd20DistrictLogo from '../../../components/atoms/Asd20DistrictLogo'
|
|
131
131
|
import organizationAddress from '../../../data/organization-address.json'
|
|
132
|
-
import
|
|
133
|
-
|
|
132
|
+
import {
|
|
133
|
+
organizationLevel,
|
|
134
|
+
organizationName,
|
|
135
|
+
} from '../../../helpers/organization.js'
|
|
136
|
+
// import organizationTitle from '../../../helpers/organizationTitle'
|
|
137
|
+
// import organizationSubtitle from '../../../helpers/organizationSubtitle'
|
|
134
138
|
|
|
135
139
|
export default {
|
|
136
140
|
name: 'Asd20PageFooter',
|
|
@@ -187,10 +191,10 @@ export default {
|
|
|
187
191
|
return adminData ? adminData.email : ''
|
|
188
192
|
},
|
|
189
193
|
mapOrganizationTitle() {
|
|
190
|
-
return
|
|
194
|
+
return organizationName(this.organization.title)
|
|
191
195
|
},
|
|
192
196
|
mapOrganizationSubtitle() {
|
|
193
|
-
return
|
|
197
|
+
return organizationLevel(this.organization.title)
|
|
194
198
|
},
|
|
195
199
|
},
|
|
196
200
|
}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
export function organizationName(title) {
|
|
2
2
|
return title.replace(
|
|
3
|
-
/(\bElementary School|Elementary-Middle School|Middle School|Middle-High School|High School|Elementary-Middle-High School
|
|
3
|
+
/(\bElementary School|Elementary-Middle School|Middle School|Middle-High School|High School|Elementary-Middle-High School)/g,
|
|
4
4
|
''
|
|
5
5
|
)
|
|
6
|
+
// return title.replace(
|
|
7
|
+
// /(\bElementary School|Elementary-Middle School|Middle School|Middle-High School|High School|Elementary-Middle-High School|\w*[-]\w*\b)(?!.*\1)/g,
|
|
8
|
+
// ''
|
|
9
|
+
// )
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
export function organizationLevel(title) {
|
|
9
13
|
return (
|
|
10
14
|
title.match(
|
|
11
|
-
/(\bElementary School|Elementary-Middle School|Middle School|Middle-High School|High School|Elementary-Middle-High School
|
|
15
|
+
/(\bElementary School|Elementary-Middle School|Middle School|Middle-High School|High School|Elementary-Middle-High School)/g
|
|
12
16
|
) || []
|
|
13
17
|
).join('')
|
|
18
|
+
// return (
|
|
19
|
+
// title.match(
|
|
20
|
+
// /(\bElementary School|Elementary-Middle School|Middle School|Middle-High School|High School|Elementary-Middle-High School|\w*[-]\w*\b)(?!.*\1)/g
|
|
21
|
+
// ) || []
|
|
22
|
+
// ).join('')
|
|
14
23
|
}
|
|
15
24
|
|
|
16
25
|
// TODO: Move to picker, not generic enough, specific to the pickers logic/ui
|