Skip to content

Instantly share code, notes, and snippets.

View iswanj's full-sized avatar
:octocat:
I may be slow to respond.

Tuan Iswan (TIJ) iswanj

:octocat:
I may be slow to respond.
View GitHub Profile

Login Form Feature Merge Request

Changes

This merge request includes the following changes:

  • Added a new login form component with fields for email address and password
  • Implemented email address as the username field
  • Added a "Remember Me" checkbox to the login form
  • Updated the login functionality to use the email address and password fields
@iswanj
iswanj / evap-const.js
Created December 13, 2023 08:47
evap const
const data = {}
const daily_report = {
feed_rate: {
title: "Feed Rate",
freq: 'daily',
pitags: []
},
dry_solid_feed: {
title: "Dry Solid Feed",
freq: '8h',
@iswanj
iswanj / addmonthlhSummary.js
Last active November 24, 2023 06:52
calculate sum
function addMonthlySumValues(data) {
return data.map(item => {
let result = {};
for (const row of item.data) {
for (const keys in row) {
if (keys === 'date' || keys === 'datetime') continue;
if (keys in result) {
result[keys] += Number(row[keys].value)
} else {
parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
COLOR_DEF='%f'
COLOR_DIR='%F{197}'
COLOR_GIT='%F{39}'
NEWLINE=$'\n'
setopt PROMPT_SUBST
export PROMPT='${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% '
@iswanj
iswanj / MyComponent.js
Created May 24, 2021 13:26
Tracking Custom mixpanel events
import React from 'react';
import { View, Text } from 'react-native';
import {Button} from 'components';
import {useMixpanel} from 'provider/MixpanelProvider'; // import useMixpanel hooks
const MyComponent = () => {
const mixpanel = useMixpanel(); // put this code top of your functional component
const handleTrack = () => {
@iswanj
iswanj / PrintWindow.jsx
Last active July 14, 2020 03:42
invoice window
import * as React from "react";
import * as ReactDOM from "react-dom";
import { copyStyles } from "util/core";
export default class MyWindowPortal extends React.Component {
state = {
elm: null
};
constructor(props) {
@iswanj
iswanj / userModel.js
Created March 5, 2020 04:38
ustated next
import React from "react";
import axios from "axios";
function useUsers() {
const [userById, setUsersById] = React.useState({});
const [userIds, setUsers] = React.useState([]);
const getUserList = async () => {
const result = axios.get("/api/users");
@iswanj
iswanj / userModel.js
Created March 5, 2020 04:38
ustated next
import React from "react";
import axios from "axios";
function useUsers() {
const [userById, setUsersById] = React.useState({});
const [userIds, setUsers] = React.useState([]);
const getUserList = async () => {
const result = axios.get("/api/users");
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.main {
position: relative;
width: 440px;
@iswanj
iswanj / bug.md
Created May 18, 2019 21:12
[Sample Bug] The price mentioned on the pricing page is not correct

Issue description

The price mentioned on the pricing page is not correct

Steps to reproduce the issue

  1. Log in to the system
  2. Go to the pricing page
  3. Click more details button

What's the expected result?

  • The Price for the basic plan should be $43