Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tx-techno-num
impactometre
Commits
9a5dc88d
Commit
9a5dc88d
authored
Dec 29, 2020
by
Matt Glorion
Browse files
[CLN] 🧹 typos & doc
parent
90b3627e
Changes
1
Hide whitespace changes
Inline
Side-by-side
model/classes/meeting/Hardware.js
View file @
9a5dc88d
...
...
@@ -17,11 +17,11 @@ class Hardware extends Component {
/**
* Create a hardware.
* @param {String} name - The key of an entry from the hardware database.
* @param {
Quanti
ty
}
- The instances number of the same hardware in the meeting.
* @param {
number} q
ty - The instances number of the same hardware in the meeting.
* E.g. a Logitech Kit has 4 identical cables.
* @param {
N
umber} size - The optional size attached to the hardware.
* @param {
n
umber} size - The optional size attached to the hardware.
* E.g. if the hardware is a TV, the size would be the area of the screen in square meter.
* @param {
Float
} shareForVisio - The share of the hardware dedicated to visio.
* @param {
number
} shareForVisio - The share of the hardware dedicated to visio.
* E.g. if the hardware is a laptop, the user may be multi-tasking during the visio,
* with other software application running. Value is between O and 1.
* @param {Array} componentsPayload - Optional components constructor parameters indexed by component name.
...
...
@@ -115,14 +115,14 @@ class Hardware extends Component {
* E.g. if the hardware is a laptop, the user
* may be multi-tasking during the visio,
* with other software application running.
* @returns {
Float
} The share for visio (between O and 1).
* @returns {
number
} The share for visio (between O and 1).
*/
get
shareForVisio
()
{
return
this
.
_shareForVisio
;
}
/**
* Get the size depend
a
nce property of the hardware.
* Get the size depend
e
nce property of the hardware.
* E.g. tv screen damage computing depends on the
* screen size.
* @returns {Boolean} The size dependance boolean.
...
...
@@ -505,6 +505,7 @@ class Hardware extends Component {
return
Promise
.
resolve
(
this
.
lifetime
*
daysWorkedByYear
*
standbyTimePerDay
);
}
// TODO cleanup / remove duplicate code and make it safer
update
(
payload
)
{
const
name
=
payload
.
name
;
// if there is a new hardware name
...
...
@@ -558,9 +559,9 @@ class Hardware extends Component {
this
.
shareForVisio
=
shareForVisio
;
}
// Modif
ie
damage
// Modif
y
damage
// It's necessary to always update damage because it's impossible to know if
// bound or meetin
d
duration have changed
// bound or meetin
g
duration have changed
// (there are not stored)
const
damagePayload
=
payload
.
damagePayload
;
this
.
computeDamage
({
meetingDuration
:
damagePayload
.
meetingDuration
,
bound
:
damagePayload
.
bound
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment