Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
import React, { useState } from 'react';
//import React from 'react';
import { Alert, Checkbox, Col, Drawer, Row, Space } from 'antd';
import './index.less';
import KHierarchyStore from '../../../stores/kHierarchyStore';
export interface Props {
onClose: () => void;
onSwitchChange: (node) => void;
visible: boolean;
node: any;
alertTyp: any;
kHierarchyStore: KHierarchyStore;
}
export function HierarchyDrawer(props: Props) {
console.log('props.node.canTerminate =>',props.node.canTerminate)
// active: true
// canTerminate: true
// id: 1
// mail: true
// mailStatusChange: true
// positionId: 1
// pushNotificationPhone: true
// pushNotificationPhoneStatusChange: true
// pushNotificationWeb: true
// pushNotificationWebStatusChange: true
const [defaultVisiblePushNotificationPhoneStatusChange, setDefaultVisiblePushNotificationPhoneStatusChange] = useState(props.node.pushNotificationPhoneStatusChange);
const [defaultVisiblePushNotificationWebStatusChange, setDefaultVisiblePushNotificationWebStatusChange] = useState(props.node.pushNotificationWebStatusChange);
const [defaultVisiblePushNotificationPhone, setDefaultVisiblePushNotificationPhone] = useState(props.node.pushNotificationPhone);
const [defaultVisiblePushNotificationWeb, setDefaultVisiblePushNotificationWeb] = useState(props.node.pushNotificationWeb);
const [defaultVisibleCanTerminate, setDefaultVisibleCanTerminate] = useState(props.node.canTerminate);
const [defaultVisibleMailStatusChange, setDefaultVisibleMailStatusChange] = useState(props.node.mailStatusChange);
const [defaultVisibleMail, setDefaultVisibleMail] = useState(props.node.mail);
return (
<>
<Drawer
title={`Norm Bildirim Paneli`}
placement="right"
width={600}
onClose={props.onClose}
visible={props.visible}
>
<Row gutter={16} justify="start" align="middle">
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message=" Mail Bildirimi"
description="Yeni Bir Norm Talebi Geldiğinde, Kullanıcıya Mail Olarak Bildirim Gider"
type={defaultVisibleMail ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.mail}
disabled={false}
// onChange={(x) => props.onSwitchChange({ id: props.node.id, status: x.target.checked, type: 'Mail' })}
onChange={(e) => {
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'Mail' })
setDefaultVisibleMail(!defaultVisibleMail)}}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
</Row>
<Row gutter={16} justify="start" align="middle">
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message="Mail Bildirimi - Durum Değişikliği"
description="Var Olan Norm Üzerinde Bir Değişiklik Olduğunda, Kullanıcıya Bildirim Maili Gider"
type={defaultVisibleMailStatusChange ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.mailStatusChange}
disabled={false}
// onChange={(x) =>
// props.onSwitchChange({
// id: props.node.id,
// status: x.target.checked,
// type: 'MailStatusChange',
// })
// }
onChange={(e) =>{
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'MailStatusChange' })
setDefaultVisibleMailStatusChange(!defaultVisibleMailStatusChange)}}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
</Row>
<Row gutter={16} justify="start" align="middle">
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message="Cep Telefonu Bildirimi"
description="Yeni Bir Norm Talebi Geldiğinde, Kullanıcının Cep Telefonuna Bildirim Gider"
type={defaultVisiblePushNotificationPhone ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.pushNotificationPhone}
disabled={false}
// onChange={(x) =>
// props.onSwitchChange({
// id: props.node.id,
// status: x.target.checked,
// type: 'PushNotificationPhone',
// })
// }
onChange={(e) => {
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'PushNotificationPhone' })
setDefaultVisiblePushNotificationPhone(!defaultVisiblePushNotificationPhone)}}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message="Cep Telefonu Bildirimi - Durum Değişikliği"
description="Var Olan Norm Üzerinde Bir Değişiklik Olduğunda, Kullanıcının Cep Telefonuna Bildirim Gider"
type={defaultVisiblePushNotificationPhoneStatusChange ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.pushNotificationPhoneStatusChange}
disabled={false}
// onChange={(x) =>
// props.onSwitchChange({
// id: props.node.id,
// status: x.target.checked,
// type: 'PushNotificationPhoneStatusChange',
// })
// }
onChange={(e) => {
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'PushNotificationPhoneStatusChange' })
setDefaultVisiblePushNotificationPhoneStatusChange(!defaultVisiblePushNotificationPhoneStatusChange)}
}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
</Row>
<Row gutter={16} justify="start" align="middle">
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message="Browser Bildirimi"
description="Yeni Bir Norm Talebi Geldiğinde, Kullanıcıya Browser Üzerinden Bildirim Gider"
type={defaultVisiblePushNotificationWeb ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.pushNotificationWeb}
disabled={false}
// onChange={(x) =>
// props.onSwitchChange({
// id: props.node.id,
// status: x.target.checked,
// type: 'PushNotificationWeb',
// })
// }
onChange={(e) => {
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'PushNotificationWeb' })
setDefaultVisiblePushNotificationWeb(!defaultVisiblePushNotificationWeb)}
}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message="Browser Bildirimi - Durum Değişikliği"
description="Var Olan Norm Üzerinde Bir Değişiklik Olduğunda, Kullanıcıya Browser Üzerinden Bildirim Gider"
type={defaultVisiblePushNotificationWebStatusChange ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.pushNotificationWebStatusChange}
disabled={false}
// onChange={(x) =>
// props.onSwitchChange({
// id: props.node.id,
// status: x.target.checked,
// type: 'PushNotificationWebStatusChange',
// })
// }
onChange={(e) => {
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'PushNotificationWebStatusChange' })
setDefaultVisiblePushNotificationWebStatusChange(!defaultVisiblePushNotificationWebStatusChange)}
}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
</Row>
<Row gutter={16} justify="start" align="middle">
<Col
xs={{ offset: 0, span: 24 }}
sm={{ offset: 0, span: 24 }}
md={{ offset: 0, span: 24 }}
lg={{ offset: 0, span: 24 }}
xl={{ offset: 0, span: 24 }}
xxl={{ offset: 0, span: 24 }}
>
<p style={{ marginBottom: '10px' }}>
<Alert
message="Sonlandır"
description="Yeni Bir Norm Talebi Geldiğinde veya Var Olan Norm Üzerinde Bir Değişiklik Olduğunda Onay Akışını Sonlardırma"
type={defaultVisibleCanTerminate ? 'info' : 'error'}
closable={false}
action={
<Space direction="vertical">
<Checkbox
defaultChecked={props.node.canTerminate}
disabled={false}
onChange={(e) => {
props.onSwitchChange({ id: props.node.id, status: e.target.checked, type: 'CanTerminate' })
setDefaultVisibleCanTerminate(!defaultVisibleCanTerminate)}
}
>
Bildirim
</Checkbox>
</Space>
}
/>
</p>
</Col>
</Row>
</Drawer>
</>
);
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team