Skip to content

Instantly share code, notes, and snippets.

import {
EMAIL_TEMPLATE_REQUEST,
EMAIL_TEMPLATE_SUCCESS,
EMAIL_TEMPLATE_FAILURE,
EMAIL_TEMPLATE_FETCH_REQUEST,
EMAIL_TEMPLATE_FETCH_SUCCESS,
EMAIL_TEMPLATE_FETCH_FAILURE,
EMAIL_TEMPLATE_FETCH_REQUEST_BY_ID,
EMAIL_TEMPLATE_FETCH_SUCCESS_BY_ID
} from "./constants";
import React from "react";
import { createStructuredSelector } from "reselect";
import { connect } from "react-redux";
import { showDialog } from "containers/App/actions";
import { logRequest, logDelete, logsDelete } from "./actions";
import { selectDialog } from "containers/App/selectors";
import { selectLogs, selectAllLogState } from "./selectors";
import Spinner from "assets/img/earthSpinning.svg";
import LogsDetail from "./LogsDetail";
import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { getFeatures, listFeature } from "./actions";
import { showDialog } from "containers/App/actions";
import { selectDialog } from "containers/App/selectors";
import {
selectFeatures,
selectFeatureLoadingState,
import React from 'react';
const FeatureList = ({ feature, type }) => {
// type is the category of feature like media-technology, food-drinks etc
// feature is the list of features that falls under the specific type
return (
<ul>
<h1>media-technology</h1>
<li>
Computer
// here server response and error is fetched from selectors and is passed to toaster
const mapStateToProps = createStructuredSelector({
errorResponse: selectAgentApplicationError(),
successResponse: selectAgentApplicationResponse(),
});
if (successResponse && typeof successResponse === 'string') {
message = <Toaster message={successResponse} timeout={1000} success />;
import React from "react";
import { Editor, EditorState, RichUtils } from "draft-js";
const handleEditorChange = editorState => props.editorChange(editorState);
const toggleBlockType = blockType =>
handleEditorChange(
RichUtils.toggleBlockType(this.state.editorState, blockType)
);
const RulesInput = props => {
return (
<form className="form">
<InputField
label={`Rule ${props.num + 1}`}
type="text"
name={`${props.num}`}
value={props.value[props.num] || ""}
onChange={props.handleChange}
/>
import React from "react";
import InputField from "components/common/Forms/InputField";
import { Button } from "semantic-ui-react";
const RulesInput = props => {
return (
<form className="form">
<InputField
label={`Rule ${props.num + 1}`}
import React from 'react';
import InputField from 'components/common/Forms/InputField';
import { Button } from 'semantic-ui-react';
const RulesInput = props =>
<div>
<form className="form">
<InputField
type="text"
class Employee(models.Model):
office = models.ForeignKey(
OfficeSetup, blank=False, null=False, on_delete=models.CASCADE)
name = models.CharField(max_length=150, blank=False, null=False)
designation = models.ForeignKey(Designation, blank=False, null=False)
section = models.ForeignKey(DepartmentSetup, blank=True, null=True)
phone_number = models.CharField(max_length=150, blank=True, null=True)
mobile_number = models.CharField(max_length=150, blank=True, null=True)
email = models.EmailField(max_length=150, blank=True, null=True)
gender = models.CharField(