Skip to content

Commit

Permalink
threejs, esnext
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya committed May 20, 2024
1 parent 58674f2 commit e9c06ba
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
18 changes: 9 additions & 9 deletions salary/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</script>
<link href="salary.css" rel="stylesheet">
<script type="module" src="./../res/sg-model/sg-model-view-41.js" defer></script>
<script type="module" src="salary-052.js"></script>
<script type="module" src="salary-053.js"></script>
<link rel="dns-prefetch" href="https://www.cbr-xml-daily.ru/"/>
</head>

Expand Down Expand Up @@ -246,8 +246,8 @@ <h5 id="content_loading" class="text-center" sg-css="initialized ? 'loading-hide
<div class="row">
<div class="col pe-0">
<div class="form-check form-switch">
<input class="form-check-input" id="typescript" type="checkbox" sg-property="typescript">
<label class="form-check-label" for="typescript"><span class_="tech-title-minimize" sg-attributes="{ title: getLevelFor('typescript') }">Typescript</span> <sup sg-property="typescript_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
<input class="form-check-input" id="esnext" type="checkbox" sg-property="esnext">
<label class="form-check-label text-nowrap" for="esnext"><span sg-attributes="{ title: getLevelFor('esnext') }">ES.Next</span> <sup sg-property="esnext_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
</div>
</div>
<div class="col ps-0">
Expand All @@ -260,8 +260,8 @@ <h5 id="content_loading" class="text-center" sg-css="initialized ? 'loading-hide
<div class="row">
<div class="col pe-0">
<div class="form-check form-switch">
<input class="form-check-input" id="php" type="checkbox" sg-property="php">
<label class="form-check-label text-nowrap" for="php"><span sg-attributes="{ title: getLevelFor('php') }">PHP</span> <sup sg-property="php_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
<input class="form-check-input" id="typescript" type="checkbox" sg-property="typescript">
<label class="form-check-label" for="typescript"><span class_="tech-title-minimize" sg-attributes="{ title: getLevelFor('typescript') }">Typescript</span> <sup sg-property="typescript_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
</div>
</div>
<div class="col ps-0">
Expand All @@ -288,8 +288,8 @@ <h5 id="content_loading" class="text-center" sg-css="initialized ? 'loading-hide
<div class="row">
<div class="col pe-0">
<div class="form-check form-switch">
<input class="form-check-input" id="python" type="checkbox" sg-property="python">
<label class="form-check-label text-nowrap" for="python"><span sg-attributes="{ title: getLevelFor('python') }">Python</span> <sup sg-property="python_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
<input class="form-check-input" id="php" type="checkbox" sg-property="php">
<label class="form-check-label text-nowrap" for="php"><span sg-attributes="{ title: getLevelFor('php') }">PHP</span> <sup sg-property="php_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
</div>
</div>
<div class="col ps-0">
Expand All @@ -308,8 +308,8 @@ <h5 id="content_loading" class="text-center" sg-css="initialized ? 'loading-hide
</div>
<div class="col ps-0">
<div class="form-check form-switch">
<input class="form-check-input" id="otherdbms" type="checkbox" sg-property="otherdbms">
<label class="form-check-label text-nowrap" for="otherdbms"><span sg-attributes="{ title: getLevelFor('otherdbms') }">др. СУБД</span> <sup sg-property="otherdbms_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
<input class="form-check-input" id="threejs" type="checkbox" sg-property="threejs">
<label class="form-check-label text-nowrap" for="threejs"><span sg-attributes="{ title: getLevelFor('threejs') }">ThreeJS(3D)</span> <sup sg-property="threejs_koef" sg-format="formatDiscount" sg-css="cssDangerOrSuccess"></sup></label>
</div>
</div>
</div>
Expand Down
36 changes: 23 additions & 13 deletions salary/salary-052.js → salary/salary-053.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const CURRENT_VERSION = 8;
const CURRENT_VERSION = 9;

