mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
Fix accordion
This commit is contained in:
parent
2e696f94fd
commit
539d89cf8e
@ -6,7 +6,8 @@ import { User } from '../../models/user';
|
||||
|
||||
interface MemberSelectProps {
|
||||
defaultUser?: User,
|
||||
onSelected?: (userId: number) => void
|
||||
onSelected?: (userId: number) => void,
|
||||
noHeader?: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
@ -18,7 +19,7 @@ type selectOption = { value: number, label: string };
|
||||
/**
|
||||
* This component renders the member select for manager.
|
||||
*/
|
||||
export const MemberSelect: React.FC<MemberSelectProps> = ({ defaultUser, onSelected }) => {
|
||||
export const MemberSelect: React.FC<MemberSelectProps> = ({ defaultUser, onSelected, noHeader }) => {
|
||||
const { t } = useTranslation('public');
|
||||
const [value, setValue] = useState<selectOption>();
|
||||
|
||||
@ -51,9 +52,11 @@ export const MemberSelect: React.FC<MemberSelectProps> = ({ defaultUser, onSelec
|
||||
|
||||
return (
|
||||
<div className="member-select">
|
||||
<div className="member-select-header">
|
||||
<h3 className="member-select-title">{t('app.public.member_select.select_a_member')}</h3>
|
||||
</div>
|
||||
{!noHeader &&
|
||||
<div className="member-select-header">
|
||||
<h3 className="member-select-title">{t('app.public.member_select.select_a_member')}</h3>
|
||||
</div>
|
||||
}
|
||||
<AsyncSelect placeholder={t('app.public.member_select.start_typing')}
|
||||
cacheOptions
|
||||
loadOptions={loadMembers}
|
||||
|
@ -70,10 +70,14 @@
|
||||
position: relative;
|
||||
padding-bottom: 1.6rem;
|
||||
&.collapsed {
|
||||
.content { max-height: 0; }
|
||||
header svg { transform: rotateZ(180deg); }
|
||||
.content {
|
||||
max-height: 0;
|
||||
overflow: hidden;
|
||||
* { opacity: 0; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
@ -93,10 +97,14 @@
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
transition: max-height 500ms ease-in-out;
|
||||
overflow: hidden;
|
||||
|
||||
.list {
|
||||
overflow: hidden auto;
|
||||
* { transition: opacity 250ms ease-in-out 300ms; }
|
||||
|
||||
.group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
opacity: 1;
|
||||
&.u-scrollbar { overflow: hidden auto; }
|
||||
|
||||
label {
|
||||
margin: 0 0.8rem 0 0;
|
||||
padding: 0.6rem;
|
||||
@ -114,7 +122,9 @@
|
||||
&.offset { margin-left: 1.6rem; }
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
opacity: 100;
|
||||
margin-top: 0.8rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
@ -36,8 +36,8 @@
|
||||
|
||||
.store-product {
|
||||
--status-color: var(--success);
|
||||
&.low { --status-color: var(--alert-light); }
|
||||
&.out-of-stock { --status-color: var(--alert); }
|
||||
&.low { --status-color: var(--alert-light); }
|
||||
&.out-of-stock { --status-color: var(--alert); }
|
||||
|
||||
padding-top: 4rem;
|
||||
gap: 0 3.2rem;
|
||||
|
@ -1993,7 +1993,21 @@ en:
|
||||
filter: "Filter"
|
||||
filter_clear: "Clear all"
|
||||
filter_apply: "Apply"
|
||||
filter_ref: "By reference"
|
||||
filter_status: "By status"
|
||||
filter_client: "By client"
|
||||
status:
|
||||
error: "Payment error"
|
||||
canceled: "Canceled"
|
||||
pending: "Pending payment"
|
||||
under_preparation: "Under preparation"
|
||||
paid: "Paid"
|
||||
ready: "Ready"
|
||||
collected: "Collected"
|
||||
refunded: "Refunded"
|
||||
sort:
|
||||
newest: "Newest first"
|
||||
oldest: "Oldest first"
|
||||
order_item:
|
||||
total: "Total"
|
||||
client: "Client"
|
||||
|
Loading…
x
Reference in New Issue
Block a user