RPS Admin db schema changes + flag updates.
This commit is contained in:
@@ -351,22 +351,26 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
// jobline.glass_flag === false
|
||||
// )
|
||||
.map((jobline) => {
|
||||
if (
|
||||
(jobline.db_price === null || jobline.db_price === 0) &&
|
||||
!!jobline.act_price &&
|
||||
jobline.act_price > 0
|
||||
) {
|
||||
// log.info(
|
||||
// "DB Price null/lower than act price",
|
||||
// jobline.line_desc,
|
||||
// jobline.db_price,
|
||||
// jobline.act_price
|
||||
// );
|
||||
jobline.db_price = jobline.act_price;
|
||||
}
|
||||
//Removed as a result of conversation with Norm.
|
||||
// Appears you are calculating based on ‘N.A.’ part values in the Mitchell database.
|
||||
// Reminder – if Mitchell DB has $0.00 price updates can be tracked, if it has N.A. it cannot calculate RPS value.
|
||||
|
||||
// if (
|
||||
// (jobline.db_price === null || jobline.db_price === 0) &&
|
||||
// !!jobline.act_price &&
|
||||
// jobline.act_price > 0
|
||||
// ) {
|
||||
// // log.info(
|
||||
// // "DB Price null/lower than act price",
|
||||
// // jobline.line_desc,
|
||||
// // jobline.db_price,
|
||||
// // jobline.act_price
|
||||
// // );
|
||||
// jobline.db_price = jobline.act_price;
|
||||
// }
|
||||
|
||||
if (
|
||||
jobline.db_price &&
|
||||
jobline.db_price > 0 &&
|
||||
jobline.act_price &&
|
||||
jobline.act_price > jobline.db_price
|
||||
) {
|
||||
@@ -388,11 +392,12 @@ async function DecodeLinFile(extensionlessFilePath) {
|
||||
jobline.line_desc.toLowerCase().startsWith("hazardous") ||
|
||||
jobline.line_desc.toLowerCase().startsWith("detail") ||
|
||||
jobline.line_desc.toLowerCase().startsWith("clean") ||
|
||||
jobline.part_type.toUpperCase() === "PAG" ||
|
||||
// jobline.part_type.toUpperCase() === "PAG" ||
|
||||
jobline.part_type.toUpperCase() === "PAS" ||
|
||||
jobline.part_type.toUpperCase() === "PASL" ||
|
||||
jobline.part_type.toUpperCase() === "PAE" ||
|
||||
jobline.glass_flag === true
|
||||
//jobline.glass_flag === true ||
|
||||
jobline.db_price === 0
|
||||
)
|
||||
jobline.ignore = true;
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."users" DROP COLUMN "id";
|
||||
type: run_sql
|
||||
@@ -0,0 +1,10 @@
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: CREATE EXTENSION IF NOT EXISTS pgcrypto;
|
||||
type: run_sql
|
||||
- args:
|
||||
cascade: false
|
||||
read_only: false
|
||||
sql: ALTER TABLE "public"."users" ADD COLUMN "id" uuid NULL UNIQUE DEFAULT gen_random_uuid();
|
||||
type: run_sql
|
||||
@@ -0,0 +1,23 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: users
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- authid
|
||||
- email
|
||||
- created_at
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: users
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -0,0 +1,24 @@
|
||||
- args:
|
||||
role: user
|
||||
table:
|
||||
name: users
|
||||
schema: public
|
||||
type: drop_select_permission
|
||||
- args:
|
||||
permission:
|
||||
allow_aggregations: false
|
||||
columns:
|
||||
- authid
|
||||
- created_at
|
||||
- email
|
||||
- id
|
||||
- updated_at
|
||||
computed_fields: []
|
||||
filter:
|
||||
authid:
|
||||
_eq: X-Hasura-User-Id
|
||||
role: user
|
||||
table:
|
||||
name: users
|
||||
schema: public
|
||||
type: create_select_permission
|
||||
@@ -317,8 +317,9 @@ tables:
|
||||
permission:
|
||||
columns:
|
||||
- authid
|
||||
- email
|
||||
- created_at
|
||||
- email
|
||||
- id
|
||||
- updated_at
|
||||
filter:
|
||||
authid:
|
||||
|
||||
Reference in New Issue
Block a user