- updated zustand and react libraries;
- added 'put in draft' btn;
This commit is contained in:
@@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
|
||||
import translationStrings from '../../../../translationStringsForComponents';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../../../store';
|
||||
import { useStoreValue } from '../../../../store';
|
||||
|
||||
// api
|
||||
import ApplicationService from '../../../../service/application-service';
|
||||
@@ -27,8 +27,8 @@ import { Tag } from 'primereact/tag';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
|
||||
const AllDomandeBeneficiarioTableAsync = ({ statuses }) => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const companies = useStore().main.companies();
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const companies = useStoreValue('companies');
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
const [items, setItems] = useState(null);
|
||||
const [totalRecordsNum, setTotalRecordsNum] = useState(0);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { head, is, uniq } from 'ramda';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../../../store';
|
||||
import { useStoreValue } from '../../../../store';
|
||||
|
||||
// api
|
||||
import ApplicationService from '../../../../service/application-service';
|
||||
@@ -26,8 +26,8 @@ import translationStrings from '../../../../translationStringsForComponents';
|
||||
|
||||
|
||||
const BeneficiarioDomandeTable = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const companies = useStore().main.companies();
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const companies = useStoreValue('companies');
|
||||
const [items, setItems] = useState(null);
|
||||
const [filters, setFilters] = useState(null);
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
|
||||
@@ -3,14 +3,14 @@ import { __ } from '@wordpress/i18n';
|
||||
import { head } from 'ramda';
|
||||
|
||||
// store
|
||||
import { useStore } from '../../store';
|
||||
import { useStoreValue } from '../../store';
|
||||
|
||||
// components
|
||||
import AllDomandeBeneficiarioTableAsync from './components/AllDomandeBeneficiarioTableAsync';
|
||||
|
||||
const DomandeBeneficiario = () => {
|
||||
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||
const companies = useStore().main.companies();
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const companies = useStoreValue('companies');
|
||||
const company = head(companies.filter(o => o.id === chosenCompanyId));
|
||||
|
||||
return(
|
||||
|
||||
Reference in New Issue
Block a user