Skip to content

Instantly share code, notes, and snippets.

@8ui
8ui / params.js
Created December 11, 2021 14:50
Описание параметров
// Domains
{
"domains": {
"external": "https://google.com",
"internal": "google",
"domain": "mycloudshop.ru"
}
}
// Products
const Settings = types
.model('Settings', {
categories: types.array(
types.model('Categories', {
name: types.string,
favorite: types.boolean,
description: types.string,
})
),
products: types.model('Products', {
[
{
"id": "PosNumber",
"label": "нумерация позиций",
"shortLabel": "Поз.",
"allowTotal": false
},
{
"id": "Product",
"label": "название товара",
@8ui
8ui / Autocomplete
Created June 2, 2021 19:31
With highlight
/* eslint-disable no-use-before-define */
import React from 'react';
import TextField from '@material-ui/core/TextField';
import Autocomplete from '@material-ui/lab/Autocomplete';
import parse from 'autosuggest-highlight/parse';
import match from 'autosuggest-highlight/match';
export default function Highlights() {
return (
<Autocomplete
@8ui
8ui / index.js
Created May 31, 2021 11:37
TableSettings
import React from "react";
import Settings from "@material-ui/icons/Settings";
import IconButton from "@material-ui/core/IconButton";
import Menu from "@material-ui/core/Menu";
import ListItem from "@material-ui/core/ListItem";
import ListItemIcon from "@material-ui/core/ListItemIcon";
import ListItemText from "@material-ui/core/ListItemText";
import ListSubheader from "@material-ui/core/ListSubheader";
import Checkbox from "@material-ui/core/Checkbox";
import {observer} from "mobx-react-lite";
@8ui
8ui / material-theme.js
Last active May 25, 2021 10:10
material-theme.js
import blue from "@material-ui/core/colors/blue";
import grey from "@material-ui/core/colors/grey";
import lightGreen from "@material-ui/core/colors/lightGreen";
import { createMuiTheme } from "@material-ui/core/styles";
const background = {
dark: {
paper: '#282C34',
default: '#1c2025'
},
@8ui
8ui / winax.sbrf.js
Created March 2, 2021 07:17 — forked from norbornen/winax.sbrf.js
Пример использования в node.js сбербанковской библиотеки для работы с банковскими терминалами sbrf.dll
const winax = require('winax');
const sbrf = new winax.Object('SBRFSRV.Server');
let opResultCode;
const opPinpadCheckResultCode = sbrf.NFun(7003);
console.log(opPinpadCheckResultCode, opPinpadCheckResultCode === 0 ? 'пинпад есть' : 'пинпада нет');
sbrf.clear();
// контрольная лента
console.info('[контрольная лента]');
import React, { Component } from 'react';
import { Keyboard, TextInput } from 'react-native';
class Example extends Component {
state = {
keyboardOffset: 0,
};
componentDidMount() {
this.keyboardDidShowListener = Keyboard.addListener(
import React, { Component } from 'react';
import { Keyboard, TextInput } from 'react-native';
class Example extends Component {
state = {
keyboardOffset: 0,
};
componentDidMount() {
this.keyboardDidShowListener = Keyboard.addListener(
import React from 'react';
import { connect } from 'react-redux';
import Intercom from 'react-native-intercom';
import CodePush from 'react-native-code-push';
import {
AppState,
} from 'react-native';
import {
websocket,
user,