text stringlengths 7 3.69M |
|---|
//导入配置选项
pz = require("./myconfig.js");
//导入第三方模块
const http = require('http');
const socket_io = require('socket.io');
//导入自己写的模块
const app = require("./app.js");
const db = require("./db.js");
const server = http.createServer(app);
const io = socket_io.listen(server);
//用于保存所有的用户账户和对应的socket
var sockets = {};
//即时通信
io.on('connect', (socket)=>{
//用户登录的时候,将该用户的zhanghu和它对应的socket存起来
socket.on('user', (data)=>{
//判断给用户是否已经登录,若登录,则告诉原来的用户账户在别处登录了
if (sockets[data]){
sockets[data].emit('online');
}
sockets[data] = socket;
});
//用户退出登录的时候,将该用户的账户和对应的socket删除
socket.on('logout', (data)=>{
delete sockets[data];
});
//该用户给别的用户发消息的时候触发
socket.on('message', (data)=>{
//将消息存到数据库中
db.updatedb(db.creatInsertSql('message', data))
.then(result=>{
if (result.affectedRows === 1){
data.id = result.insertId;
if (sockets[data.resever])
sockets[data.resever].emit('message', data);
}
})
.catch(error=>{});
});
});
//监听窗口
server.listen(pz.port, pz.dizi, ()=>{
console.log("runing...");
}); |
// Copyright: All contributers to the Umple Project
// This file is made available subject to the open source license found at:
// http://umple.org/license
//
// Actions in the VML online tool
// TODO needs maintenance
Action = new Object();
Action.waiting_time = 1200;
Action.oldTimeout = null;
Action.newAssociation = null;
Action.clicked = function(event)
{
Page.clickCount += 1;
event = Dom.getEvent(event);
var obj = Dom.getObject(event);
var action = obj.id.substring(6);
if (action == "PhpCode")
{
Action.generateCode("php","Php");
}
else if (action == "JavaCode")
{
Action.generateCode("java","Java");
}
else if (action == "AlloyCode")
{
Action.generateCode("alloy","Alloy");
}
else if (action == "NuSMVCode")
{
Action.generateCode("nusmv","NuSMV");
}
else if (action == "RubyCode")
{
Action.generateCode("ruby","Ruby");
}
else if (action == "EcoreCode")
{
Action.generateCode("xml","Ecore");
}
else if (action == "TextUmlCode")
{
Action.generateCode("java","TextUml");
}
else if (action == "ScxmlCode")
{
Action.generateCode("java","Scxml");
}
else if (action == "PapyrusCode")
{
Action.generateCode("xml","Papyrus");
}
else if (action == "YumlCode")
{
Action.generateCode("java","Yuml");
}
else if (action == "JsonCode")
{
Action.generateCode("java","Json");
}
else if (action == "GenericCode")
{
Action.generateCode("java","Generic");
}
}
Action.saveNewFile = function()
{
var vmlCode = Page.getVmlCode();
var filename = Page.getFilename();
if (filename == "")
{
Ajax.sendRequest("scripts/compiler_vml.php",Action.saveNewFileCallback,format("save=1&&vmlCode={0}",vmlCode));
}
}
Action.saveNewFileCallback = function(response)
{
Page.setFilename(response.responseText);
}
Action.generateCode = function(languageStyle,languageName)
{
Action.ajax(function(response) {Action.generateCodeCallback(response,languageStyle);},format("language={0}",languageName));
}
Action.generateCodeCallback = function(response,language)
{
Page.showGeneratedCode(response.responseText,language);
}
Action.loadExample = function loadExample()
{
Ajax.sendRequest("scripts/compiler_vml.php",Action.loadExampleCallback,"exampleCode=" + Page.getSelectedExample());
}
Action.loadExampleCallback = function(response)
{
Page.setVmlCode(response.responseText);
}
Action.ajax = function(callback,post)
{
var vmlCode = escape(Page.getVmlCode());
var filename = Page.getFilename();
Ajax.sendRequest("scripts/compiler_vml.php",callback,format("{0}&vmlCode={1}&filename={2}",post,vmlCode,filename));
}
|
export default class Player {
constructor(nickname, x, y) {
this.nickname = nickname;
this.x = x;
this.y = y;
}
moveRight() {
this.x += 1;
}
moveLeft() {
this.x -= 1;
}
moveUp() {
this.y -= 1;
}
moveDown() {
this.y += 1;
}
}
|
import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
import DashboardLayout from '../Project';
import Dashboard from '../Project/Project';
import AddReport from '../AddNewReport';
const dashboardRoutes = [
{
path: '/dashboard',
layout: DashboardLayout,
component: Dashboard,
},
{
path: '/add-report',
layout: DashboardLayout,
component: AddReport,
},
];
const DashboardRoutes = () => {
return (
<Switch>
{dashboardRoutes.map((route, i) => (
<Route
key={i}
exact
path={route.path}
render={props => (
<route.layout>
<route.component {...props} />
</route.layout>
)}
/>
))}
<Redirect to="/dashboard" />
</Switch>
);
};
export default DashboardRoutes;
|
import React from 'react';
import { BrowserRouter, Switch, Route, Redirect } from 'react-router-dom';
import Home from './containers/Home/Home'
import Register from "./containers/Auth/Register";
import Login from "./containers/Auth/Login";
import AuthContextProvider from "./contexts/AuthContext";
import Company from "./components/Company/Company";
import AddItems from './components/Hero/Admin/AddItems/AddItems';
import ItemList from './components/Hero/Admin/ItemList/ItemList';
import EditItems from './components/Hero/Admin/EditItem/EditItems';
import View from './components/Hero/View/View';
import PaymentForm from "./containers/Card/Card";
import ContextItemProvider from "./contexts/ContextItem";
import Checkout from './OrderForm/CheckOut';
import Favorite from './components/Favorite/Favorite';
import ItemDetail from './components/Hero/Admin/ItemDetail/itemDetail';
import CartContextProvider from './contexts/CardContex';
import LocalItemProvider from './contexts/LocalContext';
import Cart from './components/Cart/Cart';
import UserList from './components/Hero/Admin/ItemList/UserList';
import CommentsContextProvider from './contexts/CommentsContext';
const Routes = () => {
return (
<ContextItemProvider>
<AuthContextProvider>
<CartContextProvider>
<LocalItemProvider>
<CommentsContextProvider>
<BrowserRouter>
<Switch>
<Route exact path="/">
<Redirect to="/home" />
</Route>
<Route path="/home" component={Home} />
<Route path="/company" component={Company} />
<Route path="/register" component={Register} exact />
<Route path="/login" component={Login} exact />
<Route exact path='/add' component={AddItems} />
<Route exact path='/list' component={ItemList} />
<Route exact path='/edit/:id' component={EditItems} />
<Route exact path='/view' component={View} />
<Route exact path='/payment' component={PaymentForm} />
<Route exact path='/order' component={Checkout} />
<Route exact path='/favourite' component={Favorite} />
<Route exact path='/detail/:id' component={ItemDetail} />
<Route exact path='/cart' component={Cart} />
<Route exact path='/userlist' component={UserList} />
</Switch>
</BrowserRouter>
</CommentsContextProvider>
</LocalItemProvider>
</CartContextProvider>
</AuthContextProvider>
</ContextItemProvider>
);
};
export default Routes;
|
jQuery(function($) {
var elems = $('.twitter_default_checkbox', $('.WF_twitter_widget_config')),
fields = function() {
elems = $('.twitter_default_checkbox', $('.WF_twitter_widget_config'));
elems.off().on('change', function() {
fields();
});
$(document).on('widget-updated', function() {
fields();
});
$(document).on('widget-added', function() {
fields();
});
elems.each(function() {
if(this.checked) {
$(this).parents('td:eq(0)').find('input:eq(0)').hide();
} else {
$(this).parents('td:eq(0)').find('input:eq(0)').show();
}
});
};
fields();
}); |
/**
* Created by Administrator on 2015.12.08..
*/
hospitalNet.config(function(entityDefinitions){
entityDefinitions.raktariTargy = {
table: 'targyak',
entity: 'targy',
dataFields: {
tipus: {
desc: 'Típus',
type: 'select',
options: {
staticData: [
{id: 'gyogyszer', label: 'Gyógyszer'},
{id: 'kotszer', label: 'Kötszer'}
]
},
reqired: true
},
nev: {
desc: 'Név',
type: 'text',
reqired: true
}
}
};
}); |
import { TRACEID_GPU_TIMINGS } from "../../core/constants.js";
import { Debug } from "../../core/debug.js";
import { Tracing } from "../../core/tracing.js";
/**
* Base class of a simple GPU profiler.
*/
class GpuProfiler {
/**
* Profiling slots allocated for the current frame, storing the names of the slots.
*
* @type {string[]}
* @ignore
*/
frameAllocations = [];
/**
* Map of past frame allocations, indexed by renderVersion
*
* @type {Map<number, string[]>}
* @ignore
*/
pastFrameAllocations = new Map();
/**
* The if enabled in the current frame.
* @ignore
*/
_enabled = false;
/**
* The enable request for the next frame.
* @ignore
*/
_enableRequest = false;
/**
* The time it took to render the last frame on GPU, or 0 if the profiler is not enabled
* @ignore
*/
_frameTime = 0;
loseContext() {
this.pastFrameAllocations.clear();
}
/**
* True to enable the profiler.
*
* @type {boolean}
*/
set enabled(value) {
this._enableRequest = value;
}
get enabled() {
return this._enableRequest;
}
processEnableRequest() {
if (this._enableRequest !== this._enabled) {
this._enabled = this._enableRequest;
if (!this._enabled) {
this._frameTime = 0;
}
}
}
request(renderVersion) {
this.pastFrameAllocations.set(renderVersion, this.frameAllocations);
this.frameAllocations = [];
}
report(renderVersion, timings) {
if (timings) {
const allocations = this.pastFrameAllocations.get(renderVersion);
Debug.assert(allocations.length === timings.length);
// store frame duration
if (timings.length > 0) {
this._frameTime = timings[0];
}
// log out timings
if (Tracing.get(TRACEID_GPU_TIMINGS)) {
for (let i = 0; i < allocations.length; ++i) {
const name = allocations[i];
Debug.trace(TRACEID_GPU_TIMINGS, `${timings[i].toFixed(2)} ms ${name}`);
}
}
}
// remove frame info
this.pastFrameAllocations.delete(renderVersion);
}
/**
* Allocate a slot for GPU timing during the frame. This slot is valid only for the current
* frame. This allows multiple timers to be used during the frame, each with a unique name.
* @param {string} name - The name of the slot.
* @returns {number} The assigned slot index.
* @ignore
*/
getSlot(name) {
const slot = this.frameAllocations.length;
this.frameAllocations.push(name);
return slot;
}
/**
* Number of slots allocated during the frame.
*
* @ignore
*/
get slotCount() {
return this.frameAllocations.length;
}
}
export { GpuProfiler };
|
import "./styles/about.scss";
export default function About() {
return (
<div className="about" id="about">
<head>
<meta charset="utf-8"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
<title>About Me</title>
<link href="https://fonts.googleapis.com/css?family=Reem+Kufi|Roboto:300" rel="stylesheet"></link>
</head>
<div className="columns">
<div className="left"></div>
<div className="middle">
<body>
<div className="title">
<span>About Me</span>
</div>
<div className="info">
Hi, I'm Brian, a sophomore at Rice University studying computer science and mathematics.
This semester, I'm taking Intro to Program Design, Tools and Models for Data Science, Honors Linear Algebra, and Intro to Linguistics.
I'm involved with undergraduate research, assisting
<span> <a href="https://profiles.rice.edu/faculty/meng-li" target="_blank" rel="noopener noreferrer" style={{color: "#21b6ae", textDecoration: "none" }}>Dr. Meng Li</a> </span>
on a project where we survey all the latest methods for symbolic regression and develop new alternatives that are more appropriate for modern applications. I'm also a TA for COMP 140, Intro to Computational Thinking.
My professional interests are software development and data science.
I spent the past summer implementing a calendar integration feature for the Rice Public Art App.
In my free time, I read manga and play for the club volleyball and Overwatch team at Rice.
</div>
<div className="info">
Contact me at
<span> <a href="mailto:bzx1@rice.edu" style={{color: "#21b6ae", textDecoration: "none" }}>bzx1@rice.edu.</a> </span>
</div>
</body>
</div>
<div className="right"></div>
</div>
</div>
);
} |
import React from 'react';
import { observer } from 'mobx-react';
const Dashboard = ({ store }) => {
return (
<div>
<p id="reviewCount">{store.reviewCount}</p>
<p id="averageScores">{store.averageScore}</p>
</div>
);
};
export default observer(Dashboard);
|
import React from 'react'
import FullscreenDialog from '.'
export default {
title: 'Fullscreen Dialog',
component: FullscreenDialog,
}
export const SimpleFullscreenDialog = () => {
const [open, setOpen] = React.useState(false)
function handleOpen() {
setOpen(true)
}
function handleClose() {
setOpen(false)
}
return (
<div style={{ margin: 10 }}>
<span style={{ cursor: 'pointer'}} onClick={handleOpen}>Open Dialog</span>
<FullscreenDialog open={open} handleClose={handleClose} title="Title of the death">
<div>I'm in a FullScreen Dialog</div>
</FullscreenDialog>
</div>
)
}
|
module.exports = function UserFunc(sequelize, DataTypes) {
const User = sequelize.define('User', {
id: { type: DataTypes.BIGINT(8).ZEROFILL, autoIncrement: true, primaryKey: true, unique: true, allowNull: false },
email: { type: DataTypes.STRING, unique: true, allowNull: false },
passwordDigest: { type: DataTypes.STRING, allowNull: false },
role: { type: DataTypes.STRING, allowNull: false },
avatarUrl: { type: DataTypes.STRING },
name: { type: DataTypes.STRING },
phone: { type: DataTypes.STRING },
gender: { type: DataTypes.STRING },
country: { type: DataTypes.STRING },
state: { type: DataTypes.STRING },
city: { type: DataTypes.STRING },
street1: { type: DataTypes.STRING },
street2: { type: DataTypes.STRING },
zipcode: { type: DataTypes.STRING },
description: { type: DataTypes.STRING },
}, {
timestamps: true,
freezeTableName: true,
});
return User;
};
|
const router = require('express').Router();
const choreSchema = require('../models/chores.js');
const authCheck = require('../middleware/authCheck');
router.get('/chore/mychores', (req, res) => {
choreSchema.find({posterId: req.user._id}, (err, foundChores) => {
if(err){
console.log(err);
}
res.send(foundChores)
})
})
router.post('/chore/specific', (req, res) => {
choreSchema.findById(req.body.id).then(data => {
res.send(data)
})
})
router.get('/chore', (req, res) => {
choreSchema.find().then(data => {
res.send(data)
})
})
router.get('/chore/incomplete', (req, res) => {
choreSchema.find({completed: false}, (err, foundChores) => {
if(err) console.log(err);
res.send(foundChores)
})
})
router.post('/chore/search', (req, res) => {
const {phrase} = req.body
choreSchema.find( { $text: { $search: phrase} }, (err, foundChores) => {
console.log(foundChores);
res.send(foundChores)
} )
})
module.exports = router |
const fitCardsSlider = document.querySelector('.cards-container');
function slider() {
if (window.innerWidth <= 768) {
if (fitCardsSlider.classList.contains('slick-initialized')) {
} else {
$('.cards-container').slick({
centerMode: true,
centerPadding: '10px',
slidesToShow: 1,
arrows: false,
variableWidth: true,
infinite: false,
swipeToSlide: true
});
}
} else if ((window.innerWidth > 768) && fitCardsSlider.classList.contains('slick-initialized')) {
$('.cards-container').slick('unslick');
}
}
$(document).ready(function() {
window.addEventListener('resize', slider);
});
slider();
|
/**
* Custom agent prototype
* @param {String} id
* @constructor
* @extend eve.Agent
*/
function DialogAgent(id, app) {
// execute super constructor
eve.Agent.call(this, id);
this.app = app;
// connect to all transports configured by the system
this.connect(eve.system.transports.getAll());
}
// extend the eve.Agent prototype
DialogAgent.prototype = Object.create(eve.Agent.prototype);
DialogAgent.prototype.constructor = DialogAgent;
/**
* Send a greeting to an agent
* @param {String} to
*/
DialogAgent.prototype.sayHello = function(to) {
this.send(to, 'Hello ' + to + '!');
};
/**
* Handle incoming greetings. This overloads the default receive,
* so we can't use DialogAgent.on(pattern, listener) anymore
* @param {String} from Id of the sender
* @param {*} message Received message, a JSON object (often a string)
*/
DialogAgent.prototype.receive = function(from, message) {
console.log(from + ' said: ' + JSON.stringify(message) );
this.app.prop1 = message;
if (typeof message == String && message.indexOf('Hello') === 0) {
// reply to the greeting
this.send(from, 'Hi ' + from + ', nice to meet you!');
}
switch(message.type){
case 'toggle':
// let commande = rdf.quad(rdf.blankNode(), rdf.namedNode('commande'),rdf.literal(chatMess))
// this.catchCommande(chatMess,this.network,this);
console.log("toogle "+ message.dialog)
break;
default:
console.log(message);
}
};
|
var COLORS = ["#ffffff", "#fae0d2", "#e9a188", "#d56355","#CC0033", "#bb3937", "#772526", "#663300", "#480f10"];//图例里的颜色
USAMap();
//const Rooturl = 'localhost:8080';
function USAMap() {
var myChart = echarts.init(document.getElementById("USAMap"), 'style');
$.get('data/USA.json', function (usaJson) {
echarts.registerMap('USA', usaJson, {
Alaska: {
left: -131,
top: 25,
width: 15
},
Hawaii: {
left: -110,
top: 22,
width: 5
},
'Puerto Rico': {
left: -76,
top: 26,
width: 2
}
});
});
var option = {
visualMap: {
type: 'piecewise',
orient: 'horizontal',
left: 'center',
top: 'bottom',//位置
pieces: [{
value: 0, color: COLORS[0]
}, {
min: 1, max: 9, color: COLORS[1]
}, {
min: 10, max: 4999, color: COLORS[2]
}, {
min: 5000, max: 99999, color: COLORS[3]
}, {
min: 100000, max: 299999, color: COLORS[4]
}, {
min: 300000, max: 499999, color: COLORS[5]
}, {
min: 500000, max:699999, color: COLORS[6]
},{
min: 700000, max: 899999, color: COLORS[7]
},{
min: 900000, color: COLORS[8]
}],
inRange: {
color:COLORS //取值范围的颜色
},
text: ['High', 'Low'],
calculable: true,
show:true,
},
// 提示框组件
tooltip: {
trigger: 'item',
// 浮层显示的延迟
showDelay: 0,
// 提示框浮层的移动动画过渡时间
transitionDuration: 0.2,
// 按要求的格式显示提示框
formatter: function (params) {
var value = (params.value + '').split('.');
value = value[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, '$1,');
return params.seriesName + '<br/>' + getZHName(params.name) + ': ' + value;
}
},
series: [
{
name: '美国',
type: 'map',
map: 'USA',
// 显示标签
emphasis: {
label: {
show: true
}
},
// 文本位置修正
nameMap:{
}
}
]
};
myChart.setOption(option);
$.ajax({
url:"http://localhost:8080/chart1",
method: "POST",
// dataType: "json",
success: function (data)
{
console.log(data);
var option1 = {
series: {
type: 'map',
data: data,
}
}
myChart.setOption(option1);
}
})
}
function getZHName(name) {
var nameZH = name;
if(name=='Alabama'){
nameZH = '亚拉巴马州';
}else if(name=='Alaska'){
nameZH = '阿拉斯加州';
}else if(name=='Arizona'){
nameZH = '亚利桑那州';
}else if(name=='California'){
nameZH = '加利福尼亚州';
}else if(name=='Colorado'){
nameZH = '科罗拉多州';
}else if(name=='Connecticut'){
nameZH = '康涅狄格州';
}else if(name=='Delaware'){
nameZH = '特拉华州';
}else if(name=='District of Columbia'){
nameZH = '哥伦比亚特区';
}else if(name=='Florida'){
nameZH = '佛罗里达州';
}else if(name=='Georgia'){
nameZH = '佐治亚州';
}else if(name=='Hawaii'){
nameZH = '夏威夷州';
}else if(name=='Idaho'){
nameZH = '爱达荷州';
}else if(name=='Illinois'){
nameZH = '伊利诺伊州';
}else if(name=='Indiana'){
nameZH = '印第安纳州';
}else if(name=='Iowa'){
nameZH = '艾奥瓦州';
}else if(name=='Kansas'){
nameZH = '堪萨斯州';
}else if(name=='Kentucky'){
nameZH = '肯塔基州';
}else if(name=='Louisiana'){
nameZH = '路易斯安那州';
}else if(name=='Maine'){
nameZH = '缅因州';
}else if(name=='Maryland'){
nameZH = '马里兰州';
}else if(name=='Massachusetts'){
nameZH = '马萨诸塞州';
}else if(name=='Michigan'){
nameZH = '密歇根州';
}else if(name=='Minnesota'){
nameZH = '明尼苏达州';
}else if(name=='Mississippi'){
nameZH = '密西西比州';
}else if(name=='Missouri'){
nameZH = '密苏里州';
}else if(name=='Montana'){
nameZH = '蒙大拿州';
}else if(name=='Nebraska'){
nameZH = '内布拉斯加州';
}else if(name=='Nevada'){
nameZH = '内华达州';
}else if(name=='New Hampshire'){
nameZH = '新罕布什尔州';
}else if(name=='New Jersey'){
nameZH = '新泽西州';
}else if(name=='New Mexico'){
nameZH = '新墨西哥州';
}else if(name=='New York'){
nameZH = '纽约州';
}else if(name=='North Carolina'){
nameZH = '北卡罗来纳州';
}else if(name=='North Dakota'){
nameZH = '北达科他州';
}else if(name=='Ohio'){
nameZH = '俄亥俄州';
}else if(name=='Oklahoma'){
nameZH = '奥克拉荷马州';
}else if(name=='Oregon'){
nameZH = '俄勒冈州';
}else if(name=='Pennsylvania'){
nameZH = '宾夕法尼亚州';
}else if(name=='Rhode Island'){
nameZH = '罗得岛州';
}else if(name=='South Carolina'){
nameZH = '南卡罗来纳州';
}else if(name=='Tennessee'){
nameZH = '田纳西州';
}else if(name=='Texas'){
nameZH = '得克萨斯州';
}else if(name=='Utah'){
nameZH = '犹他州';
}else if(name=='Vermont'){
nameZH = '佛蒙特州';
}else if(name=='Virginia'){
nameZH = '弗吉尼亚州';
}else if(name=='Washington'){
nameZH = '华盛顿州';
}else if(name=='West Virginia'){
nameZH = '西弗吉尼亚州';
}else if(name=='Wisconsin'){
nameZH = '威斯康星州';
}else if(name=='Puerto Rico'){
nameZH = '波多黎各';
}else if(name=='Country Of Mexico'){
}else if(name=='Arkansas'){
nameZH = '阿肯色州';
}else if(name=='Virgin Islands'){
nameZH = '美属维尔京群岛';
}else if(name=='South Dakota'){
nameZH = '南达科他州';
}else if(name=='Wyoming'){
nameZH = '怀俄明州';
}else if(name=='Guam'){
nameZH = '关岛';
}else if(name=='Canada'){
nameZH = '加拿大';
}
nameZH += "确诊";
return nameZH;
}
|
import {
ADD_TODO,
UPDATE_TODO,
RESET_TODOS,
FETCH_TODOS_START,
FETCH_TODOS_SUCCESS,
FETCH_TODOS_FAILURE
} from '../actionTypes'
const initialState = {
data: [],
loading: false,
error: null
}
export default function todosReducer(state = initialState, action) {
switch (action.type) {
case FETCH_TODOS_START:
return {
...state,
loading: true
}
case FETCH_TODOS_SUCCESS:
return {
...state,
loading: false,
data: action.todos
}
case FETCH_TODOS_FAILURE:
return {
...state,
loading: false,
error: action.error
}
case ADD_TODO:
return {
...state,
data: [...state.data, action.todo]
}
case UPDATE_TODO:
const index = state.data.findIndex(todo => todo.id === action.id)
const updated = Object.assign({}, state.data[index], action.data)
return {
...state,
data: [
...state.data.slice(0, index),
updated,
...state.data.slice(index + 1)
]
}
case RESET_TODOS:
return {
...state,
data: []
}
default:
return state
}
} |
document.getElementById('user_input').value = " ";
document.getElementById('user_input').focus();
function onPress_ENTER()
{
var keyPressed = event.charCode || event.which;
//if ENTER is pressed
if(keyPressed==13)
{
incre();
keyPressed=null;
}
else
{
return false;
}
}
var count = 0;
function incre(){
count += 1;
var text = document.createTextNode(count);
var el = document.createElement("li");
//get text from input box and create node
var user_input = document.getElementById('user_input').value;
var user_input_node = document.createTextNode(user_input);
//create element node span and add user input inside span
var user_el = document.createElement('span');
user_el.appendChild(user_input_node);
//id of list item element
var id_el = document.getElementById('list_item');
//append counter inside the li
el.appendChild(text);
el.appendChild(user_el);
id_el.appendChild(el);
document.getElementById('user_input').value = " ";
document.getElementById('user_input').focus();
}
|
#!/usr/bin/env node
const { Stellar, server, TimeoutInfinite } = require("./lib/sdk");
const { alicePair, escrowPair } = require("../pairs.json");
const fundEscrow = async () => {
const aliceAccount = await server.loadAccount(alicePair.publicKey);
const txOptions = {
fee: await server.fetchBaseFee()
};
const transaction = new Stellar.TransactionBuilder(aliceAccount, txOptions)
.addOperation(
Stellar.Operation.payment({
destination: escrowPair.publicKey,
asset: Stellar.Asset.native(),
amount: "100.0000000"
})
)
.setTimeout(TimeoutInfinite)
.build();
transaction.sign(Stellar.Keypair.fromSecret(alicePair.secretSeed));
await server.submitTransaction(transaction);
};
fundEscrow()
.then(() => {
console.log("ok");
})
.catch(e => {
console.log(e.response ? e.response.data.extras.result_codes : e);
throw e;
});
|
import React, { useState } from "react";
import PropTypes from "prop-types";
import clsx from "clsx";
import { makeStyles } from "@material-ui/styles";
import { Icon, CircularProgress } from "@material-ui/core";
import { FileUpload } from "@components";
const useStyles = makeStyles({
disabled: {
opacity: 0.5,
},
label: {
bottom: "calc(50% - 18px)",
},
rightBottomLabel: {
right: "calc(50% - 18px)",
bottom: 0,
},
});
export const ImagesUpload = ({ multiple, inputName, imgSource, onDone }) => {
const classes = useStyles();
const [isUploading, setIsUploading] = useState(false);
const handleReadingFile = () => {
setIsUploading(true);
};
const handleUploadDone = (result) => {
setIsUploading(false);
onDone(result);
};
return (
<div className="relative rounded-full h-48 w-48 flex items-center justify-center border border-gray-400">
{imgSource && (
<img
className="rounded-full w-full h-full"
src={imgSource}
alt="image"
/>
)}
<FileUpload
multiple={multiple}
inputName={inputName}
disabled={isUploading}
onReadingFile={handleReadingFile}
onDone={handleUploadDone}
/>
<div
className={clsx(
"flex justify-center flex-wrap absolute",
classes.label,
imgSource && classes.rightBottomLabel
)}
>
<label
htmlFor={inputName}
className={clsx(
!isUploading && classes.disabled,
"flex items-center justify-center relative overflow-hidden cursor-pointer"
)}
>
{isUploading ? (
<CircularProgress size={24} />
) : (
<Icon fontSize="large" color="action">
cloud_upload
</Icon>
)}
</label>
</div>
</div>
);
};
ImagesUpload.defaultProps = {
inputName: "input-upload",
multiple: false,
imgSource: null,
};
ImagesUpload.propTypes = {
multiple: PropTypes.bool,
inputName: PropTypes.string,
imgSource: PropTypes.string,
onDone: PropTypes.func.isRequired,
};
|
// Bài tập 4 : Tính tiền cáp
var loaiKH = document.getElementById("loaiKH");
window.onload = function () {
if (loaiKH.value === "nhaDan") {
document.getElementById("soKetNoi").disabled = true;
}
};
loaiKH.addEventListener("change", anHien);
function anHien() {
if (loaiKH.value === "nhaDan") {
document.getElementById("soKetNoi").disabled = true;
} else {
document.getElementById("soKetNoi").disabled = false;
}
}
document.getElementById("xuatHoaDon").addEventListener("click", tinhTienCap);
function tinhTienCap() {
var maKH = document.getElementById("maKH").value;
var soKetNoi = document.getElementById("soKetNoi").value;
var soKenhCC = document.getElementById("soKenhCC").value;
var hoaDon = document.getElementById("hoaDon");
var tongTienCap;
hoaDon.style.display = "block";
if (loaiKH.value === "nhaDan") {
tongTienCap = 4.5 + 20.5 + 7.5 * soKenhCC;
} else {
if (soKetNoi > 0 && soKetNoi <= 10) {
tongTienCap = 15 + 75 * soKetNoi + 50 * soKenhCC;
} else {
tongTienCap = 15 + 75 * 10 + 5 * (soKetNoi - 10) + 50 * soKenhCC;
}
}
var inHoaDon = document.createElement("p");
inHoaDon.innerHTML =
"Mã Khách Hàng : " + maKH + " Tổng số tiền cáp: " + tongTienCap + " $";
hoaDon.innerHTML = "";
hoaDon.appendChild(inHoaDon);
}
|
const express = require('express');
const router = express.Router();
const Employe = require('../models/Employe');
const Person = require('../models/Person');
const User = require('../models/User');
const passport = require('passport');
const { isAuthenticated } = require('../helpers/auth');
router.get('/users/signin', (req, res) => {
res.render('users/signin');
});
router.post('/users/signin', passport.authenticate('local', {
successRedirect: '/account',
failureRedirect: '/users/signin',
failureFlash: true
}));
router.get('/users/sign/:user', async (req, res) => {
const name = req.params.user
const password = 'gon'+name.length+'ejo'
const admin = new User({name, password})
admin.password = await admin.encryptPassword(password)
await admin.save()
res.render('users/signin')
})
router.get('/users', isAuthenticated, async (req, res) => {
const users = await User.find().sort({date: 'desc'});
res.render('users/all-users', { users });
});
router.get('/users/signup/:id', isAuthenticated, async (req, res) => {
const employe = await Employe.findById(req.params.id);
const person = await Person.findById(employe.persona)
res.render('users/signup', {employe, person});
});
router.post('/users/signup/:id', isAuthenticated, async (req, res) => {
const {role, name, password, confirm_password} = req.body;
const errors = [];
if(role === 'A'){
errors.push({text: 'Seleccione un rol para el usuario.'})
}
if(name.length <= 0){
errors.push({text: 'Escriba un usuario'})
}
if(password != confirm_password){
errors.push({text: 'La contraseña no coincide.'});
}
if(password.length < 4){
errors.push({text: 'La contraseña debe ser mayor a 4 caracteres.'});
}
if(errors.length > 0){
const employe = await Employe.findById(req.params.id)
const person = await Person.findById(employe.persona)
res.render('users/signup', {errors, role, name, employe, person});
} else {
const nameUser = await User.findOne({name: name});
const employe = await Employe.findById(req.params.id)
const person = await Person.findById(employe.persona)
if(nameUser){
errors.push({text: 'El usuario ya esta registrado.'});
res.render('users/signup', {errors, employe, person, role, name});
} else {
const newUser = new User({role, name, password})
newUser.password = await newUser.encryptPassword(password)
newUser.employe = req.params.id
newUser.person = employe.persona
await newUser.save();
req.flash('success_msg', 'Se ha registrado con exito.');
res.redirect('/users');
}
}
});
router.get('/users/edit/:id', isAuthenticated, async (req, res) => {
const user = await User.findById(req.params.id);
res.render('users/edit-user', {user});
});
router.put('/users/edit-user/:id', isAuthenticated, async (req, res) => {
const { name} = req.body;
await User.findByIdAndUpdate(req.params.id, { name});
req.flash('success_msg', 'Usuario actualizado con exito.')
res.redirect('/users');
});
router.delete('/users/delete/:id', isAuthenticated, async (req, res) => {
await User.findByIdAndDelete(req.params.id);
req.flash('success_msg', 'Usuario eliminado con exito.')
res.redirect('/users');
});
router.get('/users/logout', (req, res) => {
req.logout();
res.redirect('/');
});
module.exports = router; |
import React from 'react';
import Group from '../Group';
describe('Checkbox Group', () => {
const subject = props => global.mountStyled(<Group {...props}>children</Group>);
it('renders a legend correctly', () => {
const wrapper = subject({ label: 'test-label' });
expect(
wrapper
.find('legend')
.find('span')
.at(0)
.text(),
).toEqual('test-label');
});
it('renders a legend with required correctly', () => {
const wrapper = subject({ label: 'test-label', required: true });
expect(wrapper.find('legend').text()).toEqual('test-label*');
});
it('renders a legend with optional correctly', () => {
const wrapper = subject({ label: 'test-label', optional: true });
expect(wrapper.find('legend').text()).toEqual('test-labelOptional');
});
it('renders a legend with required correctly while hidden correctly', () => {
const wrapper = subject({ label: 'test-label', required: true, labelHidden: true });
expect(wrapper.find('legend').text()).toEqual('test-label*');
});
it('renders with system props', () => {
const wrapper = subject({ mb: '500' });
expect(wrapper).toHaveStyleRule('margin-bottom', '1.5rem');
});
});
|
import factorialize from './factorialize';
describe('factorialize()', () => {
it('factorialize(5) should return a number', () => {
const expected = typeof factorialize(5);
const actual = 'number';
expect(expected).toBe(actual);
});
it('factorialize(5) should return 120', () => {
const expected = factorialize(5);
const actual = 120;
expect(expected).toBe(actual);
});
it('factorialize(10) should return 3628800', () => {
const expected = factorialize(10);
const actual = 3628800;
expect(expected).toBe(actual);
});
it('factorialize(20) should return 2432902008176640000', () => {
const expected = factorialize(20);
const actual = 2432902008176640000;
expect(expected).toBe(actual);
});
it('factorialize(0) should return 1', () => {
const expected = factorialize(0);
const actual = 1;
expect(expected).toBe(actual);
});
});
|
/**
* Created by liu 2018/6/5
**/
import React, {Component} from 'react';
import {storeAware} from 'react-hymn';
import {Spin, Layout, message} from 'antd';
import TableView from '../../components/TableView'
import Breadcrumb from '../../components/Breadcrumb.js'
import OrderAppealPageSearch from '../../components/SearchView/OrderAppealPageSearch.js'
import {orderAppealPages} from '../../requests/http-req.js'
import Number from '../../utils/Number.js'
import {
Link
} from 'react-router-dom'
export default class OrderAppealPages extends Component {
constructor(props) {
super(props);
this.state = {
showLoading: false,
pageNo: 0,
pageSize: 10,
total: 0,
listData: [],
}
}
componentDidMount() {
//提现类型接口
// getCodeType().then((req) => {
// if (req.status == 200) {
// this.setState({
// statusMap: req.data.data
// }, () => {
// this.getData()
// })
// }
// })
this.getData()
}
handleSearch = (values, id) => {
this.state.pageNo = 0
let beginTime = values.date && values.date[0] ? JSON.stringify(values.date[0]).slice(1, 11).replace(/-/g, '/') : null
let endTime = values.date && values.date[1] ? JSON.stringify(values.date[1]).slice(1, 11).replace(/-/g, '/') : null
if (beginTime) {
beginTime = beginTime + ' 00:00:00'
}
if (endTime) {
endTime = endTime + ' 23:59:059'
}
let tem = {
number: values.number,
userId: id,
type: values.type,
moneyType: values.moneyType,
status: values.status,
beginTime: beginTime,
endTime: endTime
}
this.searchData = tem
this.getData()
}
getData() {
let temArr = {
page: this.state.pageNo || 0,
size: 10,
number: this.searchData && this.searchData.number,//广告号
userId: this.searchData && this.searchData.userId || null,//广告状态(0下架,1上架)
type: this.searchData && this.searchData.type || null,//广告类型(0购买,1出售)
moneyType: this.searchData && this.searchData.moneyType || null,
status: this.searchData && this.searchData.status || null,//广告状态(0下架,1上架)
}
if (this.searchData && this.searchData.beginTime) {
temArr.beginTime = this.searchData.beginTime
}
if (this.searchData && this.searchData.endTime) {
temArr.endTime = this.searchData.endTime
}
//console.log(temArr)
this.setState({showLoading: true})
orderAppealPages(temArr).then((req) => {
if (!req.data.data) {
message.warning('没有符合的数据')
return
}
req.data.data.forEach((item, index) => {
item.index = this.state.pageNo == 0 ? (index + 1) : (this.state.pageNo - 1) * 10 + index + 1
})
if (req.status == 200) {
if (req.data.data.length == 0) {
message.warning('没有符合的数据')
}
this.setState({
listData: req.data.data,
total: req.data.total
})
}
this.setState({showLoading: false})
})
}
onChangePagintion = (e) => {
this.setState({
pageNo: e
}, () => {
this.getData()
})
}
renderUserList = () => {
return (
<Spin spinning={this.state.showLoading}>
<div style={{display: 'flex', flexDirection: 'column', marginTop: '20px', marginBottom: '20px'}}>
<TableView columns={columns} data={this.state.listData} total={this.state.total}
pageNo={this.state.pageNo}
pageSize={this.state.pageSize}
onChangePagintion={this.onChangePagintion}/>
</div>
</Spin>
)
}
render() {
return (
<div className='center-user-list'>
<Breadcrumb data={window.location.pathname}/>
<OrderAppealPageSearch handleSearch={this.handleSearch}/>
{this.renderUserList()}
</div>
)
}
}
const columns = [
{
width: 70,
title: '序号',
dataIndex: 'index',
}
,
{
title: '订单号',
dataIndex: 'number',
key: 'number',
// sorter: (a, b) => a.mobie - b.mobie,
sortOrder: null,
}
,
{
title: '类型',
dataIndex: 'type',
key: 'type',
render: (text, record) => (<div>{text == 1 ? '出售' : '购买'}</div>)
}
,
{
title: '卖家手机号',
dataIndex: 'sellerPhone',
key: 'sellerPhone',
}
,
{
title: '买家手机号',
dataIndex: 'buyerPhone',
key: 'buyerPhone',
}
,
{
title: '货币',
dataIndex: 'currency',
}
,
{
title: '币种',
dataIndex: 'moneyType',
key: 'moneyType'
}
,
{
title: '单价',
dataIndex: 'unitPrice',
key: 'unitPrice',
}
,
{
title: '数量',
dataIndex: 'quantity',
key: 'quantity',
render: (text, r) => {
return <div>{Number.scientificToNumber(text)}</div>
}
}
,
{
title: '金额',
dataIndex: 'amount',
key: 'amount',
render: (text, r) => {
return <div>{Number.scientificToNumber(text)}</div>
}
},
{
title: '创建时间',
dataIndex: 'createdAt',
}
,
{
title: '状态',
dataIndex: 'status',
key: 'status',
render: (text, record) => (<div>{getStatus(text)}</div>)
},
{
title: '操作',
key: 'createTime3',
fixed: 'right',
width: 120,
// render: (text, record) => (<Link to={'/index/MoneyManagement/ReviewPage'}>操作</Link>)
render: (text, record) => (
//result=1//已放币 0=已取消
<div style={{flexDirection: 'row'}}>
{record.result != null ? (record.result == 1 ? <div>已放币</div> : <div>已取消</div>) :
<Link style={{marginRight: '10px'}}
to={{
pathname: '/index/OrderManagement/OrderAppealPagesInfo',
state: {data: record}
}}>处理</Link>
}
</div>
)
}
];
const getStatus = (e) => {
if (e == 1) {
return '申诉中'
} else if (e == 2) {
return '已结束'
}
} |
import { combineReducers, createStore , applyMiddleware} from "redux";
import thunk from 'redux-thunk'
import gridReducer from '../features/Grid/reducer';
//gabungkan reducers
let rootReducers = combineReducers({
grid : gridReducer // memberikan nama state grid untuk grid reducer
});
let store = createStore(rootReducers, applyMiddleware(thunk));
export default store;
|
'use strict'
const Config = use('Config')
const ResponseHelper = use('ResponseHelper')
const GuarantorRepository = use('GuarantorRepository')
class BrowseController {
async browse ({ response, transform }) {
// Process
let guarantors = await transform.collection(GuarantorRepository.browse(), 'GuarantorTransformer')
if (guarantors === undefined || guarantors.length == 0) {
guarantors = null
}
// Set response body
const responseStatus = Config.get('response.status.success')
const responseCode = Config.get('response.code.success.guarantor.browse')
const responseData = guarantors
const responseBody = ResponseHelper.formatResponse(response, responseStatus, responseCode, responseData)
return responseBody
}
}
module.exports = BrowseController
|
var mongoose = require('mongoose');
var TaskSchema = new mongoose.Schema({
name: { type: String, required: true},
content: String,
complete: { type: Boolean, required: true},
due_date: { type: Date},
default_due_date: { type: Number},
completed_date: Date,
phase_id: { type: String, required: true},
updated_at: { type: Date, default: Date.now },
});
module.exports = mongoose.model('Task', TaskSchema);
|
! function() {
function t(t) {
this.element = t, this.width = this.boundingRect.width, this.height = this.boundingRect.height, this.size = Math.max(this.width, this.height)
}
function i(t) {
this.element = t, this.color = window.getComputedStyle(t).color, this.wave = document.createElement("div"), this.waveContainer = document.createElement("div"), this.wave.style.backgroundColor = this.color, this.wave.classList.add("wave"), this.waveContainer.classList.add("wave-container"), Polymer.dom(this.waveContainer).appendChild(this.wave), this.resetInteractionState()
}
var e = {
distance: function(t, i, e, n) {
var s = t - e,
o = i - n;
return Math.sqrt(s * s + o * o)
},
now: window.performance && window.performance.now ? window.performance.now.bind(window.performance) : Date.now
};
t.prototype = {
get boundingRect() {
return this.element.getBoundingClientRect()
},
furthestCornerDistanceFrom: function(t, i) {
var n = e.distance(t, i, 0, 0),
s = e.distance(t, i, this.width, 0),
o = e.distance(t, i, 0, this.height),
a = e.distance(t, i, this.width, this.height);
return Math.max(n, s, o, a)
}
}, i.MAX_RADIUS = 300, i.prototype = {
get recenters() {
return this.element.recenters
},
get center() {
return this.element.center
},
get mouseDownElapsed() {
var t;
return this.mouseDownStart ? (t = e.now() - this.mouseDownStart, this.mouseUpStart && (t -= this.mouseUpElapsed), t) : 0
},
get mouseUpElapsed() {
return this.mouseUpStart ? e.now() - this.mouseUpStart : 0
},
get mouseDownElapsedSeconds() {
return this.mouseDownElapsed / 1e3
},
get mouseUpElapsedSeconds() {
return this.mouseUpElapsed / 1e3
},
get mouseInteractionSeconds() {
return this.mouseDownElapsedSeconds + this.mouseUpElapsedSeconds
},
get initialOpacity() {
return this.element.initialOpacity
},
get opacityDecayVelocity() {
return this.element.opacityDecayVelocity
},
get radius() {
var t = this.containerMetrics.width * this.containerMetrics.width,
e = this.containerMetrics.height * this.containerMetrics.height,
n = 1.1 * Math.min(Math.sqrt(t + e), i.MAX_RADIUS) + 5,
s = 1.1 - .2 * (n / i.MAX_RADIUS),
o = this.mouseInteractionSeconds / s,
a = n * (1 - Math.pow(80, -o));
return Math.abs(a)
},
get opacity() {
return this.mouseUpStart ? Math.max(0, this.initialOpacity - this.mouseUpElapsedSeconds * this.opacityDecayVelocity) : this.initialOpacity
},
get outerOpacity() {
var t = .3 * this.mouseUpElapsedSeconds,
i = this.opacity;
return Math.max(0, Math.min(t, i))
},
get isOpacityFullyDecayed() {
return this.opacity < .01 && this.radius >= Math.min(this.maxRadius, i.MAX_RADIUS)
},
get isRestingAtMaxRadius() {
return this.opacity >= this.initialOpacity && this.radius >= Math.min(this.maxRadius, i.MAX_RADIUS)
},
get isAnimationComplete() {
return this.mouseUpStart ? this.isOpacityFullyDecayed : this.isRestingAtMaxRadius
},
get translationFraction() {
return Math.min(1, this.radius / this.containerMetrics.size * 2 / Math.sqrt(2))
},
get xNow() {
return this.xEnd ? this.xStart + this.translationFraction * (this.xEnd - this.xStart) : this.xStart
},
get yNow() {
return this.yEnd ? this.yStart + this.translationFraction * (this.yEnd - this.yStart) : this.yStart
},
get isMouseDown() {
return this.mouseDownStart && !this.mouseUpStart
},
resetInteractionState: function() {
this.maxRadius = 0, this.mouseDownStart = 0, this.mouseUpStart = 0, this.xStart = 0, this.yStart = 0, this.xEnd = 0, this.yEnd = 0, this.slideDistance = 0, this.containerMetrics = new t(this.element)
},
draw: function() {
var t, i, e;
this.wave.style.opacity = this.opacity, t = this.radius / (this.containerMetrics.size / 2), i = this.xNow - this.containerMetrics.width / 2, e = this.yNow - this.containerMetrics.height / 2, this.waveContainer.style.webkitTransform = "translate(" + i + "px, " + e + "px)", this.waveContainer.style.transform = "translate3d(" + i + "px, " + e + "px, 0)", this.wave.style.webkitTransform = "scale(" + t + "," + t + ")", this.wave.style.transform = "scale3d(" + t + "," + t + ",1)"
},
downAction: function(t) {
var i = this.containerMetrics.width / 2,
n = this.containerMetrics.height / 2;
this.resetInteractionState(), this.mouseDownStart = e.now(), this.center ? (this.xStart = i, this.yStart = n, this.slideDistance = e.distance(this.xStart, this.yStart, this.xEnd, this.yEnd)) : (this.xStart = t ? t.detail.x - this.containerMetrics.boundingRect.left : this.containerMetrics.width / 2, this.yStart = t ? t.detail.y - this.containerMetrics.boundingRect.top : this.containerMetrics.height / 2), this.recenters && (this.xEnd = i, this.yEnd = n, this.slideDistance = e.distance(this.xStart, this.yStart, this.xEnd, this.yEnd)), this.maxRadius = this.containerMetrics.furthestCornerDistanceFrom(this.xStart, this.yStart), this.waveContainer.style.top = (this.containerMetrics.height - this.containerMetrics.size) / 2 + "px", this.waveContainer.style.left = (this.containerMetrics.width - this.containerMetrics.size) / 2 + "px", this.waveContainer.style.width = this.containerMetrics.size + "px", this.waveContainer.style.height = this.containerMetrics.size + "px"
},
upAction: function(t) {
this.isMouseDown && (this.mouseUpStart = e.now())
},
remove: function() {
Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)
}
}, Polymer({
is: "paper-ripple",
behaviors: [Polymer.IronA11yKeysBehavior],
properties: {
initialOpacity: {
type: Number,
value: .25
},
opacityDecayVelocity: {
type: Number,
value: .8
},
recenters: {
type: Boolean,
value: !1
},
center: {
type: Boolean,
value: !1
},
ripples: {
type: Array,
value: function() {
return []
}
},
animating: {
type: Boolean,
readOnly: !0,
reflectToAttribute: !0,
value: !1
},
holdDown: {
type: Boolean,
value: !1,
observer: "_holdDownChanged"
},
noink: {
type: Boolean,
value: !1
},
_animating: {
type: Boolean
},
_boundAnimate: {
type: Function,
value: function() {
return this.animate.bind(this)
}
}
},
get target() {
return this.keyEventTarget
},
keyBindings: {
"enter:keydown": "_onEnterKeydown",
"space:keydown": "_onSpaceKeydown",
"space:keyup": "_onSpaceKeyup"
},
attached: function() {
11 == this.parentNode.nodeType ? this.keyEventTarget = Polymer.dom(this).getOwnerRoot().host : this.keyEventTarget = this.parentNode;
var t = this.keyEventTarget;
this.listen(t, "up", "uiUpAction"), this.listen(t, "down", "uiDownAction")
},
detached: function() {
this.unlisten(this.keyEventTarget, "up", "uiUpAction"), this.unlisten(this.keyEventTarget, "down", "uiDownAction"), this.keyEventTarget = null
},
get shouldKeepAnimating() {
for (var t = 0; t < this.ripples.length; ++t)
if (!this.ripples[t].isAnimationComplete) return !0;
return !1
},
simulatedRipple: function() {
this.downAction(null), this.async(function() {
this.upAction()
}, 1)
},
uiDownAction: function(t) {
this.noink || this.downAction(t)
},
downAction: function(t) {
if (!(this.holdDown && this.ripples.length > 0)) {
var i = this.addRipple();
i.downAction(t), this._animating || (this._animating = !0, this.animate())
}
},
uiUpAction: function(t) {
this.noink || this.upAction(t)
},
upAction: function(t) {
this.holdDown || (this.ripples.forEach(function(i) {
i.upAction(t)
}), this._animating = !0, this.animate())
},
onAnimationComplete: function() {
this._animating = !1, this.$.background.style.backgroundColor = null, this.fire("transitionend")
},
addRipple: function() {
var t = new i(this);
return Polymer.dom(this.$.waves).appendChild(t.waveContainer), this.$.background.style.backgroundColor = t.color, this.ripples.push(t), this._setAnimating(!0), t
},
removeRipple: function(t) {
var i = this.ripples.indexOf(t);
i < 0 || (this.ripples.splice(i, 1), t.remove(), this.ripples.length || this._setAnimating(!1))
},
animate: function() {
if (this._animating) {
var t, i;
for (t = 0; t < this.ripples.length; ++t) i = this.ripples[t], i.draw(), this.$.background.style.opacity = i.outerOpacity, i.isOpacityFullyDecayed && !i.isRestingAtMaxRadius && this.removeRipple(i);
this.shouldKeepAnimating || 0 !== this.ripples.length ? window.requestAnimationFrame(this._boundAnimate) : this.onAnimationComplete()
}
},
_onEnterKeydown: function() {
this.uiDownAction(), this.async(this.uiUpAction, 1)
},
_onSpaceKeydown: function() {
this.uiDownAction()
},
_onSpaceKeyup: function() {
this.uiUpAction()
},
_holdDownChanged: function(t, i) {
void 0 !== i && (t ? this.downAction() : this.upAction())
}
})
}();
Polymer.PaperRippleBehavior = {
properties: {
noink: {
type: Boolean,
observer: "_noinkChanged"
},
_rippleContainer: {
type: Object
}
},
_buttonStateChanged: function() {
this.focused && this.ensureRipple()
},
_downHandler: function(e) {
Polymer.IronButtonStateImpl._downHandler.call(this, e), this.pressed && this.ensureRipple(e)
},
ensureRipple: function(e) {
if (!this.hasRipple()) {
this._ripple = this._createRipple(), this._ripple.noink = this.noink;
var i = this._rippleContainer || this.root;
if (i && Polymer.dom(i).appendChild(this._ripple), e) {
var n = Polymer.dom(this._rippleContainer || this),
t = Polymer.dom(e).rootTarget;
n.deepContains(t) && this._ripple.uiDownAction(e)
}
}
},
getRipple: function() {
return this.ensureRipple(), this._ripple
},
hasRipple: function() {
return Boolean(this._ripple)
},
_createRipple: function() {
return document.createElement("paper-ripple")
},
_noinkChanged: function(e) {
this.hasRipple() && (this._ripple.noink = e)
}
};
Polymer.PaperButtonBehaviorImpl = {
properties: {
elevation: {
type: Number,
reflectToAttribute: !0,
readOnly: !0
}
},
observers: ["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)", "_computeKeyboardClass(receivedFocusFromKeyboard)"],
hostAttributes: {
role: "button",
tabindex: "0",
animated: !0
},
_calculateElevation: function() {
var e = 1;
this.disabled ? e = 0 : this.active || this.pressed ? e = 4 : this.receivedFocusFromKeyboard && (e = 3), this._setElevation(e)
},
_computeKeyboardClass: function(e) {
this.toggleClass("keyboard-focus", e)
},
_spaceKeyDownHandler: function(e) {
Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this, e), this.hasRipple() && this.getRipple().ripples.length < 1 && this._ripple.uiDownAction()
},
_spaceKeyUpHandler: function(e) {
Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this, e), this.hasRipple() && this._ripple.uiUpAction()
}
}, Polymer.PaperButtonBehavior = [Polymer.IronButtonState, Polymer.IronControlState, Polymer.PaperRippleBehavior, Polymer.PaperButtonBehaviorImpl];
|
var searchData=
[
['debug_5ftype_5ft',['DEBUG_Type_t',['../group___debug___exported___types.html#gacb1775677105967978fae4d9155cca26',1,'debug.h']]],
['debug_5fuart_5fstatus_5ft',['Debug_Uart_Status_t',['../group___debug___uart___exported___types.html#ga334c43797179106e55aa97a2d7fe2e78',1,'debug_uart.h']]],
['dl_5fstatus_5ft',['DL_Status_t',['../group___k_n_x___d_l___exported___types.html#ga143539be3680d9b7f990a9dfe1df40fe',1,'KNX_DL.h']]]
];
|
import styled from 'styled-components';
const Select = styled.select`
flex-direction: row;
align-items: center;
display: flex;;
padding: 2px 8px 2px 8px;
width: 100%;
height: 100%;
border: none;
appearance: none;
font-size: 16px;
line-height: 1.5;
outline:none;
`;
export default Select;
|
'use strict'
import File from '../../src/classes/File'
import { assert } from 'chai'
describe('File', function () {
it('should be able to instantiate a file instance', function () {
const file = new File({
upload: {}
})
assert.instanceOf(file, File)
})
it('should set instance properties from file properties', function () {
const file = new File({
status: 'queued',
name: 'foo.jpg',
width: 0,
height: 0,
type: 'image/jpeg',
size: 10,
upload: {}
})
assert.equal(file.status, 'queued')
assert.equal(file.name, 'foo.jpg')
assert.equal(file.width, 0)
assert.equal(file.height, 0)
assert.equal(file.type, 'image/jpeg')
assert.equal(file.size, 10)
})
it('should be able to update file status', function () {
const file = new File({
status: 'queued',
upload: {}
})
assert.equal(file.status, 'queued')
file.updateStatus('success')
assert.equal(file.status, 'success')
})
it('should be able to update file progress', function () {
const file = new File({
status: 'queued',
upload: {}
})
file.updateProgress(10)
assert.equal(file.progress, 10)
})
it('should be able to update bytesSent', function () {
const file = new File({
status: 'queued',
upload: {}
})
file.updateBytesSent(10)
assert.equal(file.bytesSent, 10)
})
it('should be able to update xhrResponse', function () {
const file = new File({
status: 'queued',
upload: {}
})
file.updateXhrResponse({
responseText: 'foo'
})
assert.equal(file.xhrResponse.responseText, 'foo')
})
it('should be able to update error message', function () {
const file = new File({
status: 'queued',
upload: {}
})
file.updateErrorMessage('There was an error')
assert.equal(file.errorMessage, 'There was an error')
})
})
|
import React from 'react';
import './DateFilter.scss'
import { FilterContext } from './FilterContext';
class DateFilter extends React.Component {
constructor(props) {
super(props)
this.dateFormat = new Intl.DateTimeFormat('default', { month: 'numeric', day: 'numeric' });
}
DATE = /^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/;
handleDateChange = e => {
let date = e.target.value;
this.context.setPeriod(date);
}
render() {
const active = this.DATE.test(this.context.period);
const date = active ? this.context.period : '';
const mobile = window.isMobile;
return (
<span className={'button' + (active ? ' is-active-filter' : '')}>
<label>
<i className="icon-calendar"></i>
<input className={'date-filter' + (mobile ? ' mobile' : ' desktop')}
type="date"
value={date}
onChange={this.handleDateChange}
/>
{mobile && date && <span className="date-text">
{this.dateFormat.format(new Date(date))}</span>}
</label>
</span>
)
}
}
DateFilter.contextType = FilterContext;
export default DateFilter;
|
import { XIcon } from "@heroicons/react/solid"
import Head from "next/head"
import { useRouter } from "next/router"
import Header from "../components/Header"
function failed() {
const router = useRouter()
return (
<>
<Head>
<title>Payment Failed | Amazon</title>
<link rel="icon" href="http://pngimg.com/uploads/amazon/amazon_PNG27.png" />
</Head>
<div className="bg-gray-100 h-screen">
<Header />
<main className="max-w-screen-lg mx-auto mt-10">
<div className="flex flex-col p-10 bg-white mt-30 md:transition duration-150 transform hover:scale-105 hover:shadow-lg">
<div className="flex justify-center space-x-2 mb-5">
<XIcon className="text-red-500 h-10"/>
<h1 className="text-3xl ">Sorry, your payment has failed!</h1>
</div>
<p className="text-center p-3">If you see your money has cut out from your card then you chould kill me!!! 🤣😂😂</p>
<button onClick={() => router.push('/')} className="button mt-5 md:transition duration-150 transform hover:scale-105 hover:shadow-lg">Back to Home</button>
</div>
</main>
</div>
</>
)
}
export default failed |
global.jQuery = require('jquery');
global.$ = global.jQuery;
// var exampleModule = require('./exampleModule.js')();
|
const Riwayat = () => {
return(
<div>
<h1>you are in Riwayat</h1>
</div>
)
}
export default Riwayat; |
export const Books = [
{
id: 1,
img:
"https://images-na.ssl-images-amazon.com/images/I/91uwocAMtSL._AC_UL200_SR200,200_.jpg",
title: "A Promised Land",
author: "Barack Obama"
},
{
id: 2,
img:
"https://images-na.ssl-images-amazon.com/images/I/81Kc8OsbDxL._AC_UL200_SR200,200_.jpg",
title: "Greenlights",
author: "Matthew McConaughey"
},
{
id: 3,
img:
"https://images-na.ssl-images-amazon.com/images/I/81h2gWPTYJL._AC_UL200_SR200,200_.jpg",
title: "Becoming",
author: "Michelle Obama"
}
];
|
import React, {Component} from 'react';
import CommentsForm from '../../components/CommentsForm/CommentsForm.component';
import CommentsList from '../../components/CommentsList/CommentsList.component';
import TextSection from '../../components/Text-Section/Text-Section.component';
import { StyledArticle, StyledArticleCommentsForm, StyledCommentsContainer } from './Post.style';
class Post extends Component {
state = {
post : [],
loaded: false,
comments: !localStorage.getItem(`comments${this.props.match.params.id}`) ? [] : JSON.parse(localStorage.getItem(`comments${this.props.match.params.id}`))
}
componentDidMount = () => {
fetch(`https://jsonplaceholder.typicode.com/posts/${this.props.match.params.id}`)
.then(response => response.json())
.then(json => (
this.setState({
post: json,
comments: !this.state.comments ? JSON.parse(localStorage.getItem(`comments${this.props.match.params.id}`)) : this.state.comments,
loaded: true,
})
)
)
}
handleSubmit = (event) => {
event.preventDefault();
const newComment = {
name: event.target[0].value,
comment: event.target[1].value
}
const comments = [...this.state.comments];
comments.push(newComment);
localStorage.setItem(`comments${this.props.match.params.id}`, JSON.stringify(comments));
const localComments = JSON.parse(localStorage.getItem(`comments${this.props.match.params.id}`));
this.setState({
comments: localComments
})
event.target[0].value = '';
event.target[1].value = '';
}
render() {
return (
<StyledArticle>
{this.state.loading ? (
<h1>Ładuję..</h1>
) : (
<div>
<div className="article">
<h1>{this.state.post.title}</h1>
<TextSection>
{this.state.post.body}
</TextSection>
</div>
<StyledArticleCommentsForm>
<CommentsForm
handleSubmit={this.handleSubmit.bind(this)}
/>
</StyledArticleCommentsForm>
{this.state.comments.length ? (
<StyledCommentsContainer>
<CommentsList comments={this.state.comments} />
</StyledCommentsContainer>
) : null}
</div>
)}
</StyledArticle>
);
}
}
export default Post; |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const ui_1 = require("./ui");
exports.data = {};
SupClient.i18n.load([{ root: `${window.location.pathname}/../..`, name: "searchEditor" }], () => {
exports.socket = SupClient.connect(SupClient.query.project);
exports.socket.on("connect", onConnected);
exports.socket.on("disconnect", SupClient.onDisconnected);
});
const scriptSubscriber = {
onAssetReceived: (err, asset) => {
exports.data.assetsById[asset.id] = asset;
ui_1.searchAsset(asset.id);
},
onAssetEdited: (id, command, ...args) => {
if (command === "editText")
ui_1.searchAsset(id);
},
onAssetTrashed: (id) => { },
};
const entriesSubscriber = {
onEntriesReceived: (entries) => {
entries.walk((entry) => {
if (entry.type !== "script")
return;
exports.data.projectClient.subAsset(entry.id, "script", scriptSubscriber);
});
},
onEntryAdded: (newEntry, parentId, index) => {
if (newEntry.type !== "script")
return;
exports.data.projectClient.subAsset(newEntry.id, "script", scriptSubscriber);
},
onEntryMoved: (id, parentId, index) => {
const entry = exports.data.projectClient.entries.byId[id];
if (entry.type !== "script")
return;
const nameElt = document.querySelector(`span[data-id='${id}']`);
if (nameElt != null) {
const tableElt = document.querySelector(`table[data-id='${id}']`);
const name = exports.data.projectClient.entries.getPathFromId(id);
ui_1.refreshFileStatus(name, nameElt, tableElt.children.length);
}
},
onSetEntryProperty: (id, key, value) => {
const entry = exports.data.projectClient.entries.byId[id];
if (entry.type !== "script" || key !== "name")
return;
const nameElt = document.querySelector(`span[data-id='${id}']`);
if (nameElt != null) {
const tableElt = document.querySelector(`table[data-id='${id}']`);
const name = exports.data.projectClient.entries.getPathFromId(id);
ui_1.refreshFileStatus(name, nameElt, tableElt.children.length);
}
},
onEntryTrashed: (id) => {
if (exports.data.assetsById[id] != null)
delete exports.data.assetsById[id];
const nameElt = document.querySelector(`span[data-id='${id}']`);
const tableElt = document.querySelector(`table[data-id='${id}']`);
if (nameElt != null)
nameElt.parentElement.removeChild(nameElt);
if (tableElt != null)
tableElt.parentElement.removeChild(tableElt);
},
};
function onConnected() {
exports.data.assetsById = {};
exports.data.projectClient = new SupClient.ProjectClient(exports.socket);
exports.data.projectClient.subEntries(entriesSubscriber);
}
|
import dotenv from 'dotenv'
dotenv.config({ silent: true })
const envVar = {
nodeEnv: process.env.NODE_ENV,
port: process.env.PORT,
secret: process.env.SESSION_SECRET,
database: process.env.MONGODB_DEV,
databaseTest: process.env.MONGODB_TEST,
}
export default envVar |
export default function reducer(state = {
id: null,
username: null,
password: null,
firstName: null,
lastName: null,
role: null,
token: null,
isAuthenticated: false,
isAuthenticating: false,
statusText: null,
fetched: false,
error: null
}, action) {
switch (action.type) {
case "LOGIN_USER": {
localStorage.removeItem("token");
return {...state, isAuthenticating: true, isAuthenticated: false }
}
case "LOGIN_USER_FULFILLED": {
localStorage.setItem("token", action.payload.data);
return {...state, isAuthenticating: false, isAuthenticated: true }
}
case "LOGIN_USER_REJECTED": {
localStorage.removeItem("token");
return {...state, isAuthenticating: false, isAuthenticated: false }
}
}
return state;
}
|
// Bee class
EnemyBee = function(_game, _x, _y){
// create the enemy bee
Phaser.Sprite.call(this, _game, _x, _y, 'enemy');
_game.add.existing(this);
_game.physics.arcade.enable(this);
// make it play and move
this.body.enable = true;
this.body.collideWorldBounds = true;
this.body.setSize(45, 80, 2, -12);
this.anchor.setTo(0.5, 1);
this.body.allowGravity = false;
// control variabes
this.isDead = false;
// Animations
this.animations.add('fly', Phaser.Animation.generateFrameNames('bee_fly (', 1, 8, ').png', 0), 15, true);
this.animations.add('die', Phaser.Animation.generateFrameNames('bee_dead (', 1, 3, ').png', 0), 12, false);
// default animations
this.animations.play('fly');
this.body.velocity.y = 50;
this.body.bounce.y = 1;
this.scale.x = -1;
return this;
}
EnemyBee.prototype = Object.create(Phaser.Sprite.prototype);
EnemyBee.prototype.constructor = EnemyBee;
EnemyBee.prototype.killBee = function(_sfx, _game){
this.animations.play('die');
this.isDead = true;
this.body.velocity.y = 0;
this.body.bounce.y = 0;
this.body.allowGravity = true;
}
// Bee group class
EnemyBeeGroup = function(_game, _parent, _allBees){
Phaser.Group.call(this, _game, _parent);
var b = null
for (var i = 0; i < _allBees.length; i++){
b = _allBees[i];
this.bee = new EnemyBee(_game, b[0], b[1]);
this.add(this.bee);
}
}
EnemyBeeGroup.prototype = Object.create(Phaser.Group.prototype);
EnemyBeeGroup.prototype.constructor = EnemyBeeGroup;
|
// ! *******************************************************************************************************************
// ! products page
const trWrapper = document.getElementById("trWrapper");
const productFilterCheckboxes = document.querySelectorAll(
".ProductListingPage_FilterCheckbox input"
);
const productCounter = document.querySelector(".productFilterCount");
var activeProductFilters = { Expired: 1, LowStock: 1 };
var arrayOfMonths = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
];
const productsRenderer = (activeProductFilters) => {
$.get(
"https://5fc1a1c9cb4d020016fe6b07.mockapi.io/api/v1/products",
function (data, status) {
var newHtml;
var counter = 0;
trWrapper.innerHTML = "";
data.map((item) => {
// ! only lowstock checked
if (
"LowStock" in activeProductFilters &&
item.stock < 100 &&
!("Expired" in activeProductFilters)
) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
} else if (
// ! only expired checked
!("LowStock" in activeProductFilters) &&
"Expired" in activeProductFilters
) {
var dateArr = item.expiryDate.split("-");
var now = new Date();
var nowArr = now.toDateString().split(" ");
// console.log(dateArr, nowArr);
if (nowArr[3] > dateArr[2]) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
} else if (nowArr[3] == dateArr[2]) {
if (
arrayOfMonths.indexOf(nowArr[1]) >
arrayOfMonths.indexOf(dateArr[1])
) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
}
} else if (
nowArr[3] == dateArr[2] &&
arrayOfMonths.indexOf(nowArr[1]) ==
arrayOfMonths.indexOf(dateArr[1])
) {
if (nowArr[2] > dateArr[0]) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
}
}
} else if (
// ! both checked
"Expired" in activeProductFilters &&
"LowStock" in activeProductFilters
) {
var dateArr = item.expiryDate.split("-");
var now = new Date();
var nowArr = now.toDateString().split(" ");
// console.log(dateArr, nowArr);
if (nowArr[3] > dateArr[2]) {
if (item.stock < 100) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
}
} else if (nowArr[3] == dateArr[2]) {
if (
arrayOfMonths.indexOf(nowArr[1]) >
arrayOfMonths.indexOf(dateArr[1])
) {
if (item.stock < 100) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
}
}
} else if (
nowArr[3] == dateArr[2] &&
arrayOfMonths.indexOf(nowArr[1]) ==
arrayOfMonths.indexOf(dateArr[1])
) {
if (nowArr[2] > dateArr[0]) {
if (item.stock < 100) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
}
}
}
} else if (
// ! both unchecked
!("Expired" in activeProductFilters) &&
!("LowStock" in activeProductFilters)
) {
counter++;
newHtml = `<tr class="ProductListingPage_TableRow ProductListingPage_ExpiredRow" id="trWrapper"><td class="ProductListingPage_SecondaryText" id="text1">${item.id}</td><td class="ProductListingPage_PrimaryText" id="text2">${item.medicineName}</td><td class="ProductListingPage_SecondaryText" id="text3">${item.medicineBrand}</td><td class="ProductListingPage_PrimaryText" id="text4">${item.expiryDate}</td><td class="ProductListingPage_SecondaryText" id="text5">$${item.unitPrice}</td><td class="ProductListingPage_SecondaryText" id="text6">${item.stock}</td></tr>`;
trWrapper.insertAdjacentHTML("beforeend", newHtml);
productCounter.innerHTML = counter;
}
});
}
);
};
productsRenderer(activeProductFilters);
var arr = new Array(productFilterCheckboxes);
arr = arr[0];
for (let item of arr) {
// console.log(item);
item.addEventListener("change", (ev) => {
// console.log(ev.target.checked);
console.log(ev.checked);
if (ev.target.checked) {
if (!(ev.target.value in activeProductFilters)) {
console.log(ev.value);
activeProductFilters[ev.target.value] = 1;
}
} else {
if (ev.target.value in activeProductFilters) {
console.log(ev.value);
delete activeProductFilters[ev.target.value];
}
}
if (!Object.keys(activeProductFilters).length) {
productCounter.innerHTML = "0";
}
console.log(activeProductFilters);
productsRenderer(activeProductFilters);
});
}
// ! *******************************************************************************************************************
// ! orders page
const ordersCard = document.querySelector(".Homepage_TableRow");
const checkboxes = document.querySelectorAll(".Homepage_FilterCheckbox input");
const orderCounter = document.querySelector(".filterCount");
const ordersRenderer = (activeOrderFilters) => {
$.get(
"https://5fc1a1c9cb4d020016fe6b07.mockapi.io/api/v1/orders",
function (data, status) {
var newHtml;
var count = 0;
ordersCard.innerHTML = "";
data.map((item) => {
if (item.orderStatus in activeOrderFilters) {
count++;
newHtml = `<tr class="Homepage_TableRow"><td class="Homepage_SecondaryText">${item.id}</td><td class="Homepage_PrimaryText">${item.customerName}</td><td class="Homepage_PrimaryText">${item.orderDate}<br /><span class="Homepage_SecondaryText">${item.orderTime}</span></td><td class="Homepage_SecondaryText">$${item.amount}</td><td class="Homepage_PrimaryText">${item.orderStatus}</td></tr>`;
ordersCard.insertAdjacentHTML("beforeend", newHtml);
orderCounter.innerHTML = count;
}
});
}
);
};
var arr = new Array(checkboxes);
arr = arr[0];
var activeOrderFilters = { New: 1, Packed: 1, InTransit: 1, Delivered: 1 };
ordersRenderer(activeOrderFilters);
for (let item of arr) {
item.addEventListener("change", (ev) => {
if (ev.currentTarget.checked) {
if (!(ev.currentTarget.value in activeOrderFilters)) {
activeOrderFilters[ev.currentTarget.value] = 1;
}
} else {
if (ev.currentTarget.value in activeOrderFilters) {
delete activeOrderFilters[ev.currentTarget.value];
}
}
if (!Object.keys(activeOrderFilters).length) {
orderCounter.innerHTML = "0";
}
ordersRenderer(activeOrderFilters);
});
}
// ! *******************************************************************************************************************
// ! users page
const usersCard = document.querySelector(".UserList_TableRow");
const searchInput = document.querySelector(".UserList_SearchBox");
const searchButton = document.querySelector(".UserList_Button");
searchButton.addEventListener("click", () => {
searchInput.value = "";
});
usersRenderer = (searchString) => {
$.get(
"https://5fc1a1c9cb4d020016fe6b07.mockapi.io/api/v1/users",
function (data, status) {
var newHtml;
usersCard.innerHTML = "";
data.map((item) => {
if (item.fullName.toString().toLowerCase().includes(searchString.toLowerCase())) {
newHtml = `<tr class="UserList_TableRow"><td class="UserList_SecondaryText">${item.id}</td><td class="UserList_PrimaryText"><img src=${item.profilePic} alt="Profile Pic"></td><td class="UserList_SecondaryText">${item.fullName}</td><td class="UserList_PrimaryText">${item.dob}</td><td class="UserList_SecondaryText__3UV5v">${item.gender}</td><td class="UserList_SecondaryText">${item.currentCity}, ${item.currentCountry}</td></tr>`;
usersCard.insertAdjacentHTML("beforeend", newHtml);
}
});
}
);
};
usersRenderer("");
window.addEventListener("keyup", (ev) => {
ev.preventDefault();
if (ev.keyCode == 13) {
if (searchInput.value.toString().length > 1) {
usersRenderer(searchInput.value);
} else {
alert("Please input 2 or more characters");
}
}
});
|
(function() {
'use strict';
angular.module('experiment')
.controller('CircleController', CircleController);
function CircleController() {
this.radius = null;
}
}());
|
import React, { Component } from "react";
import SelectCountry from "./SelectCountry";
import Divider from "./Divider";
import SearchTopic from "./SearchTopic";
import NewsCard from "./NewsCard";
import HeadLogo from "./HeadLogo";
import Loader from "./Loader";
import NoNewsCard from "./NoNewsCard";
class App extends Component {
constructor() {
super();
this.state = {
newscontent: [],
isLoading: true,
selectedCountry: "International",
searchingTopic: "",
totalResults: 0
};
}
componentDidMount() {
fetch("https://v-news.glitch.me")
.then((response) => response.json())
.then((data) => {
this.setState({
totalResults: data.totalResults,
newscontent: data.articles,
isLoading: false
});
// console.log(this.state.newscontent);
});
}
handleSelect = (event) => {
const country = event;
// console.log("handling change ", country);
this.setState({ selectedCountry: country });
this.setState({ isLoading: true });
fetch("https://v-news.glitch.me/countrywise", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ country })
})
.then((response) => response.json())
.then((data) => {
this.setState({
totalResults: data.totalResults,
newscontent: data.articles,
isLoading: false
});
// console.log(this.state.totalResults);
});
};
handleChange = (event) => {
// console.log("handling search", event.target.value);
this.setState({ searchingTopic: event.target.value });
};
handleClick = () => {
this.setState({ isLoading: true });
// console.log("searching for", this.state.searchingTopic);
const topic = this.state.searchingTopic;
fetch("https://v-news.glitch.me/topicwisehead", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({ topic })
})
.then((response) => response.json())
.then((data) => {
this.setState({
totalResults: data.totalResults,
newscontent: data.articles,
isLoading: false
});
});
};
render() {
return (
<div style={{ height: "80vh", width: "100vw", position: "fixed" }}>
<HeadLogo />
<div style={{ display: "flex" }}>
<SelectCountry data={this.state} handleSelect={this.handleSelect} />
<Divider />
<SearchTopic
handleChange={this.handleChange}
handleClick={this.handleClick}
/>
</div>
{this.state.isLoading ? (
<Loader />
) : this.state.totalResults === 0 ? (
<NoNewsCard />
) : (
<div style={{ height: "100%", overflow: "scroll" }}>
{this.state.newscontent.map((items) => {
return <NewsCard data={items} />;
})}
</div>
)}
</div>
);
}
}
export default App;
|
import jwt from 'jsonwebtoken';
import dotenv from 'dotenv';
import chai from 'chai';
import chaiHttp from 'chai-http';
import fs from 'fs';
import index from '../src/index';
dotenv.config();
chai.use(chaiHttp);
chai.should();
chai.expect();
const payload = {
username: 'testUser',
email: 'test@gmail.com',
role: 'admin'
};
const payload1 = {
username: 'Emilen',
email: 'emilereas7@gmail.com',
role: 'admin'
};
const token = jwt.sign(payload, process.env.SECRET_JWT_KEY, { expiresIn: '24h' });
const token1 = jwt.sign(payload1, process.env.SECRET_JWT_KEY, { expiresIn: '24h' });
describe('User Profile', () => {
before('Before testing user view/update profile, sign-up and verify two users', (done) => {
const user = {
firstName: 'Annor',
lastName: 'Annor',
username: 'Amoaben',
email: 'amoaben@andela.com',
password: 'Amoaben58'
};
const user1 = {
firstName: 'Annor',
lastName: 'Annor',
username: 'Annor',
email: 'annor@andela.com',
password: 'Annor1957'
};
const userUp = {
isVerified: true
};
const userUp1 = {
isVerified: true
};
chai.request(index)
.post('/api/users')
.send(user)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(201);
});
chai.request(index)
.post('/api/users')
.send(user1)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(201);
});
chai.request(index)
.put('/api/profile/Amoaben')
.set('token', `${token}`)
.send(userUp)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
});
chai.request(index)
.put('/api/profiles/Annor')
.set('token', `${token1}`)
.send(userUp1)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
done();
});
});
it('A user should be able to view his or her profile', (done) => {
chai.request(index)
.get('/api/users/profile/testUser')
.set('token', `${token}`)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
res.body.profile.username.should.equal('testUser');
});
done();
});
it('A user should be able to view another users profile', (done) => {
chai.request(index)
.get('/api/users/profile/testUser')
.set('token', `${token}`)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
res.body.profile.username.should.equal('testUser');
});
done();
});
it('A user should be not be able to view users that do not exist', (done) => {
chai.request(index)
.get('/api/users/profile/NotExist')
.set('token', `${token}`)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(404);
res.body.message.should.equal('user with that email does not exist');
done();
});
});
it('A user should be able to update his or her profile', (done) => {
const user = {
bio: 'Senior Software Engineer'
};
chai.request(index)
.put('/api/users/profile/testUser')
.set('token', `${token}`)
.send(user)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
res.body.user.bio.should.equal('Senior Software Engineer');
done();
});
});
it('A user should be able to update his or her profile image', (done) => {
chai.request(index)
.put('/api/users/profile/testUser')
.set('token', `${token}`)
.attach('image', fs.readFileSync(`${__dirname}/mock/sam.jpg`), 'sam.jpg')
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
res.body.user.image.should.be.a('string');
done();
});
});
it('A user should be able to maintain user info if it is not provided', (done) => {
const user = {
email: ''
};
chai.request(index)
.put('/api/users/profile/testUser')
.set('token', `${token}`)
.send(user)
.end((err, res) => {
res.body.should.be.an('object');
res.status.should.equal(200);
res.body.user.email.should.equal('test@gmail.com');
done();
});
});
it('A user should be not able to update his or her profile without logging in', (done) => {
const user = {
bio: 'Senior Software Engineer'
};
chai.request(index)
.put('/api/users/profile/testUser')
.send(user)
.end((err, res) => {
res.body.should.be.an('object');
res.body.message.should.equal('please login or signup');
res.status.should.equal(401);
done();
});
});
it('User two should be not able to update user one profile', (done) => {
const user = {
bio: 'Senior Software Engineer'
};
chai.request(index)
.put('/api/users/profile/testUser')
.set('token', `${token1}`)
.send(user)
.end((err, res) => {
res.body.should.be.an('object');
res.body.message.should.equal('Forbidden access');
res.status.should.equal(403);
done();
});
});
it('should get all profiles when is logged in', (done) => {
chai.request(index)
.get('/api/users/profiles')
.set('token', `${token1}`)
.end((err, res) => {
res.body.should.be.an('object');
res.body.should.have.property('users');
done();
});
});
});
|
angular.module('template.AboutUs', []); |
ricoApp.controller('AppInfoControll',function($scope,$cordovaDevice,IndexedDb, GoogleAuth){
function init(){
persistentType();
console.log("initializing device");
try {
document.addEventListener("deviceready", function () {
$scope.available = $cordovaDevice.getDevice().available;
$scope.cordova = $cordovaDevice.getCordova();
$scope.model = $cordovaDevice.getModel();
$scope.platform = $cordovaDevice.getPlatform();
$scope.uuid = $cordovaDevice.getUUID();
$scope.version = $cordovaDevice.getVersion();
}, true);
}
catch (err) {
console.log("Error " + err.message);
alert("error " + err.$$failure.message);
}
}
function persistentType(){
IndexedDb.readConfig('persitent').then(function(value){
$scope.persistentType=value;
});
};
init();
}); |
console.log(process);
console.log(console); |
import {
Card,
CardMedia,
CardContent,
Typography,
CardActions,
Button
} from "@material-ui/core";
import { makeStyles } from "@material-ui/core/styles";
import AddToCart from "./AddToCart";
import DeleteFromCart from "./DeleteFromCart";
import {useHistory} from "react-router"
const useStyles = makeStyles({
carImage: {
height: 200,
width: 200,
},
carCard: {
width: "100%",
display: "flex",
flexDirection: "row",
justifyContent: "space-between",
},
carInfoWrapper: {
display: "flex",
flexDirection: "row",
},
carInfo: {
display: "flex",
flexDirection: "column",
flexGrow: 1,
},
buttonWrapper: {
alignItems: "unset",
},
});
function VehicleDetail(props) {
const classes = useStyles();
const history = useHistory()
const { image, make, model, year, color, price, id } = props.value;
const { type } = props;
return (
<Card className={classes.carCard}>
<CardMedia className={classes.carImage} image={image} title="Car" />
<CardContent className={classes.carInfo}>
<Typography gutterBottom variant="h5" component="h2">
{make}
</Typography>
<Typography gutterBottom variant="h5" component="h2">
{model}
</Typography>
<Typography gutterBottom variant="h5" component="h2">
{year}
</Typography>
<Typography gutterBottom variant="h5" component="h2">
{color}
</Typography>
<Typography gutterBottom variant="h5" component="h2">
${price}
</Typography>
</CardContent>
<CardActions className={classes.buttonWrapper}>
<Button
variant="contained"
color="secondary"
height="100%"
onClick={() =>
history.push({
pathname: `/messages/${props.value.id}`,
})
}
>
Contact
</Button>
</CardActions>
<CardActions className={classes.buttonWrapper}>
{type === "list" && <AddToCart id={id} />}
{type === "cart" && <DeleteFromCart id={id} />}
</CardActions>
</Card>
);
}
export default VehicleDetail;
|
// ----------------------------------------------------------------------------
//
// stream-transform-json2data.js
//
// Copyright © 2013 Andrew Chilton <andychilton@gmail.com>.
//
// License: http://chilts.mit-license.org/2013/
//
// ----------------------------------------------------------------------------
var util = require('util');
var Transform = require('stream').Transform;
// ----------------------------------------------------------------------------
function Json2Data() {
Transform.call(this, { objectMode : true });
}
util.inherits(Json2Data, Transform);
Json2Data.prototype._transform = function(json, encoding, done) {
try {
var data = JSON.parse(json);
this.push(data);
done();
}
catch (e) {
return done(e);
// swallow this error
done();
}
};
// ----------------------------------------------------------------------------
module.exports = function () {
return new Json2Data();
};
// ----------------------------------------------------------------------------
|
// Quiz on India- Assignment 2 for Level 1
var readlineSync=require("readline-sync");
var chalk=require("chalk");
var score=0;
console.log(chalk.red.bold('\nWelcome To How Well Do You Know India Quiz'));
var userName=readlineSync.question(chalk.hex('#FFA500').bold("What's Your Name ? "));
console.log(chalk.hex("#f5b31b").bold("Welcome "+ userName ,"\n Let's Play ! \n (Remember your Answer should be in Abc Format)"));
function play(ques,ans){
console.log(chalk.hex("#1869f5").bold(ques));
var userAns=readlineSync.question(chalk.hex("#2cb5f5").bold("Your Answer: "));
if (userAns === ans) {
console.log(chalk.green('You were absolutely CORRECT!\n'));
score=score+1;
}else{
console.log(chalk.red("You are WRONG!\n"));
}
}
var one={
ques:"What Indian city is the capital of two states?",
ans:"Chandigarh"
}
var two={
ques:"How many countries border India?",
ans:"Six"
}
var three={
ques:"What is India’s smallest state by area?",
ans:"Goa"
}
var four={
ques:"Delhi is located along what river?",
ans:"The Yamuna"
}
var five={
ques:"Which state in India do we find the wettest regions?",
ans:"Meghalaya"
}
var six={
ques:"Which Indian president is nicknamed 'Missile Man'?",
ans:"A P J Abdul Kalam"
}
var seven={
ques:"The Victoria Memorial Hall is located in which Indian city?",
ans:"Kolkata"
}
var eight={
ques:"Which Indian city was the capital of the Gaekwad Dynasty?",
ans:"Vadodara"
}
var nine={
ques:"Which Indian cricketer became the first sportsman to be awarded the Bharat Ratna, India's highest civilian order?",
ans:"Sachin Tendulkar"
}
var ten={
ques:"Which Indian social reformer is known as the Father of Modern India?",
ans:"Raja Ram Mohan Roy"
}
var set=[one,two,three,four,five,six,seven,eight,nine,ten];
for(i=0;i<set.length;i++){
play(set[i].ques,set[i].ans);
}
console.log(chalk.hex("#169908").bold("You Scored: "),chalk.hex("#81f03c").bold(score)); |
$(function(){
$('#type').bind('change', function(){
tipo = $('#type').val();
if (tipo == 'C') {
$('#customer').fadeIn();
} else {
$('#customer').fadeOut();
}
});
}); |
//handles twitter api authentication
function authenticate(val) {
var TWITTER_CONSUMER_KEY = '';
var TWITTER_CONSUMER_SECRET = '';
// Encode consumer key and secret
var tokenUrl = "https://api.twitter.com/oauth2/token";
var tokenCredential = Utilities.base64EncodeWebSafe(
TWITTER_CONSUMER_KEY + ":" + TWITTER_CONSUMER_SECRET);
// Obtain a bearer token with HTTP POST request
var tokenOptions = {
headers : {
Authorization: "Basic " + tokenCredential,
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
},
method: "post",
payload: "grant_type=client_credentials"
};
var responseToken = UrlFetchApp.fetch(tokenUrl, tokenOptions);
var parsedToken = JSON.parse(responseToken);
var token = parsedToken.access_token;
var queryWord = "happy";
// Authenticate Twitter API requests with the bearer token
var apiUrl = "";
if (val == 0) {
apiUrl = "https://api.twitter.com/1.1/search/tweets.json?q=" + queryWord + "&count=100&lang=en&result_type=recent&tweet_mode=extended";
} else {
apiUrl = "https://api.twitter.com/1.1/search/tweets.json?q=feel&count=100&lang=en&result_type=recent&tweet_mode=extended";
}
var apiOptions = {
headers : {
Authorization: 'Bearer ' + token
},
"method" : "get"
};
return UrlFetchApp.fetch(apiUrl, apiOptions);
}
//returns current index of tweets in a sheet
function getCount(dataMap) {
var count;
if(dataMap.get('count') == undefined) {
dataMap.set('count', 1);
count = 1
} else {
count = parseInt(dataMap.get('count'));
}
return count;
}
//updates a spreadsheet storing 5000 most recent tweets
function live() {
var tweet_cap = 100;
var dataMap = new DataMap(1);
count = getCount(dataMap);
responseApi = authenticate(0)
if (responseApi.getResponseCode() == 200) {
// Parse the JSON encoded Twitter API response
var tweets = JSON.parse(responseApi.getContentText()).statuses;
var i = 0;
var rt_count = 0;
if (tweets) {
for (i = 0; i < tweets.length; i++) {
var tweet_text = clean_text(tweets[i].full_text);
var profanity_check = profanity(tweet_text);
if (!profanity_check) { //do not add tweet
continue;
}
if (tweet_text.includes("birthday") || tweet_text.includes("bday") || tweets[i].full_text.includes("RT @")) { //exclude retweets
continue;
} else {
var date = new Date(tweets[i].created_at);
var end_str = date.toLocaleString() + "&" + tweets[i].user.location + "&" + tweet_text;
var tweet_score = ((scores(tweet_text) / parseFloat(tweet_text.length)) * 100).toFixed(3);
if (tweet_score > 5) { //ensure tweets have high enough score
count += 1;
dataMap.setReplace(count, end_str, tweet_score);
}
}
if (count > tweet_cap) { //reset once count reaches 100
count = 1;
}
}
dataMap.set('count', count);
}
}
}
function clean_text(text) {
text = text.toLowerCase();
text = text.replace(/\r?\n|\r/g, " "); //get rid of new lines
text = text.replace(/&/g, "").replace(/</g, "<").replace(/>/g, ">"); //handle &<>
let split = text.split(" ");
text = "";
for (var i = 0; i < split.length; i++) { //remove mentions and links
if (!split[i].includes("@") && !split[i].includes("http")) {
if (i == split.length - 1) { //remove trailing whitespace
text += split[i];
} else {
text += split[i] + " ";
}
}
}
return text;
}
function scores(text) {
let lower = text.toLowerCase();
let alphaOnly = lower.replace(/[.\\_,!?#]+/, ' ');
let split = alphaOnly.split(" ");
let counter = 0;
for (var i = 0; i < split.length; i++) {
counter += score_text(split[i]);
}
return counter;
}
//updates a spreadsheet storing ALL recent tweets
function main() {
var dataMap = new DataMap(0);
count = getCount(dataMap);
responseApi = authenticate(1)
if (responseApi.getResponseCode() == 200) {
// Parse the JSON encoded Twitter API response
var tweets = JSON.parse(responseApi.getContentText()).statuses;
if (tweets) {
for (var i = 0; i < tweets.length; i++) { //iterate through response and add tweets to sheet
var date = new Date(tweets[i].created_at);
var temp = "[" + date.toUTCString() + "]" + tweets[i].text + " / ";
dataMap.setNew(count + i, temp.toLowerCase(), count + i);
}
}
}
} |
import {PolymerElement, html} from 'https://unpkg.com/@polymer/polymer@next/polymer-element.js?module';
class MyApp extends PolymerElement {
static get properties() { return { mood: String }}
static get template() {
return html`
<style> .mood { color: green; } </style>
Web Components APP are <span class="mood">[[mood]]</span>!
<br>
`;
}
}
customElements.define('my-app', MyApp);
|
myApp.controller('HomepageController', ['$scope', 'pointOfInterestService', '$location', 'myLocalStorageService',
'loginService', '$q', '$rootScope',
function ($scope, pointOfInterestService, $location, myLocalStorageService, loginService, $q,
$rootScope) {
$scope.getPOI = function () {
if(!$rootScope.currentUser || !$rootScope.currentUser.userId) {
return [];
}
pointOfInterestService.getPOICategoryList().then(function (pointOfInterests) {
$scope.pointsOfInterest = [];
setTimeout(function () {
$scope.getUserPOI().then(function () {
setTimeout(function () {
loginService.getUserCategories().then(function (userCategories) {
$scope.firstCategoryPOI = [];
$scope.secondCategoryPOI = [];
pointOfInterests.data.forEach(function (poi) {
if(poi.categoryId === userCategories.data[0].categoryId) {
$scope.firstCategoryPOI.push(poi);
}
if(poi.categoryId === userCategories.data[1].categoryId) {
$scope.secondCategoryPOI.push(poi);
}
});
$scope.firstCategoryPOI = $scope.firstCategoryPOI.slice(0, 2);
$scope.secondCategoryPOI = $scope.secondCategoryPOI.slice(0, 2);
});
}, 0);
});
}, 0);
})
};
$scope.getUserPOI = function () {
return $q(function (resolve, reject) {
pointOfInterestService.getUserPOI().then(function (pointOfInterests) {
$scope.userPointsOfInterest = [];
if (pointOfInterests.data.length > 1) $scope.userPointsOfInterest.push(pointOfInterests.data[pointOfInterests.data.length - 1]);
if (pointOfInterests.data.length > 2) $scope.userPointsOfInterest.push(pointOfInterests.data[pointOfInterests.data.length - 2]);
return resolve();
})
})
};
$scope.goToPOI = function (pointOfInterest) {
$location.path('/point-of-interest/' + pointOfInterest.pointOfInterestId);
};
$scope.getPOI();
}]); |
module.exports = {
dest: 'dist',
base: '/interviewBooks/',
title: '面试宝典',
description: '把面试的知识点整合一遍',
themeConfig: {
nav: [],
sidebar: [
{
title: 'css篇:',
collapsable: false,
children: [
'css/',
'css/bfc',
'css/css3',
'css/compatible'
]
},
{
title: 'js基础',
collapsable: false,
children: [
'javascript/',
'javascript/basicWriteExam',
'javascript/algorithmExam',
'javascript/es6',
'javascript/typeScript'
]
},
{
title: 'html篇',
collapsable: false,
children: [
'html/'
]
},
{
title: '前端构建工具',
collapsable: false,
children: [
'buildTools/',
'buildTools/git'
]
},
{
title: '框架相关提问',
collapsable: false,
children: [
'frame/',
'frame/vue'
]
},
{
title: 'tcp',
collapsable: false,
children: [
'tcp/',
'tcp/proxy',
'tcp/security',
'tcp/http'
]
}
]
}
} |
/* eslint-disable */
import React, { useState, useEffect } from "react";
import LoadingOverlay from "react-loading-overlay";
import { useSelector, useDispatch } from "react-redux";
import { SpinnerCircular } from "spinners-react";
import {
getProductsAPICreator,
selectProductCreator,
resetStatusCreator,
resetProductCreator,
} from "../redux/actions/products";
const LoadingIndicator = () => {
const { isPending, productBasedPage, products } = useSelector(
(state) => state.products
);
return (
<>
<h5
style={{
textAlign: "center",
height: "30px",
marginTop: products.length == 0 ? "30vmin" : 0,
}}>
{isPending && products.length == 0 ? (
<SpinnerCircular
secondaryColor='transparent'
thickness={50}
style={{
color: "#57cad5",
}}
size='20%'
/>
) : isPending && products.length > 0 ? (
<i className='fa fa-spinner fa-spin fa-lg fa-fw'></i>
) : !isPending && products.length == 0 ? (
"Empty"
) : !isPending && productBasedPage.length == 0 ? (
"Finish"
) : null}
</h5>
</>
);
};
const FetchMoreData = (props) => {
const { isPending, productBasedPage } = useSelector(
(state) => state.products
);
return (
<div className='fetchmore'>
<button
onClick={props.fetchMore}
style={{
border: "none",
outline: "none",
backgroundColor: "#57cad5",
fontSize: "15px",
padding: "5px",
borderRadius: "5px",
width: "50%",
color: "#FFFFFF",
}}>
{isPending ? (
<i className='fa fa-spinner fa-spin fa-fw'></i>
) : productBasedPage.length ? (
"See more product"
) : (
"Finish"
)}
</button>
</div>
);
};
const Main = (props) => {
const {
products,
productsOrdered,
isPending,
statusPost,
keyword,
statusGet,
productBasedPage,
statusUpdate,
} = useSelector((state) => state.products);
// const [page, setPage] = useState(1)
const { price, time, category } = useSelector((state) => state.filter);
const dispatch = useDispatch();
useEffect(() => {
let categoryId;
if (Number(category) === 0) {
categoryId = "";
} else {
categoryId = category;
}
props.setPage(1);
dispatch(resetProductCreator());
dispatch(getProductsAPICreator("", price, time, categoryId, 1));
}, []);
const fetchMore = () => {
console.log(keyword);
let categoryId;
if (Number(category) === 0) {
categoryId = "";
} else {
categoryId = category;
}
dispatch(
getProductsAPICreator(keyword, price, time, categoryId, props.page + 1)
);
if (statusGet === 200) {
props.setPage(props.page + 1);
dispatch(resetStatusCreator());
}
};
const handleScroll = (e) => {
const bottom =
e.target.scrollHeight - e.target.scrollTop === e.target.clientHeight;
if (
bottom &&
!isPending &&
productBasedPage.length &&
Number(window.innerWidth) > 768
) {
let categoryId;
if (Number(category) === 0) {
categoryId = "";
} else {
categoryId = category;
}
dispatch(
getProductsAPICreator(keyword, price, time, categoryId, props.page + 1)
);
if (statusGet === 200) {
props.setPage(props.page + 1);
dispatch(resetStatusCreator());
}
}
};
const [load, setLoading] = useState(false);
useEffect(() => {
if (statusUpdate === 200) {
setLoading(true);
setTimeout(() => {
setLoading(false);
}, 5000);
}
}, [statusUpdate]);
// console.log(window.innerWidth);
return (
<div className='main' onScroll={handleScroll}>
<LoadingOverlay
styles={{ height: "100vh" }}
active={load}
spinner
text='Wait please...'>
{products.length ? (
<div
className='row'
style={{
position: "relative",
}}>
{products.map((product, index) => {
return (
<div
key={index.toString()}
className='col-6 col-sm-4 col-md-4 col-lg-4 col-xl-4'>
<div className='card bg-transparent'>
<img
src={
product.product_image.split("")[0] === "/"
? `${process.env.REACT_APP_API_URL}${product.product_image}`
: product.product_image
}
className='card-img-top'
alt=''
/>
<div className='card-img-overlay'>
<label className='container1' title='Click for order'>
<input
type='checkbox'
value={product.product_id}
name={product.product_name}
onChange={(e) => {
dispatch(selectProductCreator(e));
}}
checked={
productsOrdered.find((item) => {
return item.product_id === product.product_id;
})
? true
: false
}
/>
<span className='checkmark'></span>
</label>
</div>
<div className='card-body'>
<p className='card-title'>{product.product_name}</p>
<p className='card-text'>Rp {product.product_price}</p>
</div>
</div>
</div>
);
})}
<FetchMoreData fetchMore={fetchMore} />
</div>
) : null}
<LoadingIndicator />
{/* {Number(window.innerWidth) > 768?(<LoadingIndicator />):null} */}
</LoadingOverlay>
{/* <FetchMoreData fetchMore={fetchMore} /> */}
</div>
);
};
export default Main;
|
export function clearError() {
return {
type: "ERROR_CLEAR",
payload: {}
}
}
|
/**
* L-Systems
*
* JavaScript Canvas 04/03/09
* @author Kevin Roast kevtoast at yahoo.com
* Updated: 16th July 2012
*
* TODO:
* . more colour options
* . inc/dec iterations buttons
*/
/**
* Globals and helper functions
*/
var HEIGHT;
var WIDTH;
var g_renderer;
var g_commands;
/**
* Window body onload handler
*/
window.addEventListener('load', onloadHandler, false);
function onloadHandler()
{
// bind ENTER key handler to Start button
document.onkeyup = function(event)
{
var keyCode = (event === null ? window.event.keyCode : event.keyCode);
if (keyCode === 13)
{
startHandler();
}
};
}
/**
* Form button Start handler
*/
function startHandler()
{
var canvas = document.getElementById('canvas');
HEIGHT = canvas.height;
WIDTH = canvas.width;
document.getElementById('start').disabled = true;
document.getElementById('lsystems').style.cursor = "wait";
updateStatus("Generating command string...", generateCmdString);
}
/**
* L-Systems processing steps
*/
function generateCmdString()
{
// collect up Form input data required by the processor
try
{
var lsys = new LSystems.LSystemsProcessor();
lsys.iterations = parseInt(document.getElementById('iterations').value);
lsys.axiom = document.getElementById('axiom').value;
for (var i=1; i<=5; i++)
{
var rule = document.getElementById('rule' + i).value;
if (rule && rule.length !== 0)
{
lsys.addRule(rule);
}
}
// generate the cmd string
var before = new Date();
g_commands = lsys.generate();
var after = new Date();
updateStatus("Commands: " + g_commands.length + " in " + (after - before) + "ms. Calculating offsets...", calcOffsets);
}
catch (e)
{
alert("Error during LSystemsProcessor.generate()\n" + e);
resetUI("按 开始渲染生成按钮 开始渲染");
}
}
function calcOffsets()
{
try
{
// calc offset bounding box before render
g_renderer = new LSystems.TurtleRenderer(WIDTH, HEIGHT);
g_renderer.setAngle(parseInt(document.getElementById('angle').value));
g_renderer.setConstants(document.getElementById('constants').value);
g_renderer.setRenderLineWidths(document.getElementById('linewidths').checked);
var before = new Date();
g_renderer.process(g_commands, false);
var after = new Date();
updateStatus("Calculated boundry in " + (after - before) + "ms. Rendering...", renderCmds);
}
catch (e)
{
alert("Error during TurtleRenderer.process()\n" + e);
resetUI("按 开始渲染生成按钮 开始渲染");
}
}
function renderCmds()
{
try
{
// calc new distance based on screen res
var oldDistance = 10.0;
var newDistance;
var dim = g_renderer.getMinMaxValues();;
if (dim.maxx - dim.minx > dim.maxy - dim.miny)
{
// X has the largest delta - use that
newDistance = (WIDTH / (dim.maxx - dim.minx)) * oldDistance;
}
else
{
// Y has the largest delta - use that
newDistance = (HEIGHT / (dim.maxy - dim.miny)) * oldDistance;
}
// calc rendering offsets
// scale min/max values by new distance
dim.minx *= (newDistance / oldDistance);
dim.maxx *= (newDistance / oldDistance);
dim.miny *= (newDistance / oldDistance);
dim.maxy *= (newDistance / oldDistance);
var xoffset = (WIDTH / 2) - (((dim.maxx - dim.minx) / 2) + dim.minx);
var yoffset = (HEIGHT / 2) - (((dim.maxy - dim.miny) / 2) + dim.miny);
// reprocess...
g_renderer.setOffsets(xoffset, yoffset);
g_renderer.setAngle(parseInt(document.getElementById('angle').value));
g_renderer.setDistance(newDistance);
var before = new Date();
g_renderer.process(g_commands, true);
var after = new Date();
// completed
resetUI("用时 " + (after - before) + "秒完成渲染!");
}
catch (e)
{
alert("Error during TurtleRenderer.process(draw)\n" + e);
resetUI("Press Start to begin.");
}
}
function resetUI(msg)
{
g_renderer = null;
g_commands = null;
updateStatus(msg);
document.getElementById('lsystems').style.cursor = "";
document.getElementById('start').disabled = false;
}
function updateStatus(msg, fn)
{
document.getElementById('status').innerHTML = msg;
if (fn)
{
setTimeout(fn, 0);
}
}
var examples =
[
[
// Heighway Dragon
12, 90, "", "FX", "X=X+YF+", "Y=-FX-Y"
],
[
// Koch Curve
4, 90, "", "-F", "F=F+F-F-F+F"
],
[
// Kevs Tree
5, 22, "", "F", "F=C0FF-[C1-F+F+F]+[C2+F-F-F]"
],
[
// Kevs Wispy Tree
5, 25, "", "FX", "F=C0FF-[C1-F+F]+[C2+F-F]", "X=C0FF+[C1+F]+[C3-F]"
],
[
// Kevs Pond Weed
5, 27, "", "F", "F=C0FF[C1-F++F][C2+F--F]C3++F--F"
],
[
// Sierpinski triangle (curves)
7, 60, "", "A", "A=B-A-B", "B=A+B+A"
],
[
// Sierpinski triangle (triangles)
6, 120, "", "F-G-G", "F=F-G+F+G-F", "G=GG"
],
[
// Dragon Curve
10, 90, "F", "FX", "X=X+YF", "Y=FX-Y"
],
[
// Fractal Plant
6, 25, "X", "X", "X=C0F-[C2[X]+C3X]+C1F[C3+FX]-X", "F=FF"
],
[
// Koch Snowflake
4, 60, "X", "F++F++F", "F=F-F++F-F", "X=FF"
],
[
// Pleasant Error
4, 72, "", "F-F-F-F-F", "F=F-F++F+F-F-F"
],
[
// Sierpinski's Carpet
4, 90, "", "F", "F=F+F-F-F-G+F+F+F-F", "G=GGG"
],
[
// Space Filling Curve
6, 90, "XY", "X", "X=-YF+XFX+FY-", "Y=+XF-YFY-FX+"
],
[
// Sierpinski Median Curve
8, 45, "", "L--F--L--F", "L=+R-F-R+", "R=-L+F+L-"
],
[
// Lace
6, 30, "", "W", "W=+++X--F--ZFX+", "X=---W++F++YFW-", "Y=+ZFX--F--Z+++", "Z=-YFW++F++Y---"
],
[
// Joined Cross Curves
3, 90, "F", "XYXYXYX+XYXYXYX+XYXYXYX+XYXYXYX", "F=", "X=FX+FX+FXFY-FY-", "Y=+FX+FXFY-FY-FY"
],
[
// Penrose Tiling
5, 36, "6 7 8 9", "[7]++[7]++[7]++[7]++[7]", "6=81++91----71[-81----61]++", "7=+81--91[---61--71]+", "8=-61++71[+++81++91]-", "9=--81++++61[+91++++71]--71", "1="
]
];
function example(i)
{
if (!document.getElementById('start').disabled)
{
document.getElementById('iterations').value = examples[i][0];
document.getElementById('angle').value = examples[i][1];
document.getElementById('constants').value = examples[i][2];
document.getElementById('axiom').value = examples[i][3];
for (var n=1; n<=5; n++)
{
var rule = examples[i][3 + n];
document.getElementById('rule' + n).value = (rule ? rule : "");
}
startHandler();
}
}
/**
* LSystems root namespace.
*
* @namespace LSystems
*/
if (typeof LSystems == "undefined" || !LSystems)
{
var LSystems = {};
}
// Public constants
const ANTICLOCK = '+';
const CLOCKWISE = '-';
const PUSH = '[';
const POP = ']';
const COLOUR = 'C';
const RAD = Math.PI/180.0;
/**
* TurtleRenderer class
*
* @namespace LSystems
* @class LSystems.TurtleRenderer
*/
(function()
{
LSystems.TurtleRenderer = function(width, height)
{
if (width !== undefined && width !== null)
{
this._width = width;
}
if (height !== undefined && height !== null)
{
this._height = height;
}
this._colourList = ["rgba(140, 80, 60, 0.75)", "rgba(24, 180, 24, 0.75)", "rgba(48, 220, 48, 0.5)", "rgba(64, 255, 64, 0.5)"];
this._constants = [];
return this;
};
LSystems.TurtleRenderer.prototype =
{
/**
* Rendering area width
*
* @property _width
* @type number
*/
_width: 0,
/**
* Rendering area height
*
* @property _height
* @type number
*/
_height: 0,
/**
* Rendering X coordinate offset
*
* @property _xOffset
* @type number
*/
_xOffset: 0,
/**
* Rendering Y coordinate offset
*
* @property _yOffset
* @type number
*/
_yOffset: 0,
/**
* Rendering distance units per forward turtle movement (default 10)
*
* @property _distance
* @type number
*/
_distance: 10,
/**
* Turning angle in degrees to use per turtle rotation (default 30.0)
*
* @property _angle
* @type number
*/
_angle: 30,
/**
* Minimum X coordinate reached during last processing phase
*
* @property _minx
* @type number
*/
_minx: 0,
/**
* Minimum Y coordinate reached during last processing phase
*
* @property _miny
* @type number
*/
_miny: 0,
/**
* Maximum X coordinate reached during last processing phase
*
* @property _maxx
* @type number
*/
_maxx: 0,
/**
* Maximum Y coordinate reached during last processing phase
*
* @property _maxy
* @type number
*/
_maxy: 0,
/**
* The maximum stack depth reached during processing
*
* @property _maxStackDepth
* @type number
*/
_maxStackDepth: 0,
/**
* Rendering stack
*
* @property _stack
* @type object
*/
_stack: null,
/**
* Colour list
*
* @property _colourList
* @type object
*/
_colourList: null,
/**
* Constant values to ignore during turtle rendering
*
* @property _constants
* @type Array
*/
_constants: null,
/**
* Render line width based on stack depth
*
* @property _renderLineWidths
* @type boolean
*/
_renderLineWidths: true,
/**
* Set rendering distance units per forward turtle movement.
*
* @method setDistance
* @param distance {number} Distance units per forward turtle movement
* @return {LSystems.TurtleRenderer} returns 'this' for method chaining
*/
setDistance: function setDistance(distance)
{
this._distance = distance;
return this;
},
/**
* Set turning angle in degrees to use per turtle rotation.
*
* @method setDistance
* @param angle {number} Turning angle in degrees to use per turtle rotation
* @return {LSystems.TurtleRenderer} returns 'this' for method chaining
*/
setAngle: function setAngle(angle)
{
this._angle = angle;
return this;
},
setRenderLineWidths: function setRenderLineWidths(val)
{
this._renderLineWidths = val;
},
/**
* Return the min/max coordinate values reached during last processing run.
*
* @method getMinMaxValues
* @return {LSystems.Dimension} representing the min/max coordinate values.
*/
getMinMaxValues: function getMinMaxValues()
{
return new LSystems.Dimension(this._minx, this._miny, this._maxx, this._maxy);
},
/**
* Set the x/y coordinate offsets for coordinate translation during rendering.
*
* @method setOffsets
* @param xOffset {number} x coord offset
* @param yOffset {number} y coord offset
*/
setOffsets: function(xOffset, yOffset)
{
if (xOffset !== undefined && xOffset !== null)
{
this._xOffset = xOffset;
}
if (yOffset !== undefined && yOffset !== null)
{
this._yOffset = yOffset;
}
},
setConstants: function(constants)
{
this._constants = [];
if (constants && constants.length !== 0)
{
for (var i=0; i<constants.length; i++)
{
var c = constants.charAt(i);
if (c != ' ' && c != ',')
{
this._constants[c] = true;
}
}
}
},
/*
* Process the command string and render
*
* @method process
* @param cmds {string} string of valid command characters
* @param draw {boolean} True if the turtle should draw, false otherwise
*/
process: function process(cmds, draw)
{
this._stack = [];
var angle = this._angle;
var distance = this._distance;
var lastX;
var lastY;
if (draw)
{
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
// clear the background
ctx.save();
ctx.fillStyle = "rgb(255,255,255)";
ctx.fillRect(0, 0, WIDTH, HEIGHT);
// offset as required
ctx.translate(this._xOffset, 0);
// initial colour if specific colouring not used
ctx.strokeStyle = "rgb(0,0,0)";
}
// start at grid 0,0 facing north with no colour index
var pos = new LSystems.Location(0.0, 0.0, 90.0, -1);
// process each command in turn
var yOffset = this._yOffset, maxStackDepth = this._maxStackDepth;
var colourList = this._colourList, stack = this._stack;
var renderLineWidths = this._renderLineWidths;
var rad, width, colour, lastColour = null;
var c, len = cmds.length;
for (var i=0; i<len; i++)
{
c = cmds.charAt(i);
switch (c)
{
case COLOUR:
{
// get colour index from next character
pos.colour = (cmds.charAt(++i) - '0');
break;
}
case ANTICLOCK:
{
pos.heading += angle;
break;
}
case CLOCKWISE:
{
pos.heading -= angle;
break;
}
case PUSH:
{
stack.push(new LSystems.Location(pos.x, pos.y, pos.heading, pos.colour));
break;
}
case POP:
{
pos = stack.pop();
break;
}
default:
{
if (!this._constants[c])
{
lastX = pos.x;
lastY = pos.y;
// move the turtle
rad = pos.heading * RAD;
pos.x += distance * Math.cos(rad);
pos.y += distance * Math.sin(rad);
if (draw)
{
// render this element
if (renderLineWidths)
{
width = (maxStackDepth - stack.length);
ctx.lineWidth = width >= 1 ? width : 1;
}
colour = colourList[pos.colour];
if (colour && lastColour !== colour)
{
ctx.strokeStyle = colour;
lastColour = colour;
}
ctx.beginPath();
ctx.moveTo(lastX, HEIGHT - (lastY + yOffset));
ctx.lineTo(pos.x, HEIGHT - (pos.y + yOffset));
ctx.closePath();
ctx.stroke();
}
else
{
// remember min/max position
if (pos.x < this._minx) this._minx = pos.x;
else if (pos.x > this._maxx) this._maxx = pos.x;
if (pos.y < this._miny) this._miny = pos.y;
else if (pos.y > this._maxy) this._maxy = pos.y;
if (stack.length > this._maxStackDepth) this._maxStackDepth = stack.length;
}
}
break;
}
}
}
// finalise rendering
if (draw)
{
ctx.restore();
}
}
};
})();
/**
* LSystemsProcessor class
*
* @namespace LSystems
* @class LSystems.LSystemsProcessor
*/
(function()
{
LSystems.LSystemsProcessor = function()
{
this.rules = [];
return this;
};
LSystems.LSystemsProcessor.prototype =
{
/**
* Number of iterations to perform
*
* @property iterations
* @type number
*/
iterations: 1,
/**
* Root axiom
*
* @property axiom
* @type string
*/
axiom: null,
/**
* Array of rules to process
*
* @property rules
* @type Array
*/
rules: null,
/**
* Add a rule to the processor.
*
* @method process
* @param rule {string} Rules must be of form: F=FX
*/
addRule: function addRule(rule)
{
if (rule.length < 2 || rule.charAt(1) !== '=')
{
throw "Rule must be of form: F=FX";
}
var rulePart = "";
if (rule.length > 2)
{
rulePart = rule.substring(2);
}
this.rules[rule.charAt(0)] = rulePart;
},
/**
* Generate the l-system command string based on the axiom, rules and number of iterations to perform.
*
* @method process
*/
generate: function generate()
{
var ruleCount = this.rules.length;
var axiom = null;
var result = null;
// process for each iteration
for (var i = 0; i < this.iterations; i++)
{
if (i == 0)
{
// start with user defined root axiom
axiom = this.axiom;
}
else
{
// use last result as new axiom
axiom = result.toString();
}
result = new StringBuffer();
// process each character of the Axiom
for (var c, len = axiom.length, rule, rules=this.rules, n=0; n<len; n++)
{
c = axiom.charAt(n);
// TODO: try array/strings etc.
rule = rules[c];
result.append(rule != null ? rule : c);
if (result.length() > 100000000)
{
throw "Generated command string too large! 100,000,000 commands max.";
}
}
}
return result.toString();
}
};
})();
/**
* Location structure class - all fields are public.
*
* @namespace LSystems
* @class LSystems.Location
*/
(function()
{
LSystems.Location = function(x, y, heading, colour)
{
this.x = x;
this.y = y;
this.heading = heading;
this.colour = colour;
return this;
};
LSystems.Location.prototype =
{
/**
* X coordinate
*
* @property x
* @type number
*/
x: 0,
/**
* Y coordinate
*
* @property y
* @type number
*/
y: 0,
/**
* Heading angle
*
* @property heading
* @type number
*/
heading: 0,
/**
* Colour index
*
* @property colour
* @type number
*/
colour: 0
};
})();
/**
* Dimension structure class - all fields are public.
*
* @namespace LSystems
* @class LSystems.Dimension
*/
(function()
{
LSystems.Dimension = function(minx, miny, maxx, maxy)
{
this.minx = minx;
this.miny = miny;
this.maxx = maxx;
this.maxy = maxy;
return this;
};
LSystems.Dimension.prototype =
{
/**
* Minimum X coordinate
*
* @property minx
* @type number
*/
minx: 0,
/**
* Minimum Y coordinate
*
* @property miny
* @type number
*/
miny: 0,
/**
* Maximum X coordinate
*
* @property heading
* @type number
*/
maxx: 0,
/**
* Maximum Y coordinate
*
* @property miny
* @type number
*/
maxy: 0
};
})();
/**
* StringBuffer object
*/
function StringBuffer(len)
{
this.buffer = len ? new Array(len) : [];
this.count = 0;
return this;
}
StringBuffer.prototype.append = function append(s)
{
this.buffer.push(s);
this.count += s.length;
return this;
};
StringBuffer.prototype.length = function length()
{
return this.count;
};
StringBuffer.prototype.toString = function toString()
{
return this.buffer.join("");
}; |
'use strict';
let fs = require('fs');
let quoteObj = require('../lib/quotes.json');
module.exports = (app) => {
console.log('router called');
// let index = require('../controllers/api.server.controller');
// Get Tadays Quote
app.get('/todaysquote', (req, res) => {
let quoteArr = quoteObj.quotes;
// get random item from array
let todaysQuote = quoteArr[Math.floor(Math.random() * quoteArr.length)];
console.log(todaysQuote);
return res.send(todaysQuote);
});
}
|
var html = require('choo/html')
module.exports = function headerView (state, emit) {
return html`
<header class="header">
<h1>todos</h1>
<input class="new-todo"
autofocus
placeholder="What needs to be done?"
onkeydown=${addTodo}
/>
</header>
`
function addTodo (e) {
if (e.keyCode === 13) {
emit('todo:add', { text: e.target.value })
e.target.value = ''
}
}
}
|
const ModuleFederationPlugin = require('webpack/lib/container/ModuleFederationPlugin');
const path = require('path');
const baseConfig = require('../../webpack.config');
module.exports = baseConfig({
entry: {
index: './test'
},
context: path.join(__dirname, 'src'),
output: {
path: path.join(__dirname, '..', '..', 'dist', 'first-shared'),
filename: '[name].js'
},
plugins: [
new ModuleFederationPlugin({
name: 'first_shared',
filename: 'first-shared.js',
library: { type: 'var', name: 'first_shared' },
exposes: {
'./test': './test.js'
},
})
],
devServer: {
port: '4201'
}
});
|
import Vue from 'vue'
import VueRouter from 'vue-router'
// const shopcart=()=>import shopcart from ""
// 注意这里导入时候和普通的es6写法的区别
const Shopcart=()=>import ("../views/shopcart/Shopcart")
const Category=()=>import ("../views/category/Category")
const Home=()=>import ("../views/home/Home")
const Profile=()=>import ("../views/profile/Profile")
const Detail=()=>import ("../views/detail/Detail")
const Login=()=>import ("../views/login/Login")
const Edit=()=>import ("../views/edit/Edit")
const ConfirmOrder=()=>import ("../views/confirmOrder/ConfirmOrder")
// 1.安装插件
Vue.use(VueRouter)
// 2.创建router
const routes = [
{
path: '',
redirect: '/home'
},
{
path: '/home',
component: Home
},
{
path: '/category',
component: Category
},
{
path: '/shopcart',
component: Shopcart
},
{
path: '/profile',
component: Profile
},
{
path:'/detail/:iid',
component:Detail
},
{
path: '/login',
component: Login
},
{
path: '/edit',
component: Edit
},
{
path: "/confirm",
component: ConfirmOrder
}
]
const router = new VueRouter({
routes,
// base: '/Users/zhouyang/codes/vscodeworkplace/vuemall1/dist/',
mode: 'history'
})
// 若想进入编辑页面需要先登录
router.beforeEach((to,from,next)=>{
// 必须要有token 才放行
if(to.path == '/edit') {
if (sessionStorage.getItem('token')) {
next()
}else {
next('/login')
}
} else {
next() // 这个必须写 不然其它正常页面无法访问
}
})
export default router
|
// $Id$
// vim:ft=javascript
// If your extension references something external, use ARG_WITH
// ARG_WITH("cckeyid", "for cckeyid support", "no");
// Otherwise, use ARG_ENABLE
// ARG_ENABLE("cckeyid", "enable cckeyid support", "no");
cckeyid_source_file="cckeyid.c \
src/cckeyid.c \
src/shm.c \
src/spinlock.c"
if (PHP_CCKEYID != "no") {
EXTENSION("cckeyid", $cckeyid_source_file, PHP_EXTNAME_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
}
|
var
User = require('../models/User.js'),
passport = require('passport'),
async = require('async'),
crypto = require('crypto'),
nodemailer = require('nodemailer')
module.exports = {
home: function(req, res){
res.render('home')
},
error404: function(req,res){
res.render('404')
}
}
|
/* globals describe it expect */
import easingFunction from '../src/easing-function'
describe('easing-function', () => {
it('should throw if easing string is not found', () => {
expect(() => easingFunction('potato')).toThrow(
`Easing must match one of the options defined by https://github.com/chenglou/tween-functions`
)
})
it('should throw if easingFunction not passed a string or function', () => {
expect(() => easingFunction([])).toThrow(`Easing must be of type function or string`)
})
it('should return a function when passed a string', () => {
expect(typeof easingFunction('easeInOutBack')).toBe('function')
})
it('should return the same function when passed a function', () => {
const easing = () => console.log('hello world')
expect(easingFunction(easing)).toBe(easing)
})
})
|
import {combineReducers} from 'redux';
import { routerReducer} from 'react-router-redux';
//TODO : add reducers
const rootReducer = combineReducers({
//reducers
routing: routerReducer
});
export default rootReducer; |
import React from "react";
import "./footer.css";
import { Link } from "gatsby"
const Footer = () => (
<footer className="footer">
<div className="width footer-container">
<Link className="header-li-a" to='/'>Плеханова и Ⓒ</Link>
<nav>
<ul className="footer-ul">
{/*<li className="footer-li">VK</li>*/}
{/*<li className="footer-li">FACEBOOK</li>*/}
{/*<li className="footer-li">INST</li>*/}
</ul>
</nav>
</div>
</footer>
)
export default Footer
|
import React from 'react';
import Button from './Button';
const TodoListSummary = ({
remaining,
filter,
onSetFilter,
onClearCompleted }) => {
let word = remaining.length === 1 ? 'item' : 'items';
return (
<div className="TodoList__summary">
<div>
{remaining.length} {word} left
</div>
<div>
<Button
id="filter-all"
currentFilter={filter}
onSetFilter={onSetFilter}>All</Button>
<Button
id="filter-active"
currentFilter={filter}
filterToSet="active"
onSetFilter={onSetFilter}>Active</Button>
<Button
id="filter-completed"
currentFilter={filter}
filterToSet="completed"
onSetFilter={onSetFilter}>Completed</Button>
</div>
<div>
<button
className="TodoList__clear"
onClick={onClearCompleted}
>
Clear completed
</button>
</div>
</div>
)
}
export default TodoListSummary; |
/**
* 国家列表
*/
const COUNTRIES = {
country1: {
name: "中国",
provinces: {
province1: "北京市",
province2: "上海市",
province3: "天津市",
province4: "重庆市",
province5: "河北省",
province6: "山西省",
province7: "陕西省",
province8: "内蒙古",
province9: "辽宁省",
province10: "吉林省",
province11: "黑龙江省",
province12: "江苏省",
province13: "浙江省",
province14: "安徽省",
province15: "福建省",
province16: "江西省",
province17: "山东省",
province18: "河南省",
province19: "湖北省",
province20: "湖南省",
province21: "广东省",
province22: "广西",
province23: "海南省",
province24: "四川省",
province25: "贵州省",
province26: "云南省",
province27: "西藏",
province28: "甘肃省",
province29: "青海省",
province30: "宁夏",
province31: "台湾省",
province32: "新疆",
province33: "香港",
province34: "澳门"
}
},
country2: "蒙古",
country3: "朝鲜",
country4: "韩国",
country5: "日本",
country6: "菲律宾",
country7: "越南",
country8: "老挝",
country9: "柬埔寨",
country10: "缅甸",
country11: "泰国",
country12: "马来西亚",
country13: "文莱",
country14: "新加坡",
country15: "印度尼西亚",
country16: "东帝汶",
country17: "尼泊尔",
country18: "不丹",
country19: "孟加拉",
country20: "印度",
country21: "巴基斯坦",
country22: "斯里兰卡",
country23: "马尔代夫",
country24: "哈萨克斯坦",
country25: "吉尔吉斯斯坦",
country26: "塔吉克斯坦",
country27: "乌兹别克斯坦",
country28: "土库曼斯坦",
country29: "阿富汗",
country30: "伊拉克",
country31: "伊朗",
country32: "叙利亚",
country33: "约旦",
country34: "黎巴嫩",
country35: "以色列",
country36: "巴勒斯坦",
country37: "沙特阿拉伯",
country38: "巴林",
country39: "卡塔尔",
country40: "科威特",
country41: "阿联酋",
country42: "阿曼",
country43: "也门",
country44: "格鲁吉亚",
country45: "亚美尼亚",
country46: "阿塞拜疆",
country47: "土耳其",
country48: "塞浦路斯",
country49: "芬兰",
country50: "瑞典",
country51: "挪威",
country52: "冰岛",
country53: "丹麦",
country54: "爱沙尼亚",
country55: "拉脱维亚",
country56: "立陶宛",
country57: "白俄罗斯",
country58: "俄罗斯",
country59: "乌克兰",
country60: "摩尔多瓦",
country61: "波兰",
country62: "捷克",
country63: "斯洛伐克",
country64: "匈牙利",
country65: "德国",
country66: "奥地利",
country67: "瑞士",
country68: "列支敦士登",
country69: "英国",
country70: "爱尔兰",
country71: "荷兰",
country72: "比利时",
country73: "卢森堡",
country74: "法国",
country75: "摩纳哥",
country76: "罗马尼亚",
country77: "保加利亚",
country78: "尼日利亚",
country79: "塞尔维亚",
country80: "马其顿",
country81: "阿尔巴尼亚",
country82: "希腊",
country83: "斯洛文尼亚",
country84: "克罗地亚",
country85: "波斯尼亚和黑塞哥维那",
country86: "意大利",
country87: "梵蒂冈",
country88: "圣马力诺",
country89: "马耳他",
country90: "西班牙",
country91: "葡萄牙",
country93: "埃及",
country94: "利比亚",
country95: "苏丹",
country96: "突尼斯",
country97: "阿尔及利亚",
country98: "摩洛哥",
country101: "埃塞俄比亚",
country102: "厄立特里亚",
country103: "索马里",
country104: "吉布提",
country105: "肯尼亚",
country106: "坦桑尼亚",
country107: "乌干达",
country108: "卢旺达",
country109: "布隆迪",
country110: "塞舌尔",
country111: "乍得",
country112: "中非",
country113: "喀麦隆",
country114: "赤道几内亚",
country115: "加蓬",
country116: "刚果(布)",
country117: "刚果(金)",
country118: "圣多美和普林西比",
country119: "毛里塔尼亚",
country121: "塞内加尔",
country122: "冈比亚",
country123: "马里",
country124: "布基纳法索",
country125: "几内亚",
country127: "佛得角",
country128: "塞拉利昂",
country129: "利比里亚",
country130: "科特迪瓦",
country131: "加纳",
country132: "多哥",
country133: "贝宁",
country134: "尼日尔",
country136: "赞比亚",
country137: "安哥拉",
country138: "津巴布韦",
country139: "马拉维",
country140: "莫桑比克",
country141: "博茨瓦纳",
country142: "纳米比亚",
country143: "南非",
country144: "斯威士兰",
country145: "莱索托",
country146: "马达加斯加",
country147: "科摩罗",
country148: "毛里求斯",
country149: "留尼汪",
country151: "澳大利亚",
country152: "新西兰",
country153: "巴布亚新几内亚",
country154: "所罗门群岛",
country155: "瓦努阿图",
country156: "密克罗尼西亚",
country157: "马绍尔群岛",
country158: "帕劳",
country159: "瑙鲁",
country160: "基里巴斯",
country161: "图瓦卢",
country162: "萨摩亚",
country163: "斐济",
country164: "汤加",
country165: "库克群岛",
country166: "关岛",
country167: "新喀里多尼亚",
country168: "法属波利尼西亚",
country170: "瓦利斯和富图纳",
country171: "纽埃",
country172: "托克劳",
country173: "美属萨摩亚",
country174: "北马里亚纳",
country175: "加拿大",
country176: "美国",
country177: "墨西哥",
country178: "格陵兰",
country179: "危地马拉",
country180: "伯利兹",
country181: "萨尔瓦多",
country182: "洪都拉斯",
country183: "尼加拉瓜",
country184: "哥斯达黎加",
country185: "巴拿马",
country186: "巴哈马",
country187: "古巴",
country188: "牙买加",
country189: "海地",
country190: "多米尼加",
country191: "安提瓜和巴布达",
country192: "圣基茨和尼维斯",
country193: "多米尼克",
country194: "圣卢西亚",
country195: "圣文森特和格林纳丁斯",
country196: "格林纳达",
country197: "巴巴多斯",
country198: "特立尼达和多巴哥",
country199: "波多黎各",
country200: "英属维尔京群岛",
country201: "美属维尔京群岛",
country202: "安圭拉",
country204: "瓜德罗普",
country205: "马提尼克",
country206: "荷属安的列斯",
country207: "阿鲁巴",
country208: "特克斯和凯科斯群岛",
country209: "开曼群岛",
country210: "百慕大",
country211: "哥伦比亚",
country212: "委内瑞拉",
country213: "圭亚那",
country214: "法属圭亚那",
country215: "苏里南",
country216: "厄瓜多尔",
country217: "秘鲁",
country218: "玻利维亚",
country219: "巴西",
country220: "智利",
country221: "阿根廷",
country222: "乌拉圭",
country223: "黑山",
country224: "巴拉圭"
};
export {
COUNTRIES
} |
var employmentController = candidateInformation.controller("employmentController", ['$scope', 'cifService', '$state', function ($scope, cifService, $state) {
$scope.candidate = {};
angular.copy(cifService.candidate, $scope.candidate);
if (angular.isUndefined($scope.candidate.employmentDetails)) {
$scope.candidate.employmentDetails = {};
$scope.candidate.employmentDetails.employers = [{}]
}
$scope.addEmployer = function () {
$scope.candidate.employmentDetails.employers.push({});
angular.element(function () {
$('select').material_select();
initializeDatepicker();
})
}
$scope.submitForm = function () {
cifService.candidate = $scope.candidate;
localStorage.setItem("cifFormData", JSON.stringify($scope.candidate));
$state.go('home');
}
function initializeDatepicker() {
$('.datepicker').pickadate({
selectMonths: true, // Creates a dropdown to control month
selectYears: 30, // Creates a dropdown of 30 years to control year,
today: 'Today',
clear: 'Clear',
close: 'Ok',
closeOnSelect: true, // Close upon selecting a date,
max: new Date(),
format: 'dd-mm-yyyy'
});
}
angular.element(function () {
$('select').material_select();
initializeDatepicker();
});
}]) |
/* ============
* State of the cars module
* ============
*
* The initial state of the cars module.
*/
import { today } from '@/helpers/utils'
export default {
cars: [],
bookedCars: [],
maxSpeedItems: [],
runItems: [],
speedValue: null,
runValue: null,
isLoading: false,
currentDate: today()
}
|
(function () {
var replayModule = angular.module('gameReplay', ['ngCookies']);
replayModule.controller('replayController', ['$scope', '$http', '$cookies', '$window', '$timeout', '$interval',
function ($scope, $http, $cookies, $window, $timeout, $interval) {
$scope.renderer = {};
$scope.currentTurn = -1;
$scope.setupRenderer = function() {
var directionalLight = new THREE.DirectionalLight(0xffffff, 0.9);
directionalLight.position.set(0, 0.5, -1);
$scope.renderer.TJS.addSceneObject(directionalLight);
$scope.renderer.TJS.resize($window.innerWidth, $window.innerHeight);
angular.element($window).on('resize', function () {
$scope.renderer.TJS.resize($window.innerWidth, $window.innerHeight);
}
);
cameracontroller($scope.renderer.TJS);
$scope.renderer.TJS.render();
};
$scope.setupBoard = function() {
$http.get('/api/game-replay/'+$cookies.get('gameid')).then(function(response){
console.log(response.data);
var data = response.data;
if( data.success === false ){
return;
}
var gameObject = response.data.game;
$scope.currentTurn = gameObject.turnCounter;
console.log('Error', data.error);
$scope.game = gameObject;
var map = gameObject.map;
var hexBoard = hexagonboard(map);
hexBoard.sceneObject.children.forEach( function(tile) {
tile.userData.oldColor = tile.material.color.clone();
});
$scope.renderer.TJS.addSceneObject(hexBoard.sceneObject);
$scope.message('Game Updated');
});
};
$scope.simulateMove = function(move){
var hexagons = $scope.renderer.TJS.getSceneObject('hexagons');
var tile = hexagons.children.find( function(tile) { return (tile.userData.x == move.x && tile.userData.y == move.y)});
if( !tile ) {
console.log('tile not found for move', move);
return;
}
let tileObject = planeGenerator.tile(move);
tileObject.name = 'move';
tile.add(tileObject);
tile.material.color.set(tile.userData.oldColor);
};
$scope.advanceTurn = function(delta) {
$scope.currentTurn += delta;
$scope.clearMoves();
$scope.game.moveList.every(function(moveObject, index){
console.log('turn', index, moveObject);
if( index >= $scope.currentTurn )
return false;
moveObject.moves.forEach( function(move) {
$scope.simulateMove(move);
});
return true;
});
};
$scope.clearMoves = function() {
$scope.game.map.data.forEach(function(tile){
if( tile.move )
delete tile['move'];
});
var hexagons = $scope.renderer.TJS.getSceneObject('hexagons');
hexagons.children.forEach(function(hex){
if( hex.getObjectByName('move') ){
//reset color
hex.remove(hex.getObjectByName('move'));
var color = '#000000';
if( hex.userData.type == 1 ) color = '#6688dd';
else if( hex.userData.type == 2 ) color = '#efde8d';
hex.material.color.setStyle( color );
}
});
}
}
]);
replayModule.directive('gameBoard', ['$window', function ($window) {
return {
restrict: 'E',
transclude: true,
templateUrl: '/templates/replayboard.html',
link: function (scope, element) {
console.log('Setting up Samurai..');
scope.renderer.TJS = tjs();
scope.renderer.TJS.setDomElement(element[0]);
scope.setupRenderer();
scope.setupBoard();
}
};
}]);
})(); |
import mongoose from 'mongoose'
// Defining user Mongoose Schema
const UserAuditSchema = new mongoose.Schema({
actionBy: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
unique: false,
required: false,
dropDups: true
},
actionFor: {
type: mongoose.Schema.Types.ObjectId,
ref: 'User',
unique: false,
required: true,
dropDups: true
},
action: {type: String, unique: false, required: true, dropDups: true},
date: {type: Date, required: true, default: Date.now},
});
UserAuditSchema.set('toJSON', {getters: true});
module.exports = mongoose.model('UserAudit', UserAuditSchema)
|
import {createContext} from 'react'
// Tracks if game has ended or not.
const GameContext = createContext(false);
export default GameContext; |
/*--------------------------------------------
Author: © - Anna Drevikovska | 2016-03-12 | ver. 1.0.0
Changing sizes of the logo on mouseover and mouseleave mouse events when the browser width
is 650 or more
Not used! Only kept for possible later usage or updates
---------------------------------------------*/
if ($("body").innerWidth() >= 650) {
$('.logo').mouseover(function() {
if ($(this).hasClass('logo')) {
$(this).removeClass('logo').addClass('logo-new');
}
});
$('.logo').mouseleave(function() {
if ($(this).hasClass('logo-new')) {
$(this).removeClass('logo-new').addClass('logo');
}
});
} |
(function ($,X) {
X.prototype.controls.widget("Uploader", function (controlType) {
var BaseControl = X.prototype.controls.getControlClazz("BaseControl");
function Uploader(elem, options){
BaseControl.call(this,elem,options);
this.init();
}
X.prototype.controls.extend(Uploader,"BaseControl");
Uploader.prototype.constructor = Uploader;
Uploader.prototype.preProps = function() {
this.files = this.options.files || [] //all files that to be render
this.uploaderFiles = []
this.renderType = ['renderImg', 'renderFile']
this.dataWrap = this.elem
this.needUpload = this.options.needUpload == undefined? true: this.options.needUpload
this.server = X.prototype.config.PATH_FILE.path.rootImg
this.uploadUrl = X.prototype.config.PATH_FILE.path.rootUploadUrl
this.imageUrl = X.prototype.config.PATH_FILE.path.rootCrawlingImgUrl
}
/**
@method props 添加参数
*/
Uploader.prototype.props = function() {
this.filePicker = this.elem.find(".filePicker") //the file picker
this.dataWrap = this.elem.children(".js-dataWrap")
this.inputHidden = this.elem.children("input[type=hidden]") //for validate
this.errorPlace = this.elem.children(".js-error") //the error place
this.filePickerLabel = this.options.filePickerLabel || "上传"
this.minFilesNum = this.options.min || 1
this.maxFilesNum = this.options.max || 20
this.uploaderOptions = {
pick: {
id: this.filePicker,
label: this.filePickerLabel,
multiple: true
},
formData: {
fileType: this.options.type
},
auto: true,
swf: 'js/lib/webuploader/Uploader.swf',
sendAsBinary:true,
duplicate: this.options.duplicate == undefined? true: this.options.duplicate,
chunked: false,
chunkSize: 512 * 1024,
server: this.server,
fileSingleSizeLimit: this.options.size * 1024 * 1024,
accept : this.options.accept
}
this.errorText = {
Q_EXCEED_SIZE_LIMIT: '请上传大小在'+ this.options.size +'M以内的文件',
F_EXCEED_SIZE: '请上传大小在'+ this.options.size +'M以内的文件',
Q_EXCEED_NUM_LIMIT: '文件数量超出最大值',
F_DUPLICATE: '文件不能重复上传',
Q_TYPE_DENIED: '请上传支持的文件格式'
}
}
/**
@method props 添加模板
*/
Uploader.prototype.loadTemplate = function() {
var name = this.elem.attr('data-property-name') || this.elem.attr('name'),
html = [
'<div class="queueList disib uploadBox">',
' <div class="filePicker w90 ti8 add-filebg disib"></div>',
'</div>',
'<input type="hidden" name="'+ name +'">',
'<div class="js-dataWrap disibni mt30 hauto por"></div>',
'<p class="mt20 js-error redFont"></p>'
].join('')
this.elem.append(html)
}
Uploader.prototype.init = function() {
this.preProps()
//check if upload is necessary
this.needUpload && (
this.loadTemplate(),
this.props(),
this.generate(),
this.error()
)
this.eventBind()
this.files.length && this.renderAll()
}
Uploader.prototype.renderAll = function(files) {
var me = this
files && (this.files = this.files.concat(files))
this.files.forEach(function(item) {
me.currentFile = item
me.doRender()
})
};
Uploader.prototype.doRender = function() {
var html = this[this.typeCheck()].call(this)
this.dataWrap.append(html)
this.needUpload && this.fileChanged()
};
Uploader.prototype.addFile = function(file) {
this.files.push(file)
this.currentFile = file
this.doRender()
};
Uploader.prototype.removeFile = function(file) {
var files = this.files,
upFiles = this.uploaderFiles,
that = this
if (file instanceof jQuery) {
//this.maxNumber(true);
doRemove.call(this, file.next().html())
file.parent().remove()
this.fileChanged()
} else {
}
function doRemove(name) {
for (var i = files.length; i--;) {
if (files[i].fileName === name) {
files.splice(i, 1)
break
}
}
for (var i = upFiles.length; i--;) {
if (upFiles[i].name === name) {
that.uploader.cancelFile(upFiles[i])
break
}
}
}
};
Uploader.prototype.eventBind = function() {
var that = this,
selectors = ['.wrapUpload > img.upload-imgage', '.wrapUpload > .cancel']
selectors.forEach(function(item) {
$('body').off('click', item).on('click', item, function() {
that[this.getAttribute('event')]($(this))
})
})
};
Uploader.prototype.fileChanged = function() {
var val = ''
this.files.forEach(function(item) {
val += 'a'
})
this.inputHidden.val(val)
this.inputHidden.valid && this.files.length >= this.minFilesNum && this.inputHidden.valid()
};
/**
@method init 设置上传文件数量
@param value {string} 设置上传文件最大数量
*/
Uploader.prototype.maxNumber = function(data){
var that = this;
var wrap = that.elem.find(".wrapUpload");
var input = that.elem.find("input[type=file]");
var error = that.elem.find('.js-error');
if (wrap.length > that.maxNum) {
error.text("上传附件不能超过" + that.maxNum + "张");
input.attr("disabled",true);
} else {
input.attr("disabled",false);
error.text("");
}
};
Uploader.prototype.typeCheck = function() {
var index = 0
if (this.currentFile.url) {
} else if(this.currentFile.filePath && /png|jpg|jpeg/.test(this.currentFile.filePath)) {
} else {
index = 1
}
return this.renderType[index]
}
Uploader.prototype.renderImg = function(item) {
var item = this.currentFile,
url = item.url || item.filePath,
html = [
'<div class="wrapUpload disib">',
' <img src="'+ this.imageUrl + url +'" class="upload-imgage" event="showImg"/>',
this.needUpload? ' <span class="redFont cancel" event="removeFile">X</span>': '',
' <p class="mt10 tac w120 word-cut">'+ (item.fileName || item.filename) +'</p>',
'</div>'
].join('')
return html
}
Uploader.prototype.renderFile = function(item) {
var item = this.currentFile,
html = [
'<div class="wrapUpload">',
' <a href="'+ this.server +'?fileType='+ this.downloadType+'&filePath='+item.filePath+'&fileName='+item.filename+'" class="accessory white-block w120 wword-cut">'+item.filename+'</a>',
this.needUpload? ' <span class="redFont cancel">X</span>': '',
'</div>'
].join('')
return html
}
/**
@method props 生成webuploader
*/
Uploader.prototype.generate = function() {
var that = this
this.uploader = WebUploader.create(this.uploaderOptions)
this.uploader.on('uploadSuccess', function(file, response) {
that.uploaderFiles.push(file)
that.addFile(response.data)
that.errorPlace.text('')
});
};
Uploader.prototype.error = function() {
var me = this
this.uploader.on( 'error', function( type ) {
me.errorPlace.text(me.errorText[type])
});
};
Uploader.prototype.showImg = function(img) {
var content = '<img src="'+ img[0].src +'">'
layer.open({
type: 1,
title: false,
content: content
});
};
/**
@method getValue 获取上传文件
*/
Uploader.prototype.getValue = function(type){
return this.files
};
/**
@method setValue 渲染上传文件
*/
Uploader.prototype.setValue = function(arr){
arr && (this.files = arr)
this.renderAll()
};
/**
@method init 重置上传附件展示
*/
Uploader.prototype.reset = function () {
this.setValue("");
};
window.Uploader = Uploader
return Uploader;
});
})(jQuery,this.Xbn); |
import gql from 'graphql-tag';
export const getVacancy = gql(`
query getVacancy($id: String!) {
vacancy(id: $id) {
id,
title,
pda,
questions {
field,
type,
label,
settings,
required,
translations
},
translations,
company {
id,
companySettings {
pda,
translations,
pdaLabelStart,
pdaLabelEnd,
pdaLabelLink,
pdaLinkType,
pdaLink,
allowFileExtensions,
captcha {
landings,
domains
}
}
},
formPreset {
options {
captchaType,
captchaToken,
captchaData
}
}
}
}
`);
|
(() => {
'use strict';
angular
.module('radarApp')
.component('inputAddon', {
bindings: {
size: '@',
name: '@',
placeholder: '@',
measure: '@',
readonly: '<',
model: '=',
change: '&'
},
templateUrl: 'common/components/templates/input-addon-template.html'
});
})(); |
var utils = require('./utils')
var webpack = require('webpack')
var config = require('../config')
var merge = require('webpack-merge')
var baseWebpackConfig = require('./webpack.base.conf')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
// add hot-reload related code to entry chunks
Object.keys(baseWebpackConfig.entry).forEach(function (name) {
baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
})
module.exports = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
},
// cheap-module-eval-source-map is faster for development
devtool: '#cheap-module-eval-source-map',
plugins: [
new webpack.DefinePlugin({
'process.env': config.dev.env,
SERVICE_URL: JSON.stringify("http://localhost:8888"),
DEBUG_GS: JSON.stringify(true)
}),
// https://github.com/glenjamin/webpack-hot-middleware#installation--usage
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
// new HtmlWebpackPlugin({
// filename: 'index.html',
// template: 'index.html',
// inject: true,
// chunks: ['app'],
// }),
// new HtmlWebpackPlugin({
// filename: 'location.html',
// template: 'location.html',
// inject: true,
// chunks: ['location'],
// 'files': {'css': [ './assets/location.css' ]}
// }),
// new HtmlWebpackPlugin({
// filename: './wechat/location.html',
// template: './src/wechat/location.html',
// inject: true,
// chunks: ['manifest', 'vendor', 'location'],
// 'files': {'css': [ './assets/location.css' ]},
// minify: {
// removeComments: true,
// collapseWhitespace: true,
// removeAttributeQuotes: true
// // more options:
// // https://github.com/kangax/html-minifier#options-quick-reference
// },
// // necessary to consistently work with multiple chunks via CommonsChunkPlugin
// chunksSortMode: 'dependency'
// }),
new FriendlyErrorsPlugin()
]
})
|
module.exports = (bh) => {
bh.match('footer', (ctx) => {
const gateUrl = 'http://school9.perm.ru/gate/login/';
const formsUrl = 'https://school9.perm.ru/sicamp-reg/forms/';
ctx.param('sections', [
{
title: 'Информация',
items: [
{
url: bh.lib.resolve('enlisted'),
content: 'Список зачисленных'
},
{
url: bh.lib.resolve('letsgo'),
content: 'Как попасть в лагерь'
},
{
url: bh.lib.resolve('entrance'),
content: 'Что взять с собой'
}
]
},
{
title: 'Поступление',
items: [
{
url: gateUrl,
content: 'Тестирующая система'
},
{
url: formsUrl,
content: 'Вступительные анкеты'
},
{
url: bh.lib.resolve('entrance'),
content: 'Вступительная работа'
}
]
},
{
title: 'Есть вопросы?',
items: [
[
'Пишите на почту ',
{
block: 'link',
url: 'mailto:mail@sicamp.ru',
content: 'mail@sicamp.ru'
}
],
[
'Вступайте в нашу ',
{
block: 'link',
url: 'https://vk.com/sicamp',
content: 'группу ВКонтакте'
}
]
]
}
]);
});
};
|
const express = require('express')
const router = express.Router({ mergeParams: true });
const service = require('./index')
const userApiData = require('../userApiData')
router.post('/users/search', (req, res) => {
// throw new Error('judicial ref data /refdata/judicial/users/search not implemented')
// res.send(locations)
console.log('')
userApiData.sendResponse(req, res, service.methods.OnFindperson, () => service.findPerson(req.body))
});
module.exports = router; |
const PERM = {
IP_RO: 0,
IP_WO: 1,
IP_RW: 2,
};
const PROP_STATE = {
IPS_IDLE: 0,
IPS_OK: 1,
IPS_BUSY: 2,
IPS_ALERT: 3,
};
const RULE = {
ISR_1OFMANY: 0,
ISR_ATMOST1: 1,
ISR_NOFMANY: 2,
};
const SWITCH_STATE = {
ISS_OFF: 0,
ISS_ON: 1,
};
const buildDevice = (properties) => {
if (!properties) {
return null;
}
let device = {
name: null,
groups: {},
};
properties.forEach(p => {
if (!device.groups[p.group]) {
device.groups[p.group] = { name: p.group, properties: [] };
}
device.groups[p.group].properties.push(p);
if (p.name === "DRIVER_INFO") {
device.name = p.texts.find(t => {
return t.name === "DRIVER_NAME";
}).value;
}
});
return device;
};
export {
PERM,
PROP_STATE,
RULE,
SWITCH_STATE,
buildDevice,
};
|
import userReducer from "./UserReducer";
import editCategoryLimitReducer from "./EditCategoryLimitReducer";
import { combineReducers } from "redux";
import SafesReducer from "./SafesReducer";
import GetTransactionReducer from './GetTransactionReducer'
import LimitFirstReducer from "./LimitFirstReducer";
import profileReducer from "./profileReducer";
import GetSafeReducer from './GetSafeReducer'
import GetCategoryReducer from "./GetCategoryReducer";
import GetReportDailyExpenseReducer from './getReportDailyExpenseReducer'
import GetReportMonthlyExpenseReducer from './GetReportReducer'
import getReportDailyIncomeReducer from "./getReportDailyIncomeReducer";
import GetReportReducer from './GetReportReducer'
const rootReducer = combineReducers({
userReducer,
// transactionReducer,
// incomeReducer,
editCategoryLimitReducer,
SafesReducer,
GetTransactionReducer,
LimitFirstReducer,
profileReducer,
GetSafeReducer,
GetCategoryReducer,
GetReportDailyExpenseReducer,
GetReportMonthlyExpenseReducer,
GetReportReducer,
getReportDailyIncomeReducer
});
export default rootReducer;
|
// imports
var app = require('express')()
var fs = require('fs')
const env = require('./EnvConst.js')
const http = require('http')
const https = require('https')
const DB = require('./Constants.js')
// config server
//--------------------
var server = env.https ?
https.createServer({
key: fs.readFileSync('certs/wolf.key'),
cert: fs.readFileSync('certs/wolf.crt'),
ca: fs.readFileSync('certs/myCA.pem')
}, app)
:
http.createServer(app)
var io = require('socket.io')(server, {
});
const port = 8002
// server methods
// ----------------------------------------
app.get('/', (req, res) => {
res.sendFile(__dirname + '/index.html')
})
app.get('/rooms', (req, res) => {
res.send(DB.getAllRooms())
})
app.get('/room/:id', (req, res) => {
res.send(DB.getRoom(req.params.id))
})
app.get('/roomsDB', (req, res) => {
res.send(io.sockets.adapter.rooms)
})
app.get('/room/db/:id', (req, res) => {
res.send(io.sockets.adapter.rooms[req.params.id])
})
// set socket
// ----------------------------------------
io.on('connection', (socket) => {
console.log('a user connected')
const getSocketId = () => {
return Object.keys(socket.rooms)[0]
}
// socket room will be remove automatically, if no one in the room
// check if everyone left the room
const checkDeleteRoom = () => {
const roomId = socket.joinedRoomId
if( !io.sockets.adapter.rooms[roomId] ) {
DB.deleteRoom(roomId)
}
}
//
const leaveRoom = () => {
const roomId = socket.joinedRoomId
socket.leave(roomId)
checkDeleteRoom()
}
//
const joinRoom = (roomId) => {
if(socket.joinedRoomId) {
if(socket.joinedRoomId === roomId) {
// do nothing
} else {
leaveRoom()
socket.join(roomId)
socket.joinedRoomId = roomId
}
} else {
socket.join(roomId)
socket.joinedRoomId = roomId
}
}
// Join & Leave
//----------------------------------
socket.on('disconnect', () => {
checkDeleteRoom()
})
// room interactions
//----------------------------------
socket.on('createRoom', roles => {
const room = DB.generateNewRoom(roles)
joinRoom(room.id)
io.in(room.id).emit('getRoomId', room.id)
io.in(room.id).emit('getRoomRoles', room.roles)
io.in(room.id).emit('client', 'Create room: ' + room.id)
})
socket.on('joinRoom', roomId => {
if( DB.getAllRoomIds().includes(roomId) ) {
joinRoom(roomId)
socket.emit('getRoomRoles', DB.getRoom(roomId).roles)
} else {
socket.emit('client', 'Room does not exist.')
}
})
socket.on('messageRoom', text => {
io.in(socket.joinedRoomId).emit('client', text)
})
socket.on('leaveRoom', () => {
leaveRoom()
})
socket.on('manualDisconnect', () => {
socket.disconnect(true)
})
// player interactions
// -------------------------------
socket.on('sitDown', data => {
const { userInfo, index } = data
const { joinedRoomId } = socket
DB.sitDown(joinedRoomId, getSocketId(), userInfo, index)
// io.in(joinedRoomId).emit('updatePlayers', DB.getPlayers(joinedRoomId))
io.in(joinedRoomId).emit('updatePlayer', DB.getPlayer(joinedRoomId, index), index)
})
socket.on('updatePlayer', data => {
const { property, index } = data
const { joinedRoomId } = socket
DB.updatePlayer(socket.joinedRoomId, getSocketId(), property, index)
io.in(joinedRoomId).emit('updatePlayer', DB.getPlayer(joinedRoomId, index), index)
})
})
server.listen(port, () => {
console.log(`Server is running on port ${port}`)
}) |
import React, { useEffect } from "react";
import { Text, View, StyleSheet, ScrollView, LogBox, Button } from "react-native";
import { useSelector } from "react-redux";
import DonorsList from './../components/donorsList';
const FilteredDonorsPage = () => {
const donors = useSelector((state) => state.blood.filteredDonors);
useEffect(() => {
LogBox.ignoreLogs(["VirtualizedLists should never be nested"]);
}, []);
return (
<View style={styles.container}>
<ScrollView>
<DonorsList donors={donors} />
</ScrollView>
</View>
);
};
const styles = StyleSheet.create({
container: {
alignItems: 'center'
},
});
export default FilteredDonorsPage; |
const Mock = require('mockjs');
// mock只有一级搜索分类的数据
const templateOne = {
'activityList|8-21': [
{
'id|15': /[0-9]/,
title: '@ctitle(3,7)',
picPath: /https:\/\/picsum\.photos\/200\/200\/\?image=\d{3}/,
'goodsList|1-5': [
{
'id|15': /[0-9]/,
spec: '@ctitle(1,3)',
'price|1-50.2': 1,
},
],
},
],
};
// mock只有两级搜索分类的数据
const templateTwo = {
'categoryList|2-3': [
{
'id|15': /[0-9]/,
name: '@ctitle(3,7)',
'activityList|3-15': [
{
'id|15': /[0-9]/,
onlineTitle: '@ctitle(3,6)',
picPath: /https:\/\/picsum\.photos\/200\/200\/\?image=\d{3}/,
'goodsList|1-5': [
{
'id|15': /[0-9]/,
onlineSpec: '@ctitle(1,3)',
'salePrice|1-50.2': 1,
},
],
},
],
},
],
};
/**
* 订单支付
*/
exports.payOrder = function (req, resp) {
console.log(req.body)
const data = {
result: 1,
msg: '结算成功',
};
resp.json(data);
};
|
import React from "react";
import { useSelector } from "react-redux";
import { Container, Ul, Li, UlList } from "./style";
import PostModal from "../postModal";
import NoPostsFound from "./NoPostsFound";
import PostCard from "../postCard";
import PostThumbnail from "../postThumbnail";
import PostList from "../postList";
import LoadingScreenCard from "../loadingScreens/postCard";
import LoadingScreenThumbnail from "../loadingScreens/postThumbnail";
import LoadingScreenList from "../loadingScreens/postList";
const index = ({ posts, isLoading }) => {
const layout = useSelector((state) => state.filters.layout);
const resultsPerPage = useSelector((state) => state.filters.resultsPerPage);
const { numberOfResultsFound } = useSelector((state) => state.filters);
let loadingCards = [];
for (let i = 0; i < resultsPerPage; ++i) {
if (layout === "Gallery") {
loadingCards.push(<LoadingScreenCard key={i} />);
} else if (layout === "Thumbnail") {
loadingCards.push(<LoadingScreenThumbnail key={i} />);
} else if (layout === "List") {
loadingCards.push(<LoadingScreenList key={i} />);
}
}
return (
<Container>
{!isLoading && numberOfResultsFound < 1 && <NoPostsFound />}
{isLoading && loadingCards}
<PostModal quickData={posts} />
{layout === "Gallery" && (
<Ul>
{posts.map((post, index) => {
return (
<Li key={index}>
<PostCard key={index} postData={post} />
</Li>
);
})}
</Ul>
)}
{layout === "Thumbnail" && (
<UlList>
{posts.map((post, index) => {
return (
<Li key={index}>
<PostThumbnail key={index} postData={post} />
</Li>
);
})}
</UlList>
)}
{layout === "List" && (
<UlList>
{posts.map((post, index) => {
return (
<Li key={index}>
<PostList key={index} postData={post} />
</Li>
);
})}
</UlList>
)}
</Container>
);
};
export default index;
|
const Mock = require("mockjs");
const Random = Mock.Random;
// 设置全局延时 没有延时的话有时候会检测不到数据变化 建议保留
Mock.setup({
timeout: "300-600",
});
const swiperData = Mock.mock({
"list|1-10": [
{
"id|+1": 2,
imageUrl: Random.image("375x200"),
},
],
});
const goodListData = Mock.mock({
"list|20": [
{
"id|+1": 2,
imageUrl: Random.image("100x50"),
"title|1-5": "iPhone7",
"desc|3-7": "很好的手机",
"price|+10": 2,
"orginPrice|+5": 20,
},
],
});
const detailsData = Mock.mock({
"list|20": [
{
"id|+1": 2,
imageUrl: Random.image("100x50"),
"title|1-5": "iPhone7",
"desc|7-10": "很好的手机",
"price|+10": 2,
"orginPrice|+5": 20,
},
],
});
Mock.mock("/home/swiper", /get/, swiperData);
Mock.mock("/goods/list", /get/, goodListData);
Mock.mock("/goods/details", /get/, detailsData);
|
import React from 'react';
import styled from 'styled-components';
const ResourceSubH = styled.div`
max-width: fit-content;
margin: 10px;
padding:10px;
border:${props=>props.Border ? props.Border : "5px solid #2F52E0"};
border-radius:25px;
display:flex;
justify-content:center;
align-items:center;
font-family: 'Mukta Mahee', Sans-serif;
font-weight:bold;
background-color:#fff;
span {
font-size:20px;
}
`
const ResourceSub = ({text,Border}) =>{
return <ResourceSubH style={{border:Border}}>
<span>{text}</span>
</ResourceSubH>
}
ResourceSub.defaultProps = {
text:'Default',
Border:'5px solid #2F52E0'
}
export default ResourceSub; |
import React, {useState} from 'react';
import {
StyleSheet,
Text,
View,
TextInput,
Button,
FlatList,
TouchableWithoutFeedback,
Keyboard,
} from 'react-native';
import Icon from 'react-native-vector-icons/dist/FontAwesome';
import {Formik} from 'formik';
import * as Yup from 'yup';
import CustomButton from '../components/CustomButton';
const reviewSchema = Yup.object({
movieTitle: Yup.string().required().min(4),
thoughtsOnMovie: Yup.string().required().min(15),
rating: Yup.string()
.required()
.test('is-num-1-10', 'rating must be number 1-10', val => {
return parseInt(val) < 11 && parseInt(val) > 0;
}),
});
function Reviews({navigation}) {
const [reviews, setReviews] = useState([
{
movieTitle: 'Tenet',
rating: 9,
thoughtsOnMovie: 'A great moive by christoper nolan',
key: '1',
},
{
movieTitle: 'Tenet',
rating: 9,
thoughtsOnMovie: 'A great moive by christoper nolan',
key: '2',
},
{
movieTitle: 'Tenet',
rating: 9,
thoughtsOnMovie: 'A great moive by christoper nolan',
key: '3',
},
]);
const addReview = review => {
review.key = Math.random().toString();
setReviews(currentReviews => {
return [review, ...currentReviews];
});
};
return (
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<View>
<View style={styles.header}>
<Icon
name="chevron-left"
size={20}
color="#fff"
style={styles.icon}
onPress={() => navigation.navigate('Home')}
/>
<Text style={styles.title}>Add movie reviews </Text>
</View>
<View>
<Formik
initialValues={{movieTitle: '', thoughtsOnMovie: '', rating: ''}}
validationSchema={reviewSchema}
onSubmit={(values, actions) => {
actions.resetForm();
addReview(values);
// console.log(values);
}}>
{formikProps => (
<View style={styles.formWrapper}>
<TextInput
style={styles.input}
placeholder="ex: tenet"
onChangeText={formikProps.handleChange('movieTitle')}
value={formikProps.values.movieTitle}
onBlur={formikProps.handleBlur('movieTitle')}
/>
<Text style={styles.errorText}>
{formikProps.touched.movieTitle &&
formikProps.errors.movieTitle}
</Text>
<TextInput
multiline
minHeight={80}
style={styles.input}
placeholder="Write something about the movie"
onChangeText={formikProps.handleChange('thoughtsOnMovie')}
value={formikProps.values.thoughtsOnMovie}
onBlur={formikProps.handleBlur('thoughtsOnMovie')}
/>
<Text style={styles.errorText}>
{formikProps.touched.thoughtsOnMovie &&
formikProps.errors.thoughtsOnMovie}
</Text>
<TextInput
keyboardType="numeric"
style={styles.input}
placeholder="ex: 7"
onChangeText={formikProps.handleChange('rating')}
value={formikProps.values.rating}
onBlur={formikProps.handleBlur('rating')}
/>
<Text style={styles.errorText}>
{formikProps.touched.rating && formikProps.errors.rating}
</Text>
<CustomButton
text="submit"
onPress={formikProps.handleSubmit}
/>
</View>
)}
</Formik>
<View>
<FlatList
data={reviews}
renderItem={({item}) => (
<View style={styles.reviews}>
<Text style={styles.movieTitle}>{item.movieTitle}</Text>
<Text style={styles.thought}>{item.thoughtsOnMovie}</Text>
<Text style={styles.star}>⭐ {item.rating}</Text>
</View>
)}
/>
</View>
</View>
</View>
</TouchableWithoutFeedback>
);
}
const styles = StyleSheet.create({
header: {
height: 90,
width: '100%',
flexDirection: 'row',
alignItems: 'center',
},
icon: {
backgroundColor: '#f08989',
marginVertical: 15,
marginHorizontal: 30,
paddingVertical: 15,
paddingHorizontal: 18,
borderRadius: 20,
},
title: {
flex: 0.7,
textAlign: 'center',
fontSize: 18,
fontWeight: 'bold',
},
formWrapper: {
margin: 20,
},
input: {
marginTop: 10,
marginBottom: 5,
borderWidth: 2,
borderColor: '#ddd',
padding: 10,
fontSize: 18,
borderRadius: 6,
},
reviews: {
borderColor: '#000000aa',
borderWidth: 1,
borderRadius: 10,
backgroundColor: '#ddd',
padding: 8,
marginHorizontal: 20,
marginVertical: 5,
},
movieTitle: {
fontSize: 18,
fontWeight: 'bold',
marginBottom: 5,
},
thought: {
marginBottom: 5,
fontSize: 16,
},
star: {
fontSize: 16,
fontWeight: 'bold',
},
errorText: {
color: 'red',
fontWeight: 'bold',
marginBottom: 6,
marginLeft: 5,
},
});
export default Reviews;
|
var common = require('../common');
var fs = require('fs');
var spawn = require('child_process').spawn;
var assert = require('assert');
var errors = 0;
var enoentPath = 'foo123';
assert.equal(common.fileExists(enoentPath), false);
var enoentChild = spawn(enoentPath);
enoentChild.on('error', function (err) {
assert.equal(err.path, enoentPath);
errors++;
});
process.on('exit', function() {
assert.equal(1, errors);
});
|
var ModuleTestFPSpec = (function(global) {
var _runOnNode = "process" in global;
var _runOnWorker = "WorkerLocation" in global;
var _runOnBrowser = "document" in global;
return new Test("FPSpec", {
disable: false,
browser: true,
worker: true,
node: true,
button: true,
both: true, // test the primary module and secondary module
}).add([
testFPSpec,
]).run().clone();
function testFPSpec(test, pass, miss) {
var spec1 = new FPSpec({ USER_AGENT: "DoCoMo/2.0 P07A3(c500;TB;W24H15)" });
var spec2 = new FPSpec({ USER_AGENT: "KDDI-TS3H UP.Browser/6.2_7.2.7.1.K.1.400 (GUI) MMP/2.0" });
var spec3 = new FPSpec({ USER_AGENT: "Vodafone/1.0/V905SH/SHJ001[/Serial] Browser/VF-NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1" });
var spec4 = new FPSpec({ USER_AGENT: "SoftBank/1.0/301P/PJP10[/Serial] Browser/NetFront/3.4 Profile/MIDP-2.0 Configuration/CLDC-1.1" });
var hasDevice = [
spec1.hasDeviceID("P07A3") === true,
spec2.hasDeviceID("TS3H") === true,
spec3.hasDeviceID("905SH") === true,
spec4.hasDeviceID("301P") === true];
var canUTF8 = [
spec1.canDeviceFeature("UTF-8") === true,
spec2.canDeviceFeature("UTF-8") === true,
spec3.canDeviceFeature("UTF-8") === true,
spec4.canDeviceFeature("UTF-8") === true];
var browserVersion = [
spec1.getBrowserVersion() === "2",
spec2.getBrowserVersion() === "7.2",
spec3.getBrowserVersion() === "1",
spec4.getBrowserVersion() === "1"];
var flashLiteVersion = [
spec1.getFlashLiteVersion() === 3.1,
spec2.getFlashLiteVersion() === 2.0,
spec3.getFlashLiteVersion() === 1.1,
spec4.getFlashLiteVersion() === 3.1];
if ( !/false/.test(hasDevice.join(",")) &&
!/false/.test(canUTF8.join(",")) &&
!/false/.test(browserVersion.join(",")) &&
!/false/.test(flashLiteVersion.join(",")) ) {
test.done(pass());
} else {
test.done(miss());
}
}
})((this || 0).self || global);
|
module.exports = {
"_links": {
"self": {
"href": "http://ccd-data-store-api-demo.service.core-compute-demo.internal/internal/cases/1604309496714935"
}
},
"case_id": "1604309496714935",
"case_type": {
"id": "Asylum",
"name": "Immigration & Asylum",
"description": "IA test casey",
"jurisdiction": {
"id": "IA",
"name": "mmigration & Asylum",
"description": "mmigration & Asylum"
},
"printEnabled": false
},
"tabs": [
{
"id": "overview",
"label": "Overview",
"order": 15,
"fields": [
{
"id": "divorceCaseNumber",
"label": "Divorce Case Number",
"hidden": null,
"value": "BV18D00152",
"metadata": false,
"hint_text": "Enter 10 character alphanumeric divorce case number",
"field_type": {
"id": "divorceCaseNumber-cd9c8be6-d93d-444c-9291-3e27981e0dd8",
"type": "Text",
"min": null,
"max": null,
"regular_expression": "^([A-Z|a-z][A-Z|a-z])\\d{2}[D|d]\\d{5}$",
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": "^([A-Z|a-z][A-Z|a-z])\\d{2}[D|d]\\d{5}$",
"security_label": "PUBLIC",
"order": 10,
"formatted_value": "BV18D00152",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantDetails",
"label": "#### APPLICANT DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantFMName",
"label": "Current First and Middle names",
"hidden": null,
"value": "Madaline Wheeler",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 2,
"formatted_value": "Madaline Wheeler",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantLName",
"label": "Current Last Name",
"hidden": null,
"value": "Norman",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 3,
"formatted_value": "Norman",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "rRespondentLabel",
"label": "#### RESPONDENT DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 4,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "appRespondentFMName",
"label": "Current First and Middle names",
"hidden": null,
"value": "Wilma Richardson",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 5,
"formatted_value": "Wilma Richardson",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "appRespondentLName",
"label": "Current Last Name",
"hidden": null,
"value": "Hurst",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 6,
"formatted_value": "Hurst",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "appRespondentRep",
"label": "Is the respondent represented ?",
"hidden": null,
"value": "No",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "YesOrNo",
"type": "YesOrNo",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 7,
"formatted_value": "No",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "caseDetailsLa",
"label": "#### CASE DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 8,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
},
{
"id": "PaymentDetails",
"label": "Payment details",
"order": 9,
"fields": [
{
"id": "payment",
"label": "#### PAYMENT DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": "amountToPay=\"5000\" OR paperApplication=\"Yes\""
},
{
"id": "applicationDetails",
"label": "Nature of Application",
"order": 5,
"fields": [
{
"id": "provisionMadeForLabel",
"label": "#### PROVISION MADE FOR",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantIntendsToLabel",
"label": "#### THE APPLICANT INTENDS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 3,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "dischargePeriodicalPaymentSubstituteForLabel",
"label": "#### DISCHARGE A PERIODICAL PAYMENTS ORDER AND TO SUBSTITUTE FOR IT",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 17,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "applyingForConsentOrderLabel",
"label": "#### APPLYING FOR A CONSENT ORDER?",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 19,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "natureOfApplication1",
"label": "#### NATURE OF THE APPLICATION",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 5,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "natureOfApplication2",
"label": "The application is for:",
"hidden": null,
"value": [
"Lump Sum Order",
"Property Adjustment Order",
"A settlement or a transfer of property",
"Periodical Payment Order",
"Pension Sharing Order",
"Pension Compensation Sharing Order",
"Pension Attachment Order",
"Pension Compensation Attachment Order"
],
"metadata": false,
"hint_text": "The applicant is applying for an order by consent in terms of written agreement (a consent order). Within the draft consent order, the Applicant is applying to Court for;",
"field_type": {
"id": "MultiSelectList-FR_ms_natureApplication",
"type": "MultiSelectList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "Lump Sum Order",
"label": "Lump Sum Order",
"order": "1"
},
{
"code": "Property Adjustment Order",
"label": "Property Adjustment Order",
"order": "2"
},
{
"code": "A settlement or a transfer of property",
"label": "A settlement or a transfer of property for the benefit of the child(ren)",
"order": "3"
},
{
"code": "Periodical Payment Order",
"label": "Periodical Payment Order",
"order": "4"
},
{
"code": "Pension Sharing Order",
"label": "Pension Sharing Order",
"order": "5"
},
{
"code": "Pension Compensation Sharing Order",
"label": "Pension Compensation Sharing Order",
"order": "6"
},
{
"code": "Pension Attachment Order",
"label": "Pension Attachment Order",
"order": "7"
},
{
"code": "Pension Compensation Attachment Order",
"label": "Pension Compensation Attachment Order",
"order": "8"
}
],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 6,
"formatted_value": [
"Lump Sum Order",
"Property Adjustment Order",
"A settlement or a transfer of property",
"Periodical Payment Order",
"Pension Sharing Order",
"Pension Compensation Sharing Order",
"Pension Attachment Order",
"Pension Compensation Attachment Order"
],
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "natureOfApplication3a",
"label": "Address details",
"hidden": null,
"value": "Distinctio Minus do",
"metadata": false,
"hint_text": "If the application includes an application for a Property Adjustment Order in relation to land, please provide the address(es) of the property or properties, if applicable",
"field_type": {
"id": "TextArea",
"type": "TextArea",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 7,
"formatted_value": "Distinctio Minus do",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "natureOfApplication3b",
"label": "Mortgage details",
"hidden": null,
"value": "Lorem atque repellen",
"metadata": false,
"hint_text": "If the application includes an application for a Property Adjustment Order in relation to land, please provide the name(s) and address(es) of any mortgagee(s), if applicable",
"field_type": {
"id": "TextArea",
"type": "TextArea",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 8,
"formatted_value": "Lorem atque repellen",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "natureOfApplication4",
"label": "#### ORDER FOR CHILDREN",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 9,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "orderForChildrenQuestion1",
"label": "Does the application contain any application for periodical payments, or secured periodical payments for children?",
"hidden": null,
"value": "No",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "YesOrNo",
"type": "YesOrNo",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 10,
"formatted_value": "No",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
},
{
"id": "CaseHistoryViewer",
"label": "History",
"order": 1,
"fields": [
{
"id": "CaseHistoryViewer",
"label": "CaseHistoryViewer",
"hidden": null,
"value": [
{
"id": 155533,
"timestamp": "2020-11-02T09:31:36.793313",
"summary": "",
"comment": "",
"event_id": "FR_solicitorCreate",
"event_name": "Consent Order Application",
"user_id": "72f16776-4ff9-4f5a-8b65-860e499bd24e",
"user_last_name": "Parker",
"user_first_name": "Peter",
"state_name": "Application Drafted",
"state_id": "caseAdded",
"significant_item": null
}
],
"metadata": false,
"hint_text": null,
"field_type": {
"id": "CaseHistoryViewer",
"type": "CaseHistoryViewer",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": [
{
"id": 155533,
"timestamp": "2020-11-02T09:31:36.793313",
"summary": "",
"comment": "",
"event_id": "FR_solicitorCreate",
"event_name": "Consent Order Application",
"user_id": "72f16776-4ff9-4f5a-8b65-860e499bd24e",
"user_last_name": "Parker",
"user_first_name": "Peter",
"state_name": "Application Drafted",
"state_id": "caseAdded",
"significant_item": null
}
],
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-systemupdate",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
},
{
"id": "authorisation",
"label": "Authorisation",
"order": 6,
"fields": [
{
"id": "authorisationLa",
"label": "#### AUTHORISATION",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "authorisation1",
"label": "# I am duly authorised by the Applicant to complete this application.",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 2,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "divorceAbout_F1",
"label": "***************",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 7,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": "amountToPay=\"5000\" OR paperApplication=\"Yes\""
},
{
"id": "applicantDetails",
"label": "Applicant",
"order": 2,
"fields": [
{
"id": "applicantRepresentedLabel",
"label": "## Is the Applicant represented ? ##",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 29,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantRepresented",
"label": "",
"hidden": null,
"value": "Yes",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "YesOrNo",
"type": "YesOrNo",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 30,
"formatted_value": "Yes",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": false,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantContactLabel",
"label": "#### Applicant’s Contact details",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 31,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"No\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorAbout_Para-1",
"label": "#### SOLICITOR DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": "Create an application for financial remedy by consent",
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 36,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorName",
"label": "Solicitor’s name",
"hidden": null,
"value": "Baker Ramsey",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 37,
"formatted_value": "Baker Ramsey",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorFirm",
"label": "Name of your firm",
"hidden": null,
"value": "Nolan Avila",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 38,
"formatted_value": "Nolan Avila",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorReference",
"label": "Your reference",
"hidden": null,
"value": "Adipisci eu reprehen",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 39,
"formatted_value": "Adipisci eu reprehen",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorAddress",
"label": "Your address",
"hidden": null,
"value": {
"County": "",
"Country": "United Kingdom",
"PostCode": "E11 3EJ",
"PostTown": "London",
"AddressLine1": "22 Lancaster Road",
"AddressLine2": "",
"AddressLine3": ""
},
"metadata": false,
"hint_text": null,
"field_type": {
"id": "AddressUK",
"type": "Complex",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [
{
"id": "AddressLine1",
"label": "Building and Street",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax150",
"type": "Text",
"min": null,
"max": 150,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "AddressLine2",
"label": "Address Line 2",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "AddressLine3",
"label": "Address Line 3",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "PostTown",
"label": "Town or City",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "County",
"label": "County",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "PostCode",
"label": "Postcode/Zipcode",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax14",
"type": "Text",
"min": null,
"max": 14,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "Country",
"label": "Country",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
}
],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 40,
"formatted_value": {
"County": "",
"Country": "United Kingdom",
"PostCode": "E11 3EJ",
"PostTown": "London",
"AddressLine1": "22 Lancaster Road",
"AddressLine2": "",
"AddressLine3": ""
},
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorPhone",
"label": "Phone Number",
"hidden": null,
"value": "+1 (996) 797-8283",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 41,
"formatted_value": "+1 (996) 797-8283",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorEmail",
"label": "Email",
"hidden": null,
"value": "tafynu@mailinator.com",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Email",
"type": "Email",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 42,
"formatted_value": "tafynu@mailinator.com",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorDXnumber",
"label": "DX number",
"hidden": null,
"value": "867",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 43,
"formatted_value": "867",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "solicitorAgreeToReceiveEmails",
"label": "Future email communications",
"hidden": null,
"value": "Yes",
"metadata": false,
"hint_text": "I confirm I am willing to accept service of all correspondence and orders by email at the email address stated above.",
"field_type": {
"id": "YesOrNo",
"type": "YesOrNo",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 44,
"formatted_value": "Yes",
"display_context": null,
"display_context_parameter": null,
"show_condition": "applicantRepresented=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantDetails",
"label": "#### APPLICANT DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 2,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantFMName",
"label": "Current First and Middle names",
"hidden": null,
"value": "Madaline Wheeler",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 3,
"formatted_value": "Madaline Wheeler",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "applicantLName",
"label": "Current Last Name",
"hidden": null,
"value": "Norman",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 4,
"formatted_value": "Norman",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "regionList",
"label": "Please choose the Region in which the Applicant resides",
"hidden": null,
"value": "midlands",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "FixedList-FR_region_list",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "wales",
"label": "Wales",
"order": null
},
{
"code": "southwest",
"label": "South West",
"order": null
},
{
"code": "southeast",
"label": "South East",
"order": null
},
{
"code": "northeast",
"label": "North East",
"order": null
},
{
"code": "northwest",
"label": "North West",
"order": null
},
{
"code": "london",
"label": "London",
"order": null
},
{
"code": "midlands",
"label": "Midlands",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 5,
"formatted_value": "midlands",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "midlandsFRCList",
"label": "This should be the FRC local to the applicant",
"hidden": null,
"value": "birmingham",
"metadata": false,
"hint_text": "This should be the FRC local to the applicant",
"field_type": {
"id": "FixedList-FR_midlands_frc_list",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "birmingham",
"label": "Birmingham FRC",
"order": null
},
{
"code": "nottingham",
"label": "Nottingham FRC",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 6,
"formatted_value": "birmingham",
"display_context": null,
"display_context_parameter": null,
"show_condition": "regionList=\"midlands\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "birminghamCourtList",
"label": "Where is the Applicant’s Local Court?",
"hidden": null,
"value": "FR_birminghamList_9",
"metadata": false,
"hint_text": "Please give the name of the Court which is closest to the Applicants home postcode. If you are unsure, please check on http://courttribunalfinder.service.gov.uk",
"field_type": {
"id": "FixedList-FR_birminghamList",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "FR_birminghamList_10",
"label": "HEREFORD COUNTY COURT AND FAMILY COURT",
"order": null
},
{
"code": "FR_birminghamList_9",
"label": "STAFFORD COMBINED COURT",
"order": null
},
{
"code": "FR_birminghamList_8",
"label": "WORCESTER COMBINED COURT",
"order": null
},
{
"code": "FR_birminghamList_7",
"label": "STOKE ON TRENT COMBINED COURT",
"order": null
},
{
"code": "FR_birminghamList_6",
"label": "WALSALL COUNTY AND FAMILY COURT",
"order": null
},
{
"code": "FR_birminghamList_5",
"label": "DUDLEY COUNTY COURT AND FAMILY COURT",
"order": null
},
{
"code": "FR_birminghamList_4",
"label": "WOLVERHAMPTON COMBINED COURT CENTRE",
"order": null
},
{
"code": "FR_birminghamList_3",
"label": "TELFORD COUNTY COURT AND FAMILY COURT",
"order": null
},
{
"code": "FR_birminghamList_2",
"label": "COVENTRY COMBINED COURT CENTRE",
"order": null
},
{
"code": "FR_birminghamList_1",
"label": "BIRMINGHAM CIVIL AND FAMILY JUSTICE CENTRE",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 14,
"formatted_value": "FR_birminghamList_9",
"display_context": null,
"display_context_parameter": null,
"show_condition": "regionList=\"midlands\" AND midlandsFRCList=\"birmingham\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
},
{
"id": "divorceDetails",
"label": "Divorce",
"order": 4,
"fields": [
{
"id": "divorceAbout_H1",
"label": "#### DIVORCE DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "divorceCaseNumber",
"label": "Divorce Case Number",
"hidden": null,
"value": "BV18D00152",
"metadata": false,
"hint_text": "Enter 10 character alphanumeric divorce case number",
"field_type": {
"id": "divorceCaseNumber-cd9c8be6-d93d-444c-9291-3e27981e0dd8",
"type": "Text",
"min": null,
"max": null,
"regular_expression": "^([A-Z|a-z][A-Z|a-z])\\d{2}[D|d]\\d{5}$",
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": "^([A-Z|a-z][A-Z|a-z])\\d{2}[D|d]\\d{5}$",
"security_label": "PUBLIC",
"order": 2,
"formatted_value": "BV18D00152",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "divorceStageReached",
"label": "What stage has the divorce reached ?",
"hidden": null,
"value": "Petition Issued",
"metadata": false,
"hint_text": "To ensure the application is linked to the divorce file without delay, please upload a copy of the decree [nisi] [absolute]",
"field_type": {
"id": "FixedList-FR_fl_StageReached",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "Petition Issued",
"label": "Petition Issued",
"order": null
},
{
"code": "Decree Absolute",
"label": "Decree Absolute",
"order": null
},
{
"code": "Decree Nisi",
"label": "Decree Nisi",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 3,
"formatted_value": "Petition Issued",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
},
{
"id": "respondentDetails",
"label": "Respondent",
"order": 3,
"fields": [
{
"id": "rRespondentLabel",
"label": "#### RESPONDENT DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 1,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "appRespondentFMName",
"label": "Current First and Middle names",
"hidden": null,
"value": "Wilma Richardson",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 2,
"formatted_value": "Wilma Richardson",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "appRespondentLName",
"label": "Current Last Name",
"hidden": null,
"value": "Hurst",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 3,
"formatted_value": "Hurst",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "appRespondentRep",
"label": "Is the respondent represented ?",
"hidden": null,
"value": "No",
"metadata": false,
"hint_text": null,
"field_type": {
"id": "YesOrNo",
"type": "YesOrNo",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 4,
"formatted_value": "No",
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "rSolicitorLabel",
"label": "#### RESPONDENT SOLICITOR’S DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 5,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": "appRespondentRep=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "rRespondentLabel2",
"label": "#### RESPONDENT SERVICE ADDRESS DETAILS",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Label",
"type": "Label",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 13,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": "appRespondentRep=\"No\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
}
],
"default_value": null
},
{
"id": "respondentAddress",
"label": "Their address",
"hidden": null,
"value": {
"County": "",
"Country": "United Kingdom",
"PostCode": "E11 3EJ",
"PostTown": "London",
"AddressLine1": "22 Lancaster Road",
"AddressLine2": "",
"AddressLine3": ""
},
"metadata": false,
"hint_text": null,
"field_type": {
"id": "AddressGlobalUK",
"type": "Complex",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [
{
"id": "AddressLine1",
"label": "Building and Street",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax150",
"type": "Text",
"min": null,
"max": 150,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "AddressLine2",
"label": "Address Line 2",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "AddressLine3",
"label": "Address Line 3",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "PostTown",
"label": "Town or City",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "County",
"label": "County/State",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "Country",
"label": "Country",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax50",
"type": "Text",
"min": null,
"max": 50,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "PostCode",
"label": "Postcode/Zipcode",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "TextMax14",
"type": "Text",
"min": null,
"max": 14,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
}
],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 14,
"formatted_value": {
"County": "",
"Country": "United Kingdom",
"PostCode": "E11 3EJ",
"PostTown": "London",
"AddressLine1": "22 Lancaster Road",
"AddressLine2": "",
"AddressLine3": ""
},
"display_context": null,
"display_context_parameter": null,
"show_condition": "appRespondentRep=\"No\" AND respondentAddressConfidential!=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "respondentPhone",
"label": "Phone Number",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 15,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": "appRespondentRep=\"No\" AND respondentAddressConfidential!=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "respondentEmail",
"label": "Email",
"hidden": null,
"value": null,
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Email",
"type": "Email",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 16,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": "appRespondentRep=\"No\" AND respondentAddressConfidential!=\"Yes\"",
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
},
{
"id": "CaseDetails",
"label": "Case Documents",
"order": 7,
"fields": [
{
"id": "consentOrder",
"label": "Draft Consent Order",
"hidden": null,
"value": {
"document_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32",
"document_filename": "Redacted-dm-store117030023756863387643594864315275504083.pdf",
"document_binary_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32/binary"
},
"metadata": false,
"hint_text": "Please upload a scanned copy of the draft consent order that has been signed by both parties. PLEASE NOTE: Pension documents should be uploaded separately on the pension upload page or they will not be returned with a court seal upon approval of the application. Where possible, documents should be scanned in Black and White.",
"field_type": {
"id": "Document",
"type": "Document",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 3,
"formatted_value": {
"document_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32",
"document_filename": "Redacted-dm-store117030023756863387643594864315275504083.pdf",
"document_binary_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32/binary"
},
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "latestConsentOrder",
"label": "Latest Consent Order",
"hidden": null,
"value": {
"document_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32",
"document_filename": "Redacted-dm-store117030023756863387643594864315275504083.pdf",
"document_binary_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32/binary"
},
"metadata": false,
"hint_text": null,
"field_type": {
"id": "Document",
"type": "Document",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 5,
"formatted_value": {
"document_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32",
"document_filename": "Redacted-dm-store117030023756863387643594864315275504083.pdf",
"document_binary_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/c834c7e6-083c-49f3-bb34-a47fd578eb32/binary"
},
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "d81Joint",
"label": "Form D81 Joint Document",
"hidden": null,
"value": {
"document_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/ba03d760-96b5-4f2b-9ded-c259b9beeae7",
"document_filename": "Redacted-dm-store117030023756863387643594864315275504083.pdf",
"document_binary_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/ba03d760-96b5-4f2b-9ded-c259b9beeae7/binary"
},
"metadata": false,
"hint_text": "Joint D81 form, signed by both parties",
"field_type": {
"id": "Document",
"type": "Document",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 6,
"formatted_value": {
"document_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/ba03d760-96b5-4f2b-9ded-c259b9beeae7",
"document_filename": "Redacted-dm-store117030023756863387643594864315275504083.pdf",
"document_binary_url": "http://dm-store-demo.service.core-compute-demo.internal/documents/ba03d760-96b5-4f2b-9ded-c259b9beeae7/binary"
},
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "pensionCollection",
"label": "Pension Documents",
"hidden": null,
"value": [],
"metadata": false,
"hint_text": "If the application contains an application for a pension sharing, pension compensation sharing, pension attachment or pension compensation attachment order, please upload the relevant pension form(s) from the list below",
"field_type": {
"id": "pensionCollection-21406c06-5ea2-49e6-b125-fcc0d78626c1",
"type": "Collection",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": {
"id": "FR_PensionType",
"type": "Complex",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [
{
"id": "typeOfDocument",
"label": "Type of document",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "FixedList-FR_fl_PensionDocument",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "Form PPF2",
"label": "Form PPF2",
"order": null
},
{
"code": "Form PPF1",
"label": "Form PPF1",
"order": null
},
{
"code": "Form PPF",
"label": "Form PPF",
"order": null
},
{
"code": "Form P2",
"label": "Form P2",
"order": null
},
{
"code": "Form P1",
"label": "Form P1",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "uploadedDocument",
"label": "Document",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "Document",
"type": "Document",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
}
],
"collection_field_type": null
}
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 10,
"formatted_value": [],
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
},
{
"id": "otherCollection",
"label": "Other Documents",
"hidden": null,
"value": [],
"metadata": false,
"hint_text": "Upload other documentation related to your application",
"field_type": {
"id": "otherCollection-2f3b95fd-e708-4883-936b-850bfb5bf33d",
"type": "Collection",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": {
"id": "FR_DocumentType",
"type": "Complex",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [
{
"id": "typeOfDocument",
"label": "Type of document",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "FixedList-FR_fl_OtherDocument",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "Other",
"label": "Other",
"order": null
},
{
"code": "Notice of acting",
"label": "Notice of acting",
"order": null
},
{
"code": "Letter",
"label": "Letter",
"order": null
},
{
"code": "ScheduleOfAssets",
"label": "Schedule of Assets",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
},
{
"id": "uploadedDocument",
"label": "Document",
"hidden": null,
"order": null,
"metadata": false,
"case_type_id": null,
"hint_text": null,
"field_type": {
"id": "Document",
"type": "Document",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"security_classification": "PUBLIC",
"live_from": null,
"live_until": null,
"show_condition": null,
"acls": null,
"complexACLs": [],
"display_context": null,
"display_context_parameter": null,
"retain_hidden_value": null,
"formatted_value": null,
"default_value": null
}
],
"collection_field_type": null
}
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": 11,
"formatted_value": [],
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [
{
"role": "caseworker-divorce-financialremedy",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-courtadmin",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-solicitor",
"create": true,
"read": true,
"update": true,
"delete": false
},
{
"role": "caseworker-divorce-financialremedy-judiciary",
"create": true,
"read": true,
"update": false,
"delete": false
},
{
"role": "caseworker-caa",
"create": true,
"read": true,
"update": true,
"delete": false
}
],
"default_value": null
}
],
"role": null,
"show_condition": null
}
],
"metadataFields": [
{
"id": "[STATE]",
"label": "State",
"hidden": false,
"value": "caseAdded",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "FixedList-FinancialRemedyMVP2[STATE]",
"type": "FixedList",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [
{
"code": "close",
"label": "Close",
"order": null
},
{
"code": "infoReceived",
"label": "Information Received",
"order": null
},
{
"code": "awaitingInfo",
"label": "Awaiting Information",
"order": null
},
{
"code": "responseReceived",
"label": "Response Received",
"order": null
},
{
"code": "awaitingResponse",
"label": "Awaiting Response",
"order": null
},
{
"code": "consentOrderMade",
"label": "Consent Order Made",
"order": null
},
{
"code": "consentOrderApproved",
"label": "Consent Order Approved",
"order": null
},
{
"code": "orderMade",
"label": "Consent Order Not Approved",
"order": null
},
{
"code": "referredToJudge",
"label": "Awaiting Judicial Response",
"order": null
},
{
"code": "applicationIssued",
"label": "Application Issued",
"order": null
},
{
"code": "applicationSubmitted",
"label": "Application Submitted",
"order": null
},
{
"code": "awaitingPaymentResponse",
"label": "Awaiting Payment Response",
"order": null
},
{
"code": "awaitingPayment",
"label": "Solicitor - Awaiting Payment",
"order": null
},
{
"code": "awaitingHWFDecision",
"label": "Awaiting HWF Decision",
"order": null
},
{
"code": "newPaperCase",
"label": "New Paper Case",
"order": null
},
{
"code": "caseAdded",
"label": "Application Drafted",
"order": null
}
],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[JURISDICTION]",
"label": "Jurisdiction",
"hidden": false,
"value": "IA",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[CASE_TYPE]",
"label": "Case Type",
"hidden": false,
"value": "FinancialRemedyMVP2",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[SECURITY_CLASSIFICATION]",
"label": "Security Classification",
"hidden": false,
"value": "PUBLIC",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "Text",
"type": "Text",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[CASE_REFERENCE]",
"label": "Case Reference",
"hidden": false,
"value": 1604309496714935,
"metadata": true,
"hint_text": null,
"field_type": {
"id": "Number",
"type": "Number",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[CREATED_DATE]",
"label": "Created Date",
"hidden": false,
"value": "2020-11-02T09:31:36.793313",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "DateTime",
"type": "DateTime",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[LAST_MODIFIED_DATE]",
"label": "Last Modified Date",
"hidden": false,
"value": "2020-11-02T09:31:37.111545",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "DateTime",
"type": "DateTime",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
},
{
"id": "[LAST_STATE_MODIFIED_DATE]",
"label": "Last State Modified Date",
"hidden": false,
"value": "2020-11-02T09:31:36.793313",
"metadata": true,
"hint_text": null,
"field_type": {
"id": "DateTime",
"type": "DateTime",
"min": null,
"max": null,
"regular_expression": null,
"fixed_list_items": [],
"complex_fields": [],
"collection_field_type": null
},
"validation_expr": null,
"security_label": "PUBLIC",
"order": null,
"formatted_value": null,
"display_context": null,
"display_context_parameter": null,
"show_condition": null,
"show_summary_change_option": null,
"show_summary_content_option": null,
"retain_hidden_value": null,
"acls": [],
"default_value": null
}
],
"state": {
"id": "caseAdded",
"name": "Application Drafted",
"description": null,
"title_display": "**${[CASE_REFERENCE]} ${applicantLName} vs ${appRespondentLName}**"
},
"triggers": [
{
"id": "FR_applicationPaymentSubmission",
"name": "Case Submission",
"description": "Case Submission",
"order": 2
},
{
"id": "FR_amendApplicationDetails",
"name": "Amend Application Details",
"description": "Amend Application Details",
"order": 109
}
],
"events": [
{
"id": 155533,
"timestamp": "2020-11-02T09:31:36.793313",
"summary": "",
"comment": "",
"event_id": "FR_solicitorCreate",
"event_name": "Consent Order Application",
"user_id": "72f16776-4ff9-4f5a-8b65-860e499bd24e",
"user_last_name": "Parker",
"user_first_name": "Peter",
"state_name": "Application Drafted",
"state_id": "caseAdded",
"significant_item": null
}
]
} |
import styled from 'styled-components';
const Row = styled.div`
color: ${({ theme: { row: { fontColor } } }) => fontColor};
background-color: ${({ isRowOdd, theme: { row: { dark, light } } }) => isRowOdd ? light : dark}
`;
export default Row;
|
import React from "react";
export default function Button(props) {
return <button disabled={props.disabled}>{props.children}</button>;
}
|
import axios from 'axios';
import {
GET_DATA_MAP,
GET_SITES,
DOWNLOAD_CUSTOMISED_DATA_URI,
D3_CHART_DATA_URI,
GENERATE_AIRQLOUD_DATA_SUMMARY_URI,
SCHEDULE_EXPORT_DATA
} from 'config/urls/analytics';
import { BASE_AUTH_TOKEN } from 'utils/envVariables';
export const getMonitoringSitesInfoApi = async (pm25Category) => {
return await axios
.get(GET_DATA_MAP + pm25Category, { params: { token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const getSitesApi = async () => {
return await axios
.get(GET_SITES, { params: { token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const downloadDataApi = async (data) => {
const headers = {
service: 'data-export'
};
return axios
.post(DOWNLOAD_CUSTOMISED_DATA_URI, data, { headers }, { params: { token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const loadD3ChartDataApi = async (data) => {
return await axios
.post(D3_CHART_DATA_URI, data, { params: { token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const scheduleExportDataApi = async (data) => {
return await axios
.post(SCHEDULE_EXPORT_DATA, data, { params: { token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const refreshScheduleExportDataApi = async (requestId) => {
return await axios
.patch(SCHEDULE_EXPORT_DATA, { params: { requestId, token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const getScheduleExportDataApi = async (USERID) => {
return await axios
.get(SCHEDULE_EXPORT_DATA, { params: { userId: USERID, token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
export const generateAirQloudDataSummaryApi = async (data) => {
return await axios
.post(GENERATE_AIRQLOUD_DATA_SUMMARY_URI, data, { params: { token: BASE_AUTH_TOKEN } })
.then((response) => response.data);
};
|
"use strict"
// DEPENDENIES
var bodyParser = require('body-parser')
var express = require('express');
var orm = require('orm');
var session = require("express-session");
var app = express();
var json2csv = require('nice-json2csv');
var port = process.env.PORT || 8000;
// CONFIG
app.use(session({secret: "$!45sd_213", isAdmin: false, resave: true, saveUninitialized: true}));
app.set("view engine", "jsx");
app.engine("jsx", require("express-react-views").createEngine());
app.use('/css', express.static('./css'));
app.use('/imgs', express.static('./images'));
app.use(bodyParser.json()); // support json encoded bodies
app.use(bodyParser.urlencoded({
extended: true
})); // support encoded bodies
app.use(json2csv.expressDecorator);
app.use(orm.express("mysql://root:asdfbdd@127.0.0.1/raq", {
define: function(db, models, next) {
db.load("./models", function(err) {
// Create tables if not exist
db.models.player.sync();
db.models.admin.sync();
// load Controllers
require("./player_controller")(app, db.models.player);
require("./admin_controller")(app, db.models);
});
next();
}
}));
app.listen(port); |
/* eslint-disable react/destructuring-assignment */
import React, { useEffect } from 'react';
import SteamSpeakComponents from '@site/src/components/SteamSpeakComponents';
import Layout from '@theme/Layout';
import animatedGraph from '@site/src/exports/animatedGraph';
function Components(props) {
useEffect(() => {
const canvas = document.querySelector('canvas');
const timer = animatedGraph(canvas);
return () => {
timer.stop();
};
}, []);
return (
<Layout
title="Plugins"
description="Browse and search all SteamSpeak's plugins."
>
<header className="hero hero--animated-graph">
<div className="container container--fluid container--flush">
<canvas width="2000" height="200" />
<div className="overlay">
<h1>SteamSpeak Plugins</h1>
<div className="hero--subtitle">
SteamSpeak provides you multiple plugins to automatize your
teamspeak server.
</div>
</div>
</div>
</header>
<main className="container">
<SteamSpeakComponents
filterColumn
headingLevel={2}
location={props.location}
/>
</main>
</Layout>
);
}
export default Components;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.