Skip to content

Commit febc666

Browse files
committed
Add accreditation claiming guide link and update UI for accreditation help
1 parent 923b89f commit febc666

2 files changed

Lines changed: 117 additions & 55 deletions

File tree

devconnect/src/pages/api/notion/[...id].ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ async function handleGet(req: NextApiRequest, res: NextApiResponse, pageId: stri
517517
},
518518
descriptionLinks: {
519519
'attached insurance guide': process.env.ACCREDITATION_INSURANCE_GUIDE || '',
520+
'accreditation claiming guide': process.env.ACCREDITATION_CLAIMING_GUIDE || '',
520521
'Devconnect ARG Terms & Conditions': 'https://drive.google.com/file/d/1QHOHnvlZ-KvY8lE97bcmF176fgdyCjmt/view',
521522
'Devconnect ARG Code of Conduct': 'https://drive.google.com/file/d/1OgE4JTQwB0vkCHYpsmxZeHvkzQ5bjiSN/view',
522523
}

devconnect/src/pages/form/[name]/[id].tsx

Lines changed: 116 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,61 +1861,122 @@ export default function UpdatePage({ params }: { params?: { name: string; id: st
18611861
)}
18621862

18631863
{/* Accreditation Guide Link - Only show for accreditation pages with successful data load */}
1864-
{pageName === 'accreditation' && descriptionLinks['attached insurance guide'] && fields.length > 0 && (
1865-
<div
1866-
style={{
1867-
marginTop: '3rem',
1868-
padding: '2rem',
1869-
backgroundColor: '#f8f9fa',
1870-
borderRadius: '8px',
1871-
border: '1px solid #e9ecef',
1872-
textAlign: 'center',
1873-
}}
1874-
>
1875-
<h3
1876-
style={{
1877-
margin: '0 0 1rem 0',
1878-
fontSize: '1.2rem',
1879-
fontWeight: '600',
1880-
color: '#333',
1881-
}}
1882-
>
1883-
Need Help with Insurance?
1884-
</h3>
1885-
<p
1886-
style={{
1887-
margin: '0 0 1.5rem 0',
1888-
color: '#666',
1889-
fontSize: '1rem',
1890-
}}
1891-
>
1892-
Check out our accreditation insurance guide for detailed instructions and support.
1893-
</p>
1894-
<a
1895-
href={descriptionLinks['attached insurance guide']}
1896-
target="_blank"
1897-
rel="noopener noreferrer"
1898-
style={{
1899-
display: 'inline-block',
1900-
padding: '0.75rem 1.5rem',
1901-
backgroundColor: '#28a745',
1902-
color: 'white',
1903-
textDecoration: 'none',
1904-
borderRadius: '6px',
1905-
fontSize: '1rem',
1906-
fontWeight: '500',
1907-
transition: 'background-color 0.2s ease',
1908-
}}
1909-
onMouseEnter={e => {
1910-
e.currentTarget.style.backgroundColor = '#218838'
1911-
}}
1912-
onMouseLeave={e => {
1913-
e.currentTarget.style.backgroundColor = '#28a745'
1914-
}}
1915-
>
1916-
🛡️ View Insurance Guide
1917-
</a>
1918-
</div>
1864+
{pageName === 'accreditation' && fields.length > 0 && (
1865+
<>
1866+
{isLocked && descriptionLinks['accreditation claiming guide'] ? (
1867+
<div
1868+
style={{
1869+
marginTop: '3rem',
1870+
padding: '2rem',
1871+
backgroundColor: '#f8f9fa',
1872+
borderRadius: '8px',
1873+
border: '1px solid #e9ecef',
1874+
textAlign: 'center',
1875+
}}
1876+
>
1877+
<h3
1878+
style={{
1879+
margin: '0 0 1rem 0',
1880+
fontSize: '1.2rem',
1881+
fontWeight: '600',
1882+
color: '#333',
1883+
}}
1884+
>
1885+
Need Help Claiming Your Accreditation?
1886+
</h3>
1887+
<p
1888+
style={{
1889+
margin: '0 0 1.5rem 0',
1890+
color: '#666',
1891+
fontSize: '1rem',
1892+
}}
1893+
>
1894+
Check out our accreditation claiming guide for detailed instructions on how to claim your accreditation.
1895+
</p>
1896+
<a
1897+
href={descriptionLinks['accreditation claiming guide']}
1898+
target="_blank"
1899+
rel="noopener noreferrer"
1900+
style={{
1901+
display: 'inline-block',
1902+
padding: '0.75rem 1.5rem',
1903+
backgroundColor: '#28a745',
1904+
color: 'white',
1905+
textDecoration: 'none',
1906+
borderRadius: '6px',
1907+
fontSize: '1rem',
1908+
fontWeight: '500',
1909+
transition: 'background-color 0.2s ease',
1910+
}}
1911+
onMouseEnter={e => {
1912+
e.currentTarget.style.backgroundColor = '#218838'
1913+
}}
1914+
onMouseLeave={e => {
1915+
e.currentTarget.style.backgroundColor = '#28a745'
1916+
}}
1917+
>
1918+
☑️ View Claiming Guide
1919+
</a>
1920+
</div>
1921+
) : (
1922+
descriptionLinks['attached insurance guide'] && (
1923+
<div
1924+
style={{
1925+
marginTop: '3rem',
1926+
padding: '2rem',
1927+
backgroundColor: '#f8f9fa',
1928+
borderRadius: '8px',
1929+
border: '1px solid #e9ecef',
1930+
textAlign: 'center',
1931+
}}
1932+
>
1933+
<h3
1934+
style={{
1935+
margin: '0 0 1rem 0',
1936+
fontSize: '1.2rem',
1937+
fontWeight: '600',
1938+
color: '#333',
1939+
}}
1940+
>
1941+
Need Help with Insurance?
1942+
</h3>
1943+
<p
1944+
style={{
1945+
margin: '0 0 1.5rem 0',
1946+
color: '#666',
1947+
fontSize: '1rem',
1948+
}}
1949+
>
1950+
Check out our accreditation insurance guide for detailed instructions and support.
1951+
</p>
1952+
<a
1953+
href={descriptionLinks['attached insurance guide']}
1954+
target="_blank"
1955+
rel="noopener noreferrer"
1956+
style={{
1957+
display: 'inline-block',
1958+
padding: '0.75rem 1.5rem',
1959+
backgroundColor: '#28a745',
1960+
color: 'white',
1961+
textDecoration: 'none',
1962+
borderRadius: '6px',
1963+
fontSize: '1rem',
1964+
fontWeight: '500',
1965+
transition: 'background-color 0.2s ease',
1966+
}}
1967+
onMouseEnter={e => {
1968+
e.currentTarget.style.backgroundColor = '#218838'
1969+
}}
1970+
onMouseLeave={e => {
1971+
e.currentTarget.style.backgroundColor = '#28a745'
1972+
}}
1973+
>
1974+
🛡️ View Insurance Guide
1975+
</a>
1976+
</div>
1977+
)
1978+
)}
1979+
</>
19191980
)}
19201981

19211982
{/* Help Links - Only show for org pages with successful data load */}

0 commit comments

Comments
 (0)