Skip to content

Commit

Permalink
Merge pull request #844 from culturecreates/bugfix/issue-836
Browse files Browse the repository at this point in the history
Bugfix/issue 836
  • Loading branch information
AbhishekPAnil authored Dec 5, 2023
2 parents 7df1567 + 61eeb84 commit fa890e0
Show file tree
Hide file tree
Showing 9 changed files with 84 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,15 @@ function QuickCreateOrganization(props) {
placeholder={t(
'dashboard.events.addEditEvent.quickCreate.quickCreateOrganization.namePlaceholder',
)}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '100%' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '100%',
}}
size="large"
data-cy="input-quick-create-organization-name-french"
/>
Expand Down Expand Up @@ -376,7 +384,15 @@ function QuickCreateOrganization(props) {
placeholder={t(
'dashboard.events.addEditEvent.quickCreate.quickCreateOrganization.namePlaceholder',
)}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '100%' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '100%',
}}
size="large"
data-cy="input-quick-create-organization-name-english"
/>
Expand Down
20 changes: 18 additions & 2 deletions src/components/Modal/QuickCreatePerson/QuickCreatePerson.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,15 @@ function QuickCreatePerson(props) {
autoSize
autoComplete="off"
placeholder={t('dashboard.events.addEditEvent.quickCreate.quickCreatePerson.namePlaceholder')}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '100%' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '100%',
}}
size="large"
data-cy="input-quick-create-person-name-french"
/>
Expand Down Expand Up @@ -338,7 +346,15 @@ function QuickCreatePerson(props) {
autoSize
autoComplete="off"
placeholder={t('dashboard.events.addEditEvent.quickCreate.quickCreatePerson.namePlaceholder')}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '100%' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '100%',
}}
size="large"
data-cy="input-quick-create-person-name-english"
/>
Expand Down
20 changes: 18 additions & 2 deletions src/components/Modal/QuickCreatePlace/QuickCreatePlace.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,15 @@ function QuickCreatePlace(props) {
autoSize
autoComplete="off"
placeholder={t('dashboard.events.addEditEvent.location.quickCreatePlace.namePlaceholder')}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '100%' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '100%',
}}
size="large"
data-cy="text-area-quick-create-place-name-french"
/>
Expand Down Expand Up @@ -409,7 +417,15 @@ function QuickCreatePlace(props) {
autoSize
autoComplete="off"
placeholder={t('dashboard.events.addEditEvent.location.quickCreatePlace.namePlaceholder')}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '100%' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '100%',
}}
size="large"
data-cy="text-area-quick-create-place-name-english"
/>
Expand Down
12 changes: 10 additions & 2 deletions src/components/Search/Events/EventsSearch.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import React from 'react';
import React, { useEffect, useRef } from 'react';
import './eventsSearch.css';
import { Input } from 'antd';
import { SearchOutlined } from '@ant-design/icons';

function EventsSearch(props) {
function EventsSearch({ autoFocus, ...props }) {
const inputRef = useRef();
useEffect(() => {
if (autoFocus) {
inputRef.current.focus();
}
}, []);

return (
<Input
{...props}
ref={inputRef}
className="events-search"
bordered={true}
prefix={<SearchOutlined className="events-search-icon" style={{ color: props?.defaultValue && '#1B3DE6' }} />}
Expand Down
8 changes: 7 additions & 1 deletion src/constants/formFields.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,13 @@ export const formFieldValue = [
interfaceLanguage: user?.interfaceLanguage?.toLowerCase(),
calendarContentLanguage: calendarContentLanguage,
})}
style={{ borderRadius: '4px', border: '4px solid #E8E8E8', width: '423px' }}
style={{
borderRadius: '4px',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL ? '4px solid #E8E8E8' : '1px solid #b6c1c9'
}`,
width: '423px',
}}
size="large"
data-cy={`input-text-area-${mappedField}`}
/>
Expand Down
12 changes: 10 additions & 2 deletions src/pages/Dashboard/AddEvent/AddEvent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3592,7 +3592,11 @@ function AddEvent() {
placeholder={t('dashboard.events.addEditEvent.tickets.placeHolderNotes')}
style={{
borderRadius: '4px',
border: '4px solid #E8E8E8',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '423px',
resize: 'vertical',
}}
Expand Down Expand Up @@ -3636,7 +3640,11 @@ function AddEvent() {
placeholder={t('dashboard.events.addEditEvent.tickets.placeHolderNotes')}
style={{
borderRadius: '4px',
border: '4px solid #E8E8E8',
border: `${
calendarContentLanguage === contentLanguage.BILINGUAL
? '4px solid #E8E8E8'
: '1px solid #b6c1c9'
}`,
width: '423px',
resize: 'vertical',
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ function SearchOrganizations() {
setQuickCreateKeyword(e.target.value);
setIsPopoverOpen(true);
}}
autoFocus={true}
onChange={(e) => {
setQuickCreateKeyword(e.target.value);
debounceSearch(e.target.value);
Expand Down
1 change: 1 addition & 0 deletions src/pages/Dashboard/SearchPerson/SearchPerson.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ function SearchPerson() {
setQuickCreateKeyword(e.target.value);
setIsPopoverOpen(true);
}}
autoFocus={true}
onChange={(e) => {
setQuickCreateKeyword(e.target.value);
debounceSearch(e.target.value);
Expand Down
1 change: 1 addition & 0 deletions src/pages/Dashboard/SearchPlaces/SearchPlaces.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ function SearchPlaces() {
data-cy="input-place-search"
style={{ borderRadius: '4px' }}
placeholder="Search places"
autoFocus={true}
onClick={(e) => {
setQuickCreateKeyword(e.target.value);
setIsPopoverOpen(true);
Expand Down

0 comments on commit fa890e0

Please sign in to comment.