CMPUT301W15T12 / C301Project

Apache License 2.0
3 stars 2 forks source link

Changes to Claim #53

Closed vanbelle closed 9 years ago

vanbelle commented 9 years ago

Based on some Prof. answers on eclass, claim no longer has a list of approvers but rather a single approver of type user.

Becuase he said that only the original approver of a returned user can approve a returned claim I would like for this to be included in the filterByStatus function. Ideally when this function is called, it gets all submitted claims EXCLUDING those whose approver name does not match the username provided to the function.

qsjiang commented 9 years ago

@vanbelle I will look into it later tonight

qsjiang commented 9 years ago

Hi @vanbelle thanks for the suggestion,

1 Out current implementation only allows one approver.
2 About the filter functions in controller, In the next iteration, I will come up with a solution for applying multiple filters in general, but for now I would suggest just manually loop through the array and remove those claims after you get the ArrayList .

IchigoKIl commented 9 years ago

Please change Claim to utilize ExpenseList

qsjiang commented 9 years ago

@IchigoKIl Will do

qsjiang commented 9 years ago

@IchigoKIl
Hey Raymond, I saw the changes you made in expenseItem.class. You removed several functions construct strings

First let me say they are GOOD changes. I 100% AGREE with you.

but I don' think right now is a good time to break existing APIs since the due day is Monday.

I think we should leave them inside the code for now and refactor them in next iteration.

qsjiang commented 9 years ago

@IchigoKIl and can you explain the reason behind removing incomplete() function?

IchigoKIl commented 9 years ago

I was thinking that the controller can just as easily do the check by checking all the fields are not null.

qsjiang commented 9 years ago

@IchigoKIl The current incomplete function is pretty messy, we definitely need to re-factor it in the future, but I do think it should remain inside the expense class.

The reason being that "incomplete" is a status about the expense item. The model should be able to remember or figure out (compute on the fly) its current status without any help from the outside.

but that's just my own personal opinion, we should discuss more on the next meeting.