This commit is contained in:
Kiril Peyanski 2021-07-06 13:34:25 +03:00
Родитель 1711a9c5d1
Коммит 91305dc420
6 изменённых файлов: 49 добавлений и 18 удалений

Просмотреть файл

@ -4,4 +4,11 @@ body {
list-style-type: none;
}
html,
body {
&::-webkit-scrollbar {
display: none;
}
}
@import "./styles/main.scss";

Просмотреть файл

@ -17,20 +17,11 @@ const items = [
class DrawerRouterContainer extends React.Component {
state = {
expanded: true,
expanded: false,
selectedId: items.findIndex(x => x.selected === true),
isSmallerScreen: window.innerWidth < 768
}
componentDidMount() {
window.addEventListener('resize', this.resizeWindow)
this.resizeWindow()
}
componentWillUnmount() {
window.removeEventListener('resize', this.resizeWindow)
}
resizeWindow = () => {
this.setState({ isSmallerScreen: window.innerWidth < 768 })
}
@ -39,7 +30,6 @@ class DrawerRouterContainer extends React.Component {
this.setState((e) => ({expanded: !e.expanded}));
}
handleSelect = (e) => {
this.setState({selectedId: e.itemIndex, expanded: false});
this.props.history.push(e.itemTarget.props.route);
@ -51,6 +41,27 @@ class DrawerRouterContainer extends React.Component {
return currentPath.name;
}
}
componentDidUpdate() {
try {
const parent = window.parent;
if(parent) {
parent.postMessage({ url: this.props.location.pathname, demo: true }, "*")
}
} catch(err) {
console.warn('Cannot access iframe')
}
}
componentDidMount() {
window.addEventListener('resize', this.resizeWindow, false)
this.resizeWindow();
}
componentWillUnmount() {
window.removeEventListener('resize', this.resizeWindow)
}
render() {
let selected = this.getSelectedItem(this.props.location.pathname);
const localizationService = provideLocalizationService(this);
@ -77,7 +88,7 @@ class DrawerRouterContainer extends React.Component {
onOverlayClick={this.handleClick}
onSelect={this.handleSelect}
>
<DrawerContent>
<DrawerContent style={{height: 1066}}>
{this.props.children}
</DrawerContent>
</Drawer>

Просмотреть файл

@ -14,7 +14,7 @@ import headerBg from '../assets/header-bg.png';
import userAvatar from '../assets/user-avatar.jpg';
export const Header = (props) => {
const { onButtonClick, page } = props;
const { onButtonClick } = props;
const { avatar, localeId, onLanguageChange } = React.useContext(AppContext);
const localizationService = useLocalization();
@ -42,13 +42,11 @@ export const Header = (props) => {
<header className="header" style={{ backgroundImage: `url(${headerBg})` }}>
<div className="nav-container">
<div className="menu-button">
<span className={'k-icon hamburger-icon'} onClick={onButtonClick}/>
<span className={'k-icon k-i-menu'} onClick={onButtonClick}/>
</div>
<div className="title">
<h1>{localizationService.toLanguageString('custom.warehouse')}</h1>
<span className="vl"></span>
<h2>{page}</h2>
</div>
<div className="settings">
<span>{localizationService.toLanguageString('custom.language')}</span>

Просмотреть файл

@ -47,7 +47,6 @@ const Planning = () => {
...filterState,
[employeeId]: !filterState[employeeId]
});
console.log(employeeId, filterState)
},
[filterState, setFilterState]
);
@ -71,7 +70,7 @@ const Planning = () => {
borderWidth: 2,
borderColor: teams.find(({teamID}) => teamID === employee.teamId).teamColor,
}}>
<div class="k-avatar-image" style={{
<div className="k-avatar-image" style={{
backgroundImage: images[employee.imgId + employee.gender],
backgroundSize: 'cover',
backgroundPosition: 'center center',

Просмотреть файл

@ -17436,6 +17436,7 @@ export const orders = [{
shippedDate: new Date(order.shippedDate),
requiredDateStart: new Date(order.requiredDateStart),
requiredDateEnd: new Date(order.requiredDateEnd),
isAllDay: false
}));
export const ordersModelFields = {

Просмотреть файл

@ -221,6 +221,15 @@ a {
.k-grid-toolbar .k-textbox {
margin-bottom: 10px;
}
.k-grid .k-virtual-content,
.k-grid .k-virtual-content > div {
-ms-overflow-style: none; /* IE and Edge */
scrollbar-width: none; /* Firefox */
&::-webkit-scrollbar {
display: none;
}
}
.k-badge {
z-index: 1
@ -515,6 +524,12 @@ a {
}
}
}
@media (max-width: 480px) {
.k-form-horizontal .k-form-field-wrap {
max-width: 100%;
}
}
@media (min-width: 768px) {
.info-page {