class OptionsMethods {
constructor(values) {
Expand Down Expand Up @@ -43,7 +43,7 @@ class Salary extends SGModelView {
otech: false,
code: '1',
ecmascript: false,
otherdbms: false,
esnext: false,
java: false,
vue: false,
react: false,
Expand All @@ -52,12 +52,12 @@ class Salary extends SGModelView {
cpp: false,
typescript: false,
vanillajs: false,
python: false,
threejs: false,
nestjs: false,

// скидки/наценки в %
ecmascript_koef: -20,
otherdbms_koef: +10,
esnext_koef: -10,
java_koef: +40,
vue_koef: +5,
react_koef: +40,
Expand All @@ -67,7 +67,7 @@ class Salary extends SGModelView {
typescript_koef: +15,
vanillajs_koef: -5,
nestjs_koef: -10,
python_koef: +30,
threejs_koef: -10,

rate_hour_min: 0,
salary_month: 0,
Expand Down Expand Up @@ -106,7 +106,7 @@ class Salary extends SGModelView {
otech: SGModel.TYPE_BOOLEAN,
code: SGModel.TYPE_STRING,
ecmascript: SGModel.TYPE_BOOLEAN,
otherdbms: SGModel.TYPE_BOOLEAN,
esnext: SGModel.TYPE_BOOLEAN,
java: SGModel.TYPE_BOOLEAN,
vue: SGModel.TYPE_BOOLEAN,
react: SGModel.TYPE_BOOLEAN,
Expand All @@ -115,7 +115,7 @@ class Salary extends SGModelView {
cpp: SGModel.TYPE_BOOLEAN,
typescript: SGModel.TYPE_BOOLEAN,
vanillajs: SGModel.TYPE_BOOLEAN,
python: SGModel.TYPE_BOOLEAN,
threejs: SGModel.TYPE_BOOLEAN,
nestjs: SGModel.TYPE_BOOLEAN,

otech_per: SGModel.TYPE_NUMBER,
Expand All @@ -133,12 +133,12 @@ class Salary extends SGModelView {
F: "postgresql",
G: "code",
H: "hours_in_day",
I: "python",
I: "esnext",
J: "ecmascript",
//K: "",
K: "threejs",
//M: "",
N: "nestjs",
O: "otherdbms",
//O: "",
P: "php",
//Q: "",
R: "react",
Expand Down Expand Up @@ -216,7 +216,7 @@ class Salary extends SGModelView {

static _fields_koef = {
'ecmascript': 'n',
'otherdbms': 'i',
'esnext': 'u',
'react': 't',
'postgresql': 'm',
'vue': 'j',
Expand All @@ -225,7 +225,7 @@ class Salary extends SGModelView {
'typescript': 'u',
'vanillajs': 'u',
'java': 'j',
'python': 't',
'threejs': 't',
'nestjs': 't',
};

Expand Down Expand Up @@ -296,7 +296,7 @@ class Salary extends SGModelView {
this.set('days_in_week', this.get('days_in_week'), void 0, SGModel.FLAG_FORCE_CALLBACKS);
});

const ecmaTechDependent = ['vanillajs', 'typescript', 'react', 'vue', 'nestjs'];
const ecmaTechDependent = ['vanillajs', 'typescript', 'react', 'vue', 'nestjs', 'esnext'];
ecmaTechDependent.forEach(code => {
this.on(code, (value) => {
if (value) {
Expand All @@ -311,6 +311,16 @@ class Salary extends SGModelView {
});
}
});
this.on('esnext', (esnext) => {
if (esnext) {
this.set('typescript', false);
}
});
this.on('typescript', (typescript) => {
if (typescript) {
this.set('esnext', false);
}
});
this.on('nestjs', (nestjs) => {
if (nestjs) {
this.set('ecmascript', true);
Expand Down

0 comments on commit e9c06ba

Please sign in to comment.