fix ticket 11
All checks were successful
publish-main / release-image (push) Successful in 5m52s

This commit is contained in:
kuwsh1n 2024-04-26 13:20:01 +03:00
parent 2abe6ef765
commit 8f2ae99f76
3 changed files with 5 additions and 10 deletions

View File

@ -87,8 +87,6 @@ const AnswersForm = () => {
<div class="modal-dialog myModal__dialog" className={classes.myModal__dialog}> <div class="modal-dialog myModal__dialog" className={classes.myModal__dialog}>
<div class="modal-content" className={classes.myModal__dialog__content}> <div class="modal-content" className={classes.myModal__dialog__content}>
<div class="modal-body" className={classes.myModal__dialog__content__body}> <div class="modal-body" className={classes.myModal__dialog__content__body}>
{item.block.map((block, i) => {item.block.map((block, i) =>
<div className={classes.myModal__item} key={i}> <div className={classes.myModal__item} key={i}>
<div className={classes.myModal__item__question}> <div className={classes.myModal__item__question}>

View File

@ -14,6 +14,7 @@ const Forms = () => {
const {user, setUser} = useContext(UserData); const {user, setUser} = useContext(UserData);
const [stateLoading, setStateLoading] = useState(false); const [stateLoading, setStateLoading] = useState(false);
const [removeIdForm, setRemoveIdForm] = useState(false); const [removeIdForm, setRemoveIdForm] = useState(false);
const [searchForm, setSearchForm] = useState("");
const [cookies, _, __] = useCookies(["user"]); const [cookies, _, __] = useCookies(["user"]);
@ -89,11 +90,13 @@ const Forms = () => {
} }
}; };
const filterFormsBySearch = () => [...forms].filter(item => item.title.toLowerCase().includes(searchForm))
return ( return (
<div className={classes.main}> <div className={classes.main}>
<div className={classes.wrapper}> <div className={classes.wrapper}>
<div className={classes.panel}> <div className={classes.panel}>
{/* <MyInput placeholder={'Поиск...'}/> */} <MyInput placeholder={'Поиск...'} value={searchForm} change={setSearchForm}/>
<MyButton click={createForm} class={"main__green"} otherStyle={{width: '200px'}} text={ <MyButton click={createForm} class={"main__green"} otherStyle={{width: '200px'}} text={
stateLoading ? <div class="spinner-border text-light" role="status"> stateLoading ? <div class="spinner-border text-light" role="status">
<span class="visually-hidden">Загрузка...</span> <span class="visually-hidden">Загрузка...</span>
@ -107,7 +110,7 @@ const Forms = () => {
<div className={classes.listForms__columns__item}>Изменения</div> */} <div className={classes.listForms__columns__item}>Изменения</div> */}
</div> </div>
<div className={classes.listForms__forms}> <div className={classes.listForms__forms}>
{forms.map((item, i) => {filterFormsBySearch().map((item, i) =>
<div className={classes.listForms__forms__item} key={i}> <div className={classes.listForms__forms__item} key={i}>
<div className={classes.listForms__forms__item__title} onClick={() => editForm(item)}>{item.title}</div> <div className={classes.listForms__forms__item__title} onClick={() => editForm(item)}>{item.title}</div>
{/* <div className={classes.listForms__forms__item__answers}>{item.datetime}</div> {/* <div className={classes.listForms__forms__item__answers}>{item.datetime}</div>

View File

@ -225,12 +225,6 @@ const NewForm = () => {
<span>Название формы</span> <span>Название формы</span>
<input type="text" value={newTitleForm} onChange={event => setNewTitleForm(event.target.value)}/> <input type="text" value={newTitleForm} onChange={event => setNewTitleForm(event.target.value)}/>
</div> </div>
{/* <MyButton
text={<i class="fa-solid fa-floppy-disk"></i>}
click={() => updateTitleForm()}
class={"main__green"}
otherStyle={{paddingLeft: "0.9rem", paddingRight: "0.9rem"}}>
</MyButton> */}
</div> </div>
<div className={classes.header__listBtn}> <div className={classes.header__listBtn}>
<MyButton text={'Предпросмотр'} class={"main__white"} toggle={"modal"} target={"#previewModal"}/> <MyButton text={'Предпросмотр'} class={"main__white"} toggle={"modal"} target={"#previewModal"}/>