import { CollectionConfig } from “payload/types”; export type User = { id: string; name: string; email: string; role: “admin” | “editor” | “user”; // Enum type for roles createdAt: string; updatedAt: string; }; const Users: CollectionConfig = { slug: “users”, fields: [ { name: “name”, type: “text”, required: true, }, { name: “email”, type: “email”,… Continue reading Declaring Collection Types in Payload
Tag: web app
Proposal For Jira and NetSuite Bi-Directional Sync
Proposal Summary This proposal details an all-encompassing approach to connect a Web App with the Jira platform via NetSuite custom records. It incorporates a dual synchronization mechanism real-time and scheduled to ensure optimal management of work items, work requirements, and work efforts. The aim is to create a strong and flexible system for managing projects… Continue reading Proposal For Jira and NetSuite Bi-Directional Sync
Logging request with “Morgan” in Node JS.
To log requests using Morgan in Node.js, you first need to install the Morgan package: npm install morgan Then, you can integrate Morgan into your Node.js application. Here’s an example of how you can use Morgan with Express.js: const morgan = require(‘morgan’); and use it below where Cors are used. // Use Morgan middleware to… Continue reading Logging request with “Morgan” in Node JS.
How to use a mapping object to replace values in a data array of objects
The requirement was to show abbreviated values for the shipping item label values sourced from the NetSuite side in a React JS web application. For this, I created a map object and stored the original names and abbreviations as key-value pairs. Used a map function to replace the values in the data object before rendering.… Continue reading How to use a mapping object to replace values in a data array of objects
Rendering web pages using free marker and Suite scripts
Render a web page using suitelet and HTML template.
Web app Login Page using suitelet
This article briefs about suitelet script for the login page